feat(data-entry): Add unified receipt form with OCR confidence tracking

New unified receipt creation system with:
- UnifiedReceiptForm component with inline OCR preview and confidence indicators
- Compact upload zone with drag-drop and camera support
- TVA and Payment fields with dynamic add/remove
- Supplier dual-field with autocomplete and OCR hint
- Receipt form sections with collapsible auxiliary data

Backend OCR improvements:
- Add confidence_tva and confidence_payment to extraction results
- Update TVA extraction to return confidence scores
- Include TVA (15%) and payment (10%) in overall_confidence calculation

Also includes:
- CSS design system rules documentation
- Port check helper function for service scripts
- Expanded design tokens documentation in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-01-08 21:48:37 +00:00
parent cc98d6f21f
commit b4a226409c
21 changed files with 4876 additions and 55 deletions

View File

@@ -35,11 +35,24 @@ See `docs/ARCHITECTURE-DECISIONS.md` for:
### Starting Services
```bash
./start-prod.sh # Backend :8001 + Frontend :3000
./start-prod.sh # Backend :8000 + Frontend :3000 (PROD)
./start-prod.sh stop # Stop all services
./ssh-tunnel-prod.sh # Oracle DB tunnel (REQUIRED on Linux)
./status.sh # Check services
```
### Playwright Testing
```bash
# Pentru testare UI cu Playwright:
./start-test.sh # Pornește în mod TEST
./start-test.sh stop # Oprește serverele
# Credențiale TEST:
# User: MARIUS M
# Pass: 123
# Firma: MARIUSM AUTO
```
### Database
- **Schema**: `CONTAFIN_ORACLE`
- **Connection**: SSH tunnel required (Linux dev)
@@ -49,10 +62,25 @@ See `docs/ARCHITECTURE-DECISIONS.md` for:
## Key Rules (ALWAYS FOLLOW)
### Git Commits
- **NU da commit automat!** Întreabă utilizatorul ÎNAINTE de a face commit
- Arată ce fișiere s-au modificat (`git status`) și propune mesajul de commit
- Așteaptă confirmarea explicită înainte de `git commit`
### Frontend Development
**Before writing CSS**: Read `docs/ONBOARDING_CSS.md` (5 min)
- Use design tokens: `var(--color-primary)` not `#2563eb`
#### CSS Design Tokens - OBLIGATORIU ⚠️
- **CITEȘTE ÎNTÂI**: `docs/DESIGN_TOKENS.md` înainte de a scrie CSS
- Folosește **DOAR** design tokens, NICIODATĂ valori hardcodate:
- Spacing: `var(--space-xs)` (4px), `var(--space-sm)` (8px), `var(--space-md)` (16px)
- Font weight: `var(--font-medium)` (500), `var(--font-semibold)` (600), `var(--font-bold)` (700)
- Colors: `var(--green-50)`, `var(--blue-50)`, `var(--surface-card)`, etc.
- Radius: `var(--radius-sm)` (4px), `var(--radius-md)` (8px)
- ❌ GREȘIT: `padding: 8px`, `font-weight: 500`, `background: #f0fdf4`
- ✅ CORECT: `padding: var(--space-sm)`, `font-weight: var(--font-medium)`, `background: var(--green-50)`
#### Alte reguli CSS
- Use shared CSS from `src/assets/css/` - NEVER duplicate
- Check `docs/CSS_PATTERNS.md` for existing patterns
- **Theme toggle**: App has 3 modes (auto/light/dark) - test BOTH themes!