App Anatomy
Asha tells her AI builder "my saved items disappear", and it redesigns the pantry screen three times. The screen was never the problem: nothing was being stored. Knowing the parts of an app lets you point at the right one, and a precise pointer gets a precise fix.
The rule
Every app is screens, logic, data and outside services — know which you mean.
- Screens (the front end) — what runs on the user's device: pages, buttons, forms. Anyone can open the browser's tools and read this code, so nothing secret belongs here.
- Logic (the back end, or server) — code on a machine you control: building the prompt, calling the model, enforcing rules and limits.
- Data (the database and file storage) — whatever must survive a closed tab: pantry items, allergies, later favourites.
- Outside services — things you rent instead of build: the AI model, sign-in, email, payments. You reach them with secret keys that stay on the server.
Hosting ties them together: it is where your front end and server run so people can reach them.
| Part | In Pantry Pal |
|---|---|
| Screens | Item list, "Suggest dinners" button, three dinner cards |
| Logic | Build the prompt, call the model, remove allergens |
| Data | Saved pantry items and allergies |
| Services | The AI model; later, sign-in and email |