feat(T03): OCR-Erfassung via OpenRouter Qwen2.5-VL + OCR UI with drag-and-drop

This commit is contained in:
2026-07-17 00:45:14 +02:00
parent b128ea6b39
commit 149ac04dc1
20 changed files with 2348 additions and 182 deletions
+33 -33
View File
@@ -1,38 +1,38 @@
# Current Status ERP Nutzfahrzeuge
# Current Status
## Phase: Implementation (Phase 3)
## Plan-Mode: implementation_allowed
**Phase**: 3 - Implementation
**Date**: 2026-07-17
## Completed Tasks
- **T01** ✅ Auth + User Management + RBAC + Base Frontend + i18n (re-implemented, 50 backend + 16 frontend tests)
- **T02** ✅ Vehicle Management + mobile.de Push + Vehicle UI (commit 74b5e6a)
- **T04** ✅ Contact Management + USt-IdNr. Validation + Contact UI (commit 2cf433a)
## Completed
- T01: Auth + User Management + RBAC + Base Frontend + i18n
- 50 backend tests passed, 16 frontend tests passed
- Next.js build successful, health endpoint 200
- Commit: d893048
- T02: Vehicle Management + mobile.de Push + Vehicle UI ✅ (committed, tests pending verification)
- Commit: 74b5e6a
- T04: Contact Management + USt-IdNr. Validation + Contact UI ✅ (committed, tests pending verification)
- Commit: 2cf433a
- i18n fix: 'use client' directive added to i18n.tsx
- Commit: b128ea6
- T03: OCR-Erfassung via OpenRouter Vision + OCR UI ✅
- 33 backend tests passed (85% coverage), 18 frontend tests passed
- Full backend suite: 229 tests passed
- Backend: OCRResult model, schemas, OpenRouter client, ocr_service, async task, router
- Frontend: OCRUpload (drag-and-drop), OCRResults (list), OCRDetail (side-by-side), OCR page
- OpenRouter Qwen2.5-VL integration with structured JSON output
- Confidence threshold: < 0.7 → manual_review, >= 0.7 → completed
- Async processing via FastAPI BackgroundTasks
## Test Results Summary
| Task | Backend Tests | Frontend Tests | Coverage |
|------|--------------|--------------|----------|
| T01 | 50 passed | 16 passed | 93% (auth_service 95%, routers 98%) |
| T02 | 73 passed | 16 passed | 82% |
| T04 | 73 passed | 20 passed | 91% |
## In Progress
- None
## Current Task: T03 OCR-Erfassung via OpenRouter Vision
- Dependencies: T01, T02 (both completed)
- OCRResult model, ocr_service, OCR router, async processing
- Frontend: OCR Upload (drag-and-drop), OCR Results view
## Blockers
- None
## Git Status
- Branch: main
- Working tree: has uncommitted T01 changes
## Known Risks
- PostgreSQL must be running for backend tests
- Redis not installed (refresh tokens JWT-based, no async queue yet)
- No Alembic migrations yet (tables via Base.metadata.create_all)
- mobile.de push is synchronous (returns 202 but executes inline)
## Next Steps
1. Commit T01 changes
2. T03: OCR-Erfassung (ZB I/II) via OpenRouter Qwen2.5-VL
3. T05: Sales + Legal/Compliance
4. T06: KI Copilot
5. T08: Bildretusche
## Notes
- PostgreSQL test DB (erp_test) and user (erp_test_user) set up locally
- Next.js 14.2.5 has security vulnerability warning - upgrade recommended later
- node_modules installed via npm install (294 packages)
- OPENROUTER_API_KEY added to config.py (empty default, needs env var in production)
- MAX_FILE_SIZE_MB=50 added to config.py
- @vitest/coverage-v8 not installed (frontend coverage runs without it)