The three apps¶
MealMind builds into three separate Android apps from a single Flutter codebase. They share the Firebase project, the data model and most of the code. Each one has its own entry point, launcher name and application ID, so all three can be installed on the same phone.
--flavor user
MealMind
Check in, order, track, pay.
Anyone can sign up --flavor chefMealMind Chef
The live kitchen queue.
Role: chef or admin --flavor adminMealMind Admin
Menu, users, roles and analytics.
Role: adminAt a glance¶
| App | Entry point | Flavor | Application ID | Who can sign in |
|---|---|---|---|---|
| MealMind | lib/main_user.dart |
user |
com.example.demo |
anyone (sign up / Google) |
| MealMind Chef | lib/main_chef.dart |
chef |
com.example.demo.chef |
role chef or admin |
| MealMind Admin | lib/main_admin.dart |
admin |
com.example.demo.admin |
role admin |
flowchart LR
subgraph Shared["Shared code"]
B["core/app_bootstrap.dart<br/>Firebase + CartProvider"]
RG["staff/role_gate.dart<br/>role-checked login"]
end
U["main_user.dart"] --> B
C["main_chef.dart"] --> B
A["main_admin.dart"] --> B
C --> RG
A --> RG
U --> UH["UserHome<br/>login → QR check-in"]
RG -->|chef / admin| Q["AdminOrderQueueScreen"]
RG -->|admin| S["AdminShell<br/>5 tabs"]
Roles¶
A user's role lives in users/{uid}.role:
| Role | Customer app | Chef app | Admin app |
|---|---|---|---|
(none) / user |
✅ | ❌ | ❌ |
chef |
✅ | ✅ | ❌ |
admin |
✅ | ✅ | ✅ |
The chef and admin apps share RoleGate. Signed out, it shows a staff login screen. Signed in, it reads the user's role and
shows either the app or an Access denied screen with a sign-out button. Admins change roles from the admin app's Users tab.