Front end, back end and database
The three parts of a web app, and where each one lives in your project.
Most web apps have three parts. A restaurant is a handy comparison:
| Part | What it does | In a restaurant | In your project |
|---|---|---|---|
| Front end | What people see and click | The dining room and menu | Pages in src/app/ (React + Tailwind CSS), shown in the browser |
| Back end | Logic that runs on a server, out of sight | The kitchen | Server code in src/app/ (Next.js server components, server actions, route handlers), run by Vercel |
| Database | Where information is kept between visits | The pantry and the order book | Supabase (Postgres) |
How a typical action flows
Someone fills in your sign-up form (front end) → the server checks it (back end) → it's saved in a table (database) → the page shows "Thanks!" (front end).
Who's allowed to see what
Your front end talks to the database with a publishable key — safe to be public, because the database itself decides who can see each row, using Row Level Security rules. That's why every table must have them (Safety checks), and why the powerful secret key never goes in your app.
To add a new kind of information, ask your agent for the add-data skill. For pages and styling, it uses frontend-ui.