Skip to content

Latest commit

 

History

History
246 lines (192 loc) · 8.37 KB

File metadata and controls

246 lines (192 loc) · 8.37 KB

Session Notes


Session 2026-04-20 – Prod-Deployment & Beta-Launch

Was wurde gemacht

Prod-Server vollständig stabilisiert:

  • Backend-Crash behoben: ALLOWED_ORIGINS pydantic-Parsing (JSON-Format in .env)
  • Nginx-Crash behoben: healthcheck + depends_on: service_healthy
  • Netzwerk-Glitch nach Teil-Neustarts → docker compose down && up löst es
  • Cloudflare Flexible SSL Loop: nginx Port-80 dient jetzt Content statt Redirect
  • Let's Encrypt SSL Zertifikat via Certbot
  • /etc/letsencrypt Host-Mount (kein leeres Docker-Volume)

Datenbank-Migrationen von Grund auf gefixt:

  • Initiale Schema-Migration fehlte → 0001_initial_schema erstellt
  • 5750435ca4eb war für SQLite (VARCHAR statt UUID) → UUID-Typen gefixt
  • documents/files entsprachen nicht den Models → 0002_fix_documents_files_schema
  • Alle Migrationen laufen auf PostgreSQL durch

Flutter APK:

  • .env hatte alte interne API-URL → auf workmate-private.phudevelopement.xyz gefixt
  • APK gebaut + via Firebase App Distribution verteilt

User angelegt: joshua via POST /api/v1/auth/login

Aktueller Prod-Stand

Service Status
Backend ✅ healthy (Hetzner cax11)
Nginx + SSL ✅ up
PostgreSQL ✅ alle 4 Migrationen durch
CI/CD ✅ GitHub Actions ARM64
APK Distribution ✅ Firebase App Distribution
Login/Auth ✅ funktioniert

Noch offen

  • Email Notifications
  • End-to-End Push Notification Test
  • Weitere Beta-Tester rekrutieren

Session 2026-04-18 – Analyse & Doku-Update

Kontext

Vollständige Bestandsaufnahme des Projekts. Ziel: Dokumentation auf den tatsächlichen Code-Stand bringen.

Festgestellt: Was seit der letzten Session implementiert wurde

Seit SESSION_NOTES 2026-01-23 wurden folgende Features komplett implementiert:

Backend – neue Komponenten

Kalender-Integration (vollständig):

  • app/api/v1/calendar.py – Calendar API Endpoints (CRUD + Sync)
  • app/services/caldav_service.py – CalDAV Integration (Nextcloud, Apple, Radicale, etc.)
  • app/services/google_calendar_service.py – Google Calendar OAuth2 + API
  • app/services/calendar_sync_service.py – Bidirektionaler Sync-Dienst
  • app/services/task_event_mapping_service.py – Task → CalendarEvent Mapping
  • app/models/calendar_event.py – CalendarEvent Model (inkl. Conflict-Daten)
  • app/models/integration.py – Integration Model (verschlüsselte Credentials)
  • app/schemas/calendar.py – Pydantic Schemas für Calendar

Dokument-Pipeline (vollständig):

  • app/api/v1/documents.py – Document Upload + Processing Endpoints
  • app/services/ocr_service.py – Tesseract OCR Integration
  • app/services/claude_service.py – Claude API Dokumenten-Analyse
  • app/tasks/document_processing.py – Celery Task für Async Processing
  • app/services/file_storage.py – File Storage Service (lokal)
  • app/api/v1/files.py – File-Serving Endpoints

Infrastruktur:

  • app/main.py – Health Dashboard unter /health/ui (HTML, auto-refresh 30s)
  • Zwei Alembic-Migrationen:
    • 5750435ca4eb – Add calendar_events and integrations tables
    • 1e3f16c582f3 – Remove sevdesk and fints tables (nicht gemergte Altlasten entfernt)

Frontend – neue Seiten & Services

Neue Pages:

  • pages/calendar_page.dart – Kalender-Ansicht
  • pages/dashboard_page.dart – Dashboard mit Navigation
  • pages/documents_page.dart – Dokumentenliste
  • pages/document_detail_page.dart – Dokumentdetail mit KI-Analyse
  • pages/task_detail_page.dart – Taskdetail
  • pages/integrations_page.dart – Integrationen-Übersicht
  • pages/login_page.dart – Login Screen

Neue Services & Provider:

  • services/calendar_service.dart
  • services/document_service.dart
  • services/file_upload_service.dart (Web + Mobile + Stub)
  • providers/auth_provider.dart
  • providers/document_provider.dart
  • widgets/integration_setup_dialog.dart
  • widgets/user_avatar_menu.dart

Neue Models:

  • models/calendar_event.dart
  • models/document.dart
  • models/integration.dart

Letzter Commit

eec9096 – feat: Integrate workmate_private into core_network with Google Calendar support


Session 2026-01-23 – Backend & Frontend Grundlage

