c-stone-invoice-check/STATUS.md
Markus Kruse d2c3d29ad2 feat(invoice-check): Nextcloud-Commits squashed
Enthält ~18 Commits vom Nextcloud-Mount (FUSE-Blocker verhinderte
direkten Push): Excel-Export-Fix, IMAP-Verbesserungen, Scan-Fixes,
UI-Updates. Aus Forgejo-Migration squashed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-01 00:48:20 +02:00

117 lines
3.5 KiB
Markdown

# Status — C-Stone Invoice Check
**Stand:** 2026-07-25, 14:40
---
## Was das Projekt macht
C-Stone Invoice Check ist ein KI-gestütztes Email-Filter-System für Rechnungen mit folgenden Funktionen:
1. **Email-Filterung** per IMAP (Strato + Gmail) nach Stichworten: "Rechnung", "Invoice", "Receipt", "Bill"
2. **Anhang-Extraktion** (PDF/DOC) aus erkannten Emails
3. **PDF-Scanning** mit PyMuPDF für Text-Extraktion
4. **Steuer-Erkennung**: Unterscheidung zwischen "mit MwSt" / "ohne MwSt" / "Umsatzsteuer" / "VAT"
5. **Lokale Ablage** auf Evo-X2 (Laufwerk):
```
Rechnungen/
├── 2025/
│ ├── mit MwSt/
│ └── ohne MwSt/
└── 2026/
├── mit MwSt/
└── ohne MwSt/
```
6. **Excel-Dokumentation** mit Spalten: Datum, Rechnungsausteller, Betrag, Umsatzsteuer, Steuerart, Dateipfad
---
## Was umgesetzt ist (✅)
### Backend (FastAPI)
- ✅ Projektstruktur: `backend/`, `frontend/`, `docs/`
- ✅ FastAPI Hauptanwendung mit Health-Endpunkt
- ✅ Router: `emails.py`, `invoices.py`, `auth.py`
- ✅ Datenbankmodelle: `Invoice`, `EmailLog`, `InvoiceDetail`, `User`
- ✅ IMAP-Verarbeitung für Strato und Gmail
- ✅ PDF-Extraktion mit PyMuPDF (Text, Betrag, Rechnungsnummer, Austeller)
- ✅ Steuer-Erkennung (mit/ohne MwSt, Umsatzsteuer, VAT)
- ✅ Excel-Export mit openpyxl
- ✅ Alembic Migration: `5316895daf52_initial_schema.py`
### Frontend (React/Vite)
- ✅ React 18 mit TypeScript
- ✅ react-router-dom für Navigation
- ✅ axios für API-Calls
- ✅ Tailwind CSS für Styling
- ✅ Dashboard-View (Statistiken, Anleitung)
- ✅ Invoices-View (Liste, Details-Modal, Scan-Button, Excel-Export)
- ✅ Email Logs-View (Liste, Details-Modal)
- ✅ Responsive UI mit Navigation
### Infrastruktur (Docker)
- ✅ `docker-compose.yml` mit Backend, Frontend, PostgreSQL
- ✅ `Dockerfile.backend` (Python 3.12, FastAPI)
- ✅ `Dockerfile.frontend` (Node 20, nginx)
- ✅ PostgreSQL 16 Alpine (Docker-intern)
- ✅ Docker-Netzwerk für Service-Kommunikation
### Test & Entwicklung
- ✅ `backend/tests/test_imap.py` (IMAP-Verbindungstest)
- ✅ `backend/tests/test_pdf.py` (PDF-Extraktionstest)
- ✅ OpenAPI-Dokumentation unter `/docs`
---
## Status (✅ Läuft)
### Gelöstes Problem
~~nginx: [emerg] invalid number of arguments in "try_files" directive~~
→ Behoben: Dockerfile.frontend auf korrektes Multi-Stage-Build umgestellt (2026-07-25)
### Offene Aufgaben
- [ ] Frontend unter http://localhost:5178 testen
- [ ] Backend API unter http://localhost:8005/docs testen
- [ ] IMAP-Verbindung mit echten Credentials konfigurieren
- [ ] PDF-Verarbeitung lokal testen
- [ ] Evo-X2 Ablagepfad konfigurieren
---
## Docker-Ports (Project-Port-Liste)
| Service | Host | Container | Status |
|---------|------|-----------|--------|
| Backend | 8005 | 8001 | ✅ Running |
| Frontend | 5178 | 80 | ✅ Running |
| PostgreSQL | - | 5432 | ✅ Running |
---
## Git Status
**Letzte Commits:**
- `3eaf29f` - docs: memory.md aktualisiert
- `cc39f01` - feat: Frontend UI complete + Alembic migrations + Docker setup
- `97b5a7e` - fix: PDF extraction und Speicherung korrigiert
---
## Nächste Schritte
1. nginx.conf im Frontend-Container reparieren
2. Container neu bauen und starten
3. Frontend testen (http://localhost:5178)
4. Backend API testen (http://localhost:8005/docs)
5. IMAP-Verbindung mit Strato/Gmail konfigurieren
---
## System-Informationen
- **OS:** macOS 24.6.0
- **Python:** 3.12
- **Node.js:** 20-alpine
- **PostgreSQL:** 16-alpine
- **Docker:** Desktop
- **Git:** C-Stone Forgejo (git.c-stone-dev.com)