Hello! This first module builds a foundation for understanding how a web application fits together before we look closely at its individual technologies. You have worked with backend routes; here, the goal is to locate those routes in the larger picture. By the end of this lesson, you should be able to assign a feature’s work to the browser, backend, or database, and explain why that division matters.
We will use a simple article library as a running example. Visitors can browse articles, while members can open restricted articles. The same reasoning applies to many applications, whether the screen displays an article, a product, or a report.
Three responsibilities, one feature
Imagine a visitor opening an article. What they experience is a single feature, but it involves distinct kinds of work.
The browser presents the interface and handles interaction. It displays the article list, responds when someone selects an article, and renders either the article or a message returned by the application. Its code runs on the visitor’s device.
The backend receives requests and decides what response to send. For a restricted article, it can check whether the requester is allowed to read it, retrieve the appropriate content, and return a result. A route handler in a Node.js application is one possible place for this work.
The database holds application records that must be available beyond one browser session: articles, users, and membership records, for example. It answers queries and stores changes requested by the backend. It does not decide how to lay out an article on a screen.
The short video below introduces these roles through a search example. As you watch, focus less on the particular website and more on who owns each decision.
Frontend, API, Backend and Database explained
Watch “Frontend, API, Backend and Database explained” by Tamara Jost for a compact example of how a visible user action depends on work in all three places.
Watch the frontend for the interface and its limits; the request for how an interaction reaches the backend; the database for stored records; and the response for how the result becomes something the browser can display. Notice that the API describes how the browser communicates with the backend; it is not a fourth place where application data lives.
An API is an interface through which one piece of software requests something from another. In this course, a browser will often use an HTTP API exposed by the backend. The backend may answer with JSON data, which browser code then renders. “Frontend, API, backend, database” is therefore not a list of four equivalent machines: the API is the agreed way of making requests and receiving responses.
Following an article request
Consider a browser that already displays a list of article titles. Someone selects a restricted article. One possible implementation works like this:
- The browser sends a request for that article and waits for the result.
- The backend identifies which article was requested and checks whether the requester may read it.
- The backend asks the database for the relevant article and membership records.
- The database returns matching records. The backend uses them to decide what response is permitted.
- The browser displays the returned article or an access message.
The browser can immediately hide a button or show a helpful message, but hiding a button is not access control. Someone can send a request without using that button. The backend must make the authoritative access decision before returning restricted content. Likewise, the browser may check that a form field is filled in for quick feedback, but the backend must still check submitted data before trusting it.
This diagram shows a related design in which server-side code builds an HTML page. Study the boundaries between components rather than treating every box as a required part of every application.

In an application with a JavaScript frontend and a Hono backend, the response might instead contain JSON, and browser code would build the visible page. The assignment of responsibilities remains largely the same: the browser presents and interacts; backend code handles the request and its rules; the database stores and retrieves records.
Read the MDN walkthrough to see both the HTML-generating version in the diagram and its note that a backend can return data instead.
Client-server overview - Learn web development | MDN
Read MDN’s “Client-server overview” for a more precise account of how a dynamic request passes through a web application and database.
In “Dynamic sites,” read the opening explanation, then the product example through the end of that subsection. Focus on the difference between stored product data and the page built from it. In “Anatomy of a dynamic request,” find the numbered walkthrough immediately after “After the coach submits the form with the team name and number of players.” Read steps 1–7, ending with the separate delivery of static files. Finally, in “Returning something other than HTML,” read the short paragraph beginning “Server-side website code does not have to return HTML” through other response types. Relate its mention of JSON to a browser that renders API data itself.
Notice two useful qualifications. First, not every request needs the database. A server can return a static image or a response that does not depend on stored records. Second, a database is not the same thing as the backend. The backend decides which records to request and what the application should do with them; the database stores records and executes the requested data operations.
Assigning features by asking what the work does
A feature may involve more than one component. Rather than assigning “article search” wholly to the frontend or backend, break it into jobs:
| Job in the article library | Primary responsibility | Why |
|---|---|---|
| Display a search box and the text being typed | Browser | This is visible interaction on the page. |
| Interpret a search request and choose what results to return | Backend | This is request handling and application behavior. |
| Find saved articles matching the search criteria | Database | This uses stored article records. |
| Display the returned titles and loading or error message | Browser | This presents the outcome to the visitor. |
| Decide whether a requester may receive a restricted article | Backend | The decision must be enforced beyond the browser UI. |
| Store article content and membership records | Database | These records must persist and be retrievable. |
This way of dividing work is useful in interviews because it explains more than “the frontend calls an endpoint.” It identifies where a decision is made, where its supporting data comes from, and where its result appears.
It also helps you reason about changes. Suppose a membership expires. The database needs an accurate stored record of the membership. The backend needs to use that record when deciding whether to return restricted content. The browser needs to display the resulting access state. Changing only the browser’s label would not actually revoke access.
A final distinction is temporary UI state versus stored application records. Text currently typed into a search box can live in the browser without being saved. An article that must still exist when another visitor opens the site belongs in persistent storage. Not every piece of browser state belongs in a database, and not every database value needs to be shown in the browser.
Conclusion
For any web feature, start with three questions: What must the visitor see or do? What must the application decide or enforce? What records must it store or retrieve? The answers usually point to the browser, backend, and database respectively. A single feature often needs all three, but each has a different responsibility.
Next, we will distinguish the technologies that fill these roles—such as a programming language, runtime, framework, UI library, and database—so you can describe not only where work happens, but also what each part of the stack provides.