Lesson 6 · How web apps workFrontend vs backend: what’s the difference?
What visitors see, and what works behind the scenes.
Every web app has two halves: the frontend people see and click, and the backend that keeps information safe and does the work behind the scenes. Learn how they talk to each other, so you can ask the AI for exactly what you need.
About 8 minutes to readLast updated
On this page
Every web app has two halves
Think of a restaurant. The dining room is where guests sit, read the menu and place an order. The kitchen is where the order is cooked, the stock is kept and the bill is worked out. Guests never walk into the kitchen, but nothing reaches the table without it.
A web app works the same way. The frontend is the dining room: what people see in their browser and what they click. The backend is the kitchen: where information is kept and handled, out of sight. When you vibe code, you describe both halves in plain words and the AI builds them, so knowing which half a feature lives in helps you ask for exactly the right thing.
The frontend: what visitors see
The frontend is every part of your site that appears on a screen. It runs in the visitor’s browser, on their phone or computer.
- Pages and layout: the home page, the menu, the sections and how they sit together.
- Buttons and forms: everything a visitor can press, tick or type into.
- Text, pictures and colours: your words, your brand and your style.
- Mobile: most visitors arrive on a phone, so the frontend has to look great at every size.
The backend: what works behind the scenes
The backend is the part of your app that visitors never see. It runs on a server, not in the visitor’s browser, which is exactly why it can be trusted with things that must stay private.
- A database: where bookings, orders, messages and accounts are kept, so they are still there tomorrow.
- Accounts: sign up and log in, and which person is allowed to see what.
- Emails and payments: a confirmation email when someone books, a payment when someone orders.
- Keeping data safe: secret keys stay on the server, and access rules decide who can read or change each piece of information.
How a web app works, from click to database
Here is one booking form, followed from the visitor’s click to the owner’s inbox. The same journey happens for a login, an order or a message.
- The visitor fills in the formThe frontend shows the form in their browser and checks the obvious things, such as an email address that looks right.
- The frontend sends the detailsWhen they press the button, the details travel to the backend, and the backend’s rules decide what may be saved and by whom.
- The backend saves themThe booking is stored in the database, so it is still there tomorrow and the owner can see every booking in one place.
- The backend does the extra workIt can send the owner an email, take a payment or update an account, using keys that never leave the server.
- The answer comes backThe backend replies, and the frontend shows the visitor a clear “Thank you, you’re booked” message.
Where does a login fit in?
Signing in touches both halves. The frontend shows the sign-up and login forms. The backend checks the password, remembers who is signed in, and keeps each person’s information apart from everyone else’s.
That last part matters most. A member should see their own bookings, never someone else’s. In a well-built app that rule lives in the backend, next to the data, so it holds even if someone tries to get round the frontend.
How 3Edit builds both halves
In 3Edit you describe what you want and watch the frontend appear in the live preview as it is built. A simple site needs no database, so you can start with the frontend alone.
When your app needs a backend, you connect your own Supabase: a full Postgres database in your own account. The 3Edit Agent then builds the backend parts too: logins and roles, database tables and access rules in your Supabase, server routes, and payments and email using your own keys. Your project is standard Next.js code, and it’s yours.
Which half is this feature in?
Before you ask the AI for something new, sort it into a half. It makes your prompt clearer, and it tells you when you need a backend.
| You want | Frontend | Backend |
|---|---|---|
| A bigger, brighter booking button | Yes | No |
| A new “About us” section | Yes | No |
| A contact form that emails you | The form | Sending the email |
| Saved bookings you can look through | The form and the list | The database |
| Members who log in | The login screens | Accounts and access rules |
| Taking payments | The checkout page | The payment, with your own keys |
Try it in 3Edit.
Start a new project, paste the first prompt, and look at the result in the live preview. Then paste the second one and see how the AI explains your app back to you.
- 1Build a frontend
Build a one-page website for Bloom & Co, a florist in Greenwich, London. Sections: a welcoming hero with a “Request a bouquet” button, three bouquet styles with prices from £35, how ordering works in three steps, and a contact section with opening hours. Warm, fresh and modern, and easy to use on a phone.
- 2Ask which half is which
Explain my website to me in plain words: which parts are frontend, and which features would need a backend? Don’t change anything yet.
- 3Add a backend feature
Add a “Request a bouquet” form with name, email, phone, preferred delivery date and a message. Before you build it, tell me what the frontend and backend parts will be and whether I need to connect a database.
The third prompt is where a backend comes in: the form needs somewhere to keep every request. The next lesson shows how to tell, every time, whether you need a database.
Do it step by step.
This lesson explains the what, the why and the when. These guides and pages show every click.
- Create your 3Edit accountCreate your account, confirm your email and sign in to the desktop app, ready to build.Read the guide
- Connect SupabaseYour backend’s database: create your free Supabase account, then connect it to 3Edit in a few clicks.Read the guide
- AI Website Building and Vibe Coding: Class SlidesThe slides from our free London class, including frontend and backend made simple.See the slides
Next: Does my website need a database?
About the author.
Written by Humayun Rashed, founder of 3Edit. He also runs 3Edit’s free in-person AI website building and vibe coding course in London.
Questions people ask.
The frontend is the part of a website people see and click in their browser: pages, buttons, forms, text and pictures. The backend runs on a server out of sight: it keeps information in a database, handles accounts and logins, sends emails, takes payments and keeps data safe.
No. A simple site that only shows information, such as a portfolio or a one-page business site, can be frontend only. You need a backend when visitors log in, save, book, order or post something that must be kept.
Yes. The database is where the backend keeps information such as bookings, orders, messages and accounts. In 3Edit, the database is your own Supabase, a full Postgres database in your own account.
No. In 3Edit you describe what you want in plain words and the 3Edit Agent builds the backend parts: logins and roles, database tables and access rules in your own Supabase, server routes, and payments and email using your own keys. Knowing which half a feature lives in simply helps you ask clearly.
Always the backend. Anything in the frontend can be seen by anyone who opens your site, so secret keys belong on the server only. The security basics guide explains this step by step.
Start vibe coding today.
Download 3Edit for Mac or Windows and build your first professional website in minutes.