Back to blog
Sep 06, 2026
7 min read

Why every serious app needs a back end you cannot see

The front end is the part you can inspect, change, and lie to. A later stop on the roadmap is the half that has to assume you are lying: the server, its rules, and how a login actually keeps a password safe.

This stop on my roadmap took the longest to click, because it is the part you never see. The front end is everything in your browser. The back end is a separate computer, somewhere else, running code you cannot open, view, or edit from the page. For a while I could not see why you would even need it. Then it landed: the front end can be trusted with nothing, and the back end is where the trusting happens.

The front end is a menu, the kitchen is elsewhere

Picture a restaurant. The menu, the table, the person taking your order, that is the front end. You can read it, point at it, even scribble on it. But the kitchen is out back. You do not walk in and cook. You do not get to decide the bill. The kitchen takes your order, checks it against its own rules, and sends food out.

A web app works the same way, and for the same reason: anything in the browser can be changed by whoever is using it. A price shown on the page, a “you are an admin” flag, a hidden field, all of it can be edited by anyone who opens the browser’s developer tools. So the real rules cannot live there. They live on a server the user cannot touch.

  • The back end is a server, a computer that is always on, running your code away from the user.
  • It holds the real rules, talks to the database, and decides what each request is actually allowed to do.

What the server actually does with a request

When your front end sends a request, the server runs through a short, always-the-same routine before it answers.

flowchart LR
  R[Request comes in] --> V[Check it is allowed and valid]
  V --> L[Run the business logic]
  L --> D[(Read or write the database)]
  D --> A[Send an answer back]

The middle step, the business logic, is just the rules of your app written as code: work out the total, check the item is in stock, refuse the order if the card fails. To organise this, most people use a small framework. In JavaScript that is Express, which runs on Node.js (the thing that lets JavaScript run on a server instead of only in a browser). You do not have to use JavaScript, Python and Java are just as common on the back end.

The server exposes its abilities as a set of addresses called endpoints, the server side of the REST API from the last stop. Each one is a door for a specific job:

app.get("/products", (req, res) => {      // someone asks for the product list
  const products = db.getProducts()        // read from the database
  res.json(products)                        // send it back as JSON
})

app.post("/orders", (req, res) => {         // someone tries to place an order
  if (!req.body.itemId) return res.status(400).json({ error: "no item" })
  const order = createOrder(req.body)       // the business logic runs here
  res.json(order)
})

IMPORTANT

Notice the highlighted line: the server checks the request before trusting it. This is the whole reason the back end exists. Validating on the front end is a nicety for the user. Validating on the back end is the only validation that actually counts, because the front end can be bypassed.

How a login keeps a password safe

Authentication, proving who you are, is the clearest example of why the back end matters, and it hides one rule that beginners get wrong in a way that is genuinely dangerous.

Here is the login flow. You send your email and password. The server checks them, and if they match, it hands back a token or sets a session (a record that says “this browser is now logged in as this user”). Your browser sends that back on every future request, so you do not log in again on every click.

flowchart LR
  U[You send email + password] --> S[Server checks them]
  S -->|match| T[Server issues a session or token]
  T --> B[Browser sends it on every request]

The dangerous part is what the server stores. It must never save your actual password. Instead it saves a hash, the output of a one-way function that scrambles the password into something you cannot reverse. When you log in, it hashes what you typed and compares the two hashes. If the database ever leaks, the attacker gets scrambled hashes, not passwords.

CAUTION

Storing passwords as plain text is the single most damaging beginner mistake on the back end. If you can read a user’s password in your own database, you have already failed. Always hash, with a purpose-built tool like bcrypt or Argon2, never a plain “encrypt” you rolled yourself.

Two more words you will meet, kept simple:

TermQuestion it answersExample
AuthenticationWho are you?Logging in with email and password
AuthorizationWhat are you allowed to do?A normal user cannot open the admin page
SessionA server record of a logged-in browserDeleted the moment you log out
JWT (token)A signed pass the server can check without a lookupCommon for APIs and mobile apps

Passing one does not pass the other. You can be authenticated (logged in) and still not authorized (allowed) to do a particular thing, and the server checks both, every time.

The tools you actually reach for

All free and open-source. Pick one language and stick with it while learning.

JobPopular toolsNote
Server frameworkExpress (Node), FastAPI/Django (Python), Spring (Java)All free/OSS
Password hashingbcrypt, Argon2Never store plain passwords
Full auth setupPassport, Lucia, or a hosted one like Auth0/ClerkHosted saves time, costs money at scale

The half that has to assume the worst

The lasting idea from this stop is a shift in trust. The front end is built to please the user. The back end is built assuming the user might be an attacker, and that difference is not paranoia, it is the job. Every rule that matters, every check that protects data, and every password lives back here precisely because the front end can be rewritten by anyone looking at it.

Build the front end for the honest user, and the back end for the dishonest one.

Sources

Read next