This phase adds the responsive app shell, placeholder home dashboard, and the full settings/definitions module across Flutter and Node.js.
- Base path:
/api/v1/settings - Auth: existing in-house JWT middleware in
backend/src/core/middleware/auth.middleware.js - Firestore storage:
users/{uid}/settings/{entity}/items/{docId}
The original prompt used users/{uid}/settings/{entity}/{docId}. Firestore alternates collection and document segments, so this implementation stores entity metadata at users/{uid}/settings/{entity} and the actual records in that entity's items subcollection.
- Single-field descending index on
createdAtfor each settingsitemssubcollection - Composite index on
groupId + subGroupIdfor products - Composite index on
townId + sectorIdfor customers - Composite index on
townIdfor sectors
See firestore.indexes.json for a starting point.