Preserve explicit model and provider architecture (#30)

This commit is contained in:
Stephan D committed 2026-09-12 12:09:26 +02:00
1 parent 54f50ad6b7
commit 8b0662e340
10 files changed
+104 -7

No files matched your search

+18
View File
@@ -8,6 +8,24 @@
- For cross-module work, apply every relevant scoped instruction file and
completion workflow.
## Data and state architecture
Preserve explicit **DTO → mapper → service → data model → provider → UI**
boundaries across the project. This is a standing requirement for application
features, shared packages, stub services and future mobile clients.
- DTOs describe transport data; mappers convert it to/from domain data models.
- Services own external I/O and use mappers. Service contracts return data models,
never transport DTOs or untyped response maps to the UI.
- Data models remain distinct from provider state and transport serialization.
- Providers sit on top of services, coordinating loading, errors and state and
exposing models to the UI. Widgets render models and invoke provider actions.
- Keep reusable domain models, services and providers in shared packages; clients
compose them rather than copy business logic or create alternate data paths.
- Preserve these boundaries when replacing stubs with real backend adapters.
Review every changed feature against them before delivery. Apply the detailed
frontend requirements in `frontend/AGENTS.md` to all Flutter clients/packages.
## UX
For any user-facing interface work, follow the