❯ Consumer · Platform · 2024
Family Kitchen
A mobile-first kitchen management system for households: inventory with expiration intelligence, meal planning, and an allergy vault under a Kingdom metaphor.
The problem
Household food apps usually model one cook with a shopping list. A family is different: several people with different permissions, allergies that matter per person, and a pantry that only works if someone records what left it. Family Kitchen treats the whole household as the user.
The approach
A mobile-first app with a FastAPI backend on GCP Cloud Run and Firestore for storage, under a hierarchical RBAC model dressed as a kingdom: Visitor, Worker, Prince/Princess, and King/Queen, each tier inheriting the permissions below it. Roles are enforced on every route, so a Visitor cannot edit inventory and a Worker cannot change household settings.
Architecture
- Flutter App
- FastAPI on Cloud Run
- OAuth2 + JWT
- Firestore
- Inventory Engine
- Allergy Vault
FLOWS
- Flutter AppRESTFastAPI on Cloud Run
- FastAPI on Cloud RuntokensOAuth2 + JWT
- FastAPI on Cloud RunCRUDFirestore
- FastAPI on Cloud Runexpiry logicInventory Engine
- FastAPI on Cloud Runconflict checkAllergy Vault
Auth is OAuth2 plus JWT with 15-minute access and 7-day refresh tokens,
JTI-based blacklisting, refresh rotation, and audit logging; PII is encrypted
at rest with AES-256-GCM through Secret Manager. Inventory tracks best_before
dates plus max and total use counts and raises configurable expiring-soon
alerts. The allergy vault keeps a per-user allergen registry against a
known-allergen database, and recipe creation runs a conflict check that blocks
a recipe when it would expose a kingdom member. The Flutter app holds a SQLite
offline cache with a sync manager, scans barcodes with ML Kit, and wakes in
the background for notifications.
Key decisions
The kingdom as an authorization model
Role names a child understands, enforced with real permission checks underneath.
Conflict detection at creation time
Blocking a bad recipe before it is saved beats a warning at dinner time.
Offline-first client
The kitchen does not lose data when the Wi-Fi drops mid-recipe.
Encrypted PII with key rotation
Allergen data is personal data; Secret Manager keeps the keys out of the container image.
What I'd do differently
The sync manager was the last piece written and it shows: conflict resolution was underspecified when the offline cache shipped. I would design the sync protocol before the cache, with an explicit last-write-wins rule per field.