What the back end does

Servers, APIs and databases — what happens behind every app, and what back-end developers build.

Module 1: Back-end foundations · Lesson 1 of 26 · 13 min read · Free

When you tap Pay in a banking app, the app on your phone (the front end) doesn't move any money. It sends a request to a server: a computer in a data centre running code that a back-end developer wrote. That code:

  1. checks who you are (is your login token valid?),
  2. checks you're allowed to do this (is it your account? do you have enough money?),
  3. reads and updates a database,
  4. maybe talks to other services (an SMS provider, a payment network),
  5. sends back an answer — usually in a fraction of a second.
Client, API server and database

The three parts you'll build with

  • The API (Application Programming Interface) — the set of URLs your server answers, such as GET /api/menu or POST /api/orders. Front ends, mobile apps and other servers talk to it.
  • Business logic — the rules: delivery fees, discounts, who can see what, what counts as a valid phone number.
  • The database — where data lives permanently: users, orders, payments.

Why the rules must live on the server

Anything running on a user's phone or browser can be changed by that user. If the front end calculated the price and the server trusted it, anyone could send “total: ₦1” with DevTools. So the back end:

  • re-checks every input, even if the front end already did,
  • calculates prices and totals itself, from its own database,
  • keeps secrets (database passwords, Paystack secret keys) where users can never see them.

What you'll use in this course

  • Node.js — runs JavaScript on the server. The same language as the front end.
  • Express — the most widely used Node.js framework for building APIs.
  • SQL with SQLite — built into Node.js, so there's nothing complicated to install; the same SQL works with PostgreSQL and MySQL in production.

By the end of the course you'll have built a complete food-ordering API with a database, validation, accounts, logins and admin actions.

More free lessons: Install Node.js and use the terminal · Asynchronous code: promises and async/await · HTTP: requests, responses and status codes · Designing a REST API · Designing tables and relationships · Storing passwords safely · Automated tests and project structure