Was implementiert wurde

Backend Setup (Komplett)

Database Layer:

  • User, Document, Task, File, Reminder, Session Models (SQLAlchemy)
  • ⚠️ metadatadoc_metadata (SQLAlchemy Reserved Word Konflikt)

Auth & Security:

  • app/core/security.py – JWT (Access + Refresh), Argon2 Password Hashing
  • ⚠️ bcrypt hatte Kompatibilitätsprobleme mit Python 3.13 → auf argon2-cffi gewechselt

API Endpoints:

  • POST /api/v1/auth/register, /login, GET /me, POST /logout
  • GET/POST /api/v1/tasks/, GET/PATCH/DELETE /api/v1/tasks/{id}

Docker Setup:

  • PostgreSQL (Port 5432), Redis (Port 6379), Backend (Port 8000), Celery Worker + Beat
  • SQLite für Dev, PostgreSQL für Prod

Flutter Frontend (Mockup-Phase)

  • Dark Mode Toggle, Accent Color Picker (SharedPreferences)
  • Drawer Navigation, Settings Page, Home Page mit Feature Cards

Wichtige Fixes

  • Argon2 statt bcrypt (Python 3.13 Kompatibilität)
  • Document.metadataDocument.doc_metadata (SQLAlchemy Konflikt)
  • withOpacity()withValues(alpha: x) (Flutter Deprecation)
  • color.valuecolor.toARGB32() (Flutter Deprecation)

Aktueller Gesamtstatus (2026-04-18)

Backend ✅ Weitgehend vollständig

Feature Status
Auth (JWT + Argon2) ✅ Fertig
Task CRUD ✅ Fertig
Document Upload + OCR ✅ Fertig
Claude AI Analyse ✅ Fertig
File Storage ✅ Fertig
CalDAV Integration ✅ Fertig
Google Calendar OAuth ✅ Fertig
Calendar Sync (bidirektional) ✅ Fertig
Reminder Engine (Celery) ⚠️ Implementiert, Tests ausstehend
Push Notifications ❌ Noch nicht implementiert
Email Notifications ❌ Noch nicht implementiert

Frontend ✅ Weitgehend vollständig

Feature Status
Login/Auth Flow ✅ Fertig
Dashboard ✅ Fertig
Task Management ✅ Fertig
Document Upload + Ansicht ✅ Fertig
Kalender-Seite ✅ Fertig
Integrations-Setup ✅ Fertig
Settings (Theme, etc.) ✅ Fertig

Infrastruktur

Feature Status
Docker Compose (Dev + Prod) ✅ Fertig
SQLite (Dev) ✅ Fertig
Alembic Migrations ✅ 2 Migrationen
Health Dashboard /health/ui ✅ Fertig
CI/CD Pipeline ❌ Nicht vorhanden
GitHub Repository (public) ❌ Noch nicht

Nächste Schritte (Priorität)

Sofort (April 2026):

  1. Reminder Engine testen – Celery Task tatsächlich mit echter DB-Frist testen
  2. Backend testen – API Endpoints durchgehen, Edge Cases prüfen
  3. Frontend-Backend Integration – Prüfen ob alle Seiten korrekt mit dem Backend kommunizieren

Kurzfristig (Mai 2026 – MVP):

  • Push Notifications (Firebase/OneSignal)
  • Email Notifications (SMTP)
  • Deployment auf Prod-Server (SSL + Domain)
  • Beta-Tester onboarden (1 Freund bereits bestätigt)

Mittelfristig:

  • GitHub Repository public machen
  • CI/CD Pipeline (GitHub Actions)
  • Onboarding Flow für neue User

Technische Details

Stack (aktuell im Einsatz)

Backend:    Python 3.13, FastAPI 0.115.x, SQLAlchemy 2.0, Alembic 1.14
Auth:       JWT (python-jose), Argon2 (argon2-cffi)
DB Dev:     SQLite
DB Prod:    PostgreSQL (docker-compose)
Queue:      Celery 5.4 + Redis 5.2
AI:         Claude API (anthropic 0.47+)
OCR:        Tesseract (pytesseract 0.3.13)
Calendar:   caldav 1.3.9, Google API Client
Frontend:   Flutter (Web + Android)
State:      Provider

Environment (.env)

DATABASE_URL=sqlite:///./workmate.db
SECRET_KEY=<change-in-production>
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
CLAUDE_API_KEY=<your-key>
GOOGLE_CLIENT_ID=<your-id>
GOOGLE_CLIENT_SECRET=<your-secret>

API Dokumentation (wenn Backend läuft)


Wichtige Notizen

  • ⚠️ Projektname: workmate_private (ADHD-Tool) – NICHT workmate_backend (WorkmateOS ERP für K.I.T. Solutions)
  • Kalender-Integration ist Phase-2-Feature, wurde aber vorgezogen und ist bereits fertig
  • Document Processing Pipeline ist fertig – OCR + Claude AI funktioniert