Section 1 · What is a backend

The half of the app users never see

Frontend is the shopfront; backend is the warehouse and the staff. Let's see why you need both.

🎯 In one line: the frontend runs in the user's browser and shows things; the backend runs on a server you control and holds the data + rules.

1Why can't the frontend do everything?

The Notes apps you built kept data in the browser (or a mock). That falls apart the moment you want:

The golden reason Anything in the browser is fully visible and editable by the user (you saw this in the security discussion). So the source of truth — the real data and the rules — must live on a server the user can't tamper with. That server is the backend.

2Frontend vs backend

FrontendBackend
Runs onthe user's browsera server (a computer you control)
Built withHTML, CSS, JavaScript, ReactNode/Express (or Python, Java, Go…)
Jobshow the UI, react to clicksstore data, enforce rules, answer requests
Talks tothe backend, via fetcha database; replies with JSON

3The conversation between them

🧑‍💻 BrowserReact app
→ fetch →
🖧 ServerExpress API
→ query →
🗄️ Databasethe notes

The frontend asks ("give me the notes"), the backend answers (reads the database, sends JSON back). That request/response conversation is the entire relationship — and it's what you'll build next.

🧠

Quick check

1. Why must the real data & rules live on the backend, not the browser?
The user controls their browser fully, so the trustworthy copy of data and the rules live server-side.
2. The frontend talks to the backend using…
fetch sends HTTP requests to the backend's API and receives JSON replies.
3. Which is a backend job?
Persistence, sharing and rules are backend responsibilities; visuals are frontend.
🔓 You're reading a free chapter of Backend (Node) — the first two are open.
Unlock the rest of this course with a one-time payment.
Unlock this course →
🔓 See course prices