Architektur
Cross-Platform
Web, Mobile, PBZ — modulare Architektur
Cross-Platform Readiness — HonestCom Check
Stand: Nov 2026 · Modulare Architektur, keine Monolithen
Ziel
Eine HTTP-API koppelt Web und Mobile. Domäne framework-frei in lib/check; UI getrennt; PBZ eigener Bounded Context.
| Rolle | Zugriff |
|---|---|
| Kunde Check | Öffentlich |
| Kunde Vorbereitung + PBZ | publicToken |
| Berater | Session (nicht in Customer-OpenAPI) |
Bounded contexts
| Context | Repo (heute / geplant) | OpenAPI |
|---|---|---|
| Check | calc, content, types, validation/check.ts | paths/check-*.yaml |
| PBZ | pbz.ts, pbz-progress.ts (geplant, PR) | paths/pbz-patch.yaml |
| Lead / Dossier | dossier.ts, lib/db/lead-crypto.ts | Berater-API separat |
| Berater-Auth | lib/auth/*, Dashboard | nicht in honestcom-check.yaml |
Kopplungsregel: Mobile ↔ Web nur über dokumentierte /api/check/*-Routen.
Ziel-Struktur (Repo)
lib/check/ # Domain (framework-frei)
lib/validation/ # Zod pro Context
app/api/check/ # HTTP-Adapter dünn
components/check/ # Web-UI
openapi/ # Vertrag, paths check vs pbzPrinzipien
- Kein God-
route.ts— PBZ: eigene Route, Logik inlib/check/pbz.ts. - Kein God-Component — PBZ UI unter
components/check/pbz/. app/api/*importiert Domain; Domain importiert kein React/Next.
Stack-Empfehlung
| Option | Empfehlung |
|---|---|
| Expo + RN | Primär Mobile |
| Capacitor | Nur wenn Web 1:1 in Shell reicht |
| Flutter / rein Native | Nur mit shared check-domain Package |
Phasen
- Phase 0 (jetzt): Modulare Doku, OpenAPI-Split; PBZ Runtime offen (eigener PR).
- Phase 1: API-Stabilität, dünne Handler, OpenAPI-Diff vs. Production.
- Phase 2 (Doku): Monorepo-Skizze
packages/check-domain,apps/web,apps/mobile— ohne Zwang. - Phase 3: Universal Links, Offline-PATCH, Object Storage, Cron Reminder.
Details und Checklisten: Project Store docs/cross-platform-readiness.md (HonestCom Project).
Repo-Verweise
| Artefakt | Pfad |
|---|---|
| Modulgrenzen | docs/CHECK-MODULE-BOUNDARIES.md |
| Check-Konzept | docs/CHECK-KONZEPT.md |
| Mobile Hook (geplant) | lib/check/api-contract.ts (Cross-Platform-PR) |