- Add ProcessingTrackEnum, ProcessingOptions, ProcessingMetadata schemas
- Add DocumentAnalysisResponse for document type detection
- Update /start endpoint with dual-track query parameters
- Add /analyze endpoint for document type detection with confidence scores
- Add /metadata endpoint for processing track information
- Add /download/unified endpoint for UnifiedDocument format export
- Update tasks.md to mark Section 6 API updates as completed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create JSON Schema definition for UnifiedDocument format
- Implement UnifiedDocumentExporter service with multiple export formats
- Include comprehensive processing metadata and statistics
- Update OCR service to use new exporter for dual-track outputs
- Support JSON, Markdown, Text, and legacy format exports
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add missing file upload functionality to V2 API that was removed
during V1 to V2 migration. Update frontend to use v2 API endpoints.
Backend changes:
- Add /api/v2/upload endpoint in main.py for file uploads
- Import necessary dependencies (UploadFile, hashlib, TaskFile)
- Upload endpoint creates task, saves file, and returns task info
- Add UploadResponse schema to task.py schemas
- Update tasks router imports for consistency
Frontend changes:
- Update API_VERSION from 'v1' to 'v2' in api.ts
- Update UploadResponse type to match V2 API response format
(task_id instead of batch_id, single file instead of array)
This fixes the 404 error when uploading files from the frontend.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Fixed UserResponse schema datetime serialization bug
- Fixed test_auth.py mock structure for external auth service
- Updated conftest.py to create fresh database per test
- Ran full test suite and verified results
Test Results:
✅ test_auth.py: 5/5 passing (100%)
✅ test_tasks.py: 4/6 passing (67%)
✅ test_admin.py: 2/4 passing (50%)
❌ test_integration.py: 0/3 passing (0%)
Total: 11/18 tests passing (61%)
Known Issues:
1. Fixture isolation: test_user sometimes gets admin email
2. Admin API response structure doesn't match test expectations
3. Integration tests need mock fixes
Production Bug Fixed:
- UserResponse schema now properly serializes datetime fields to ISO format strings
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove all V1 architecture components and promote V2 to primary:
- Delete all paddle_ocr_* table models (export, ocr, translation, user)
- Delete legacy routers (auth, export, ocr, translation)
- Delete legacy schemas and services
- Promote user_v2.py to user.py as primary user model
- Update all imports and dependencies to use V2 models only
- Update main.py version to 2.0.0
Database changes:
- Fix SQLAlchemy reserved word: rename audit_log.metadata to extra_data
- Add migration to drop all paddle_ocr_* tables
- Update alembic env to only import V2 models
Frontend fixes:
- Fix Select component exports in TaskHistoryPage.tsx
- Update to use simplified Select API with options prop
- Fix AxiosInstance TypeScript import syntax
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>