Instruction file imported from pierreclaverkoko/vaxiil (
.cursor/rules/web-client-sync.mdc). Copyright stays with the author.
Web / mobile / backend sync
Before changing APIs or client models, read docs/web/implementation.md (Angular progress, shells, AI sync rules) and CONVENTIONS.md.
Client roles
- Flutter (
mobile/): primary mobile client; keep responsive Flutter web maintained. - Angular (
web/when present): dedicated full web product — consumer, business management shells, platform staff admin. - All clients use
/api/v1/+ JWT. Do not invent parallel JSON shapes per client.
On any API or DTO change
- Update backend serializers/views and run
uv run pytest. - Update Flutter models/repos (and tests); run
flutter testinmobile/. - Update Angular models/services (and tests) in
web/; runyarn test:ciandyarn lint(Yarn only, not npm). - After any Angular (
web/) code change, also runyarn ng build(orng buildinweb/) and fix compile/template errors before considering the work complete. - Update checkboxes/percentages in
docs/web/implementation.mdandIMPLEMENTATION.mdwhen behavior ships.
Contracts
- Choice fields:
{ "value", "title", "css" }— semanticcsstokens only; same mapping on Flutter and Angular; unknowncss→ safe fallback.titleis localized by the backend viaAccept-Language(en/fr); do not invent client title maps. - User-facing UI chrome must be translated (en/fr) — Flutter ARB, Angular
assets/i18n. See .cursor/rules/i18n.mdc. - Breaking JSON changes require an API version bump or coordinated mobile and web releases.
- Missing backend: mark UI blocked / empty-state — do not fake response shapes.
UI / design
- New web UI starts from
docs/design/(copy Stitch exports there if needed). Open matchingcode.html+screen.pngbefore implementing; do not invent alternate layouts. - Page vs modal: follow Flutter
modalOnWideparity (see .cursor/rules/web-design.mdc anddocs/web/implementation.md). - Business/staff features use management shells (
BusinessManageShell/PlatformStaffShell), not consumer phone chrome. - Feature parity: new user-facing capability needs Backend / Flutter / Angular status (or explicit
N/Awith reason).