Start here14 min readBadge: Stack Mapper

How apps work: front end, back end, database

The parts of every web app and the words for them, so you can describe what you want and understand what the AI built.

A restaurant, not a box

Think of a web app as a restaurant. The front end is the dining room: what customers see and touch. The back end is the kitchen: where orders are checked and prepared. The database is the pantry and the order book: where everything is stored. The API is the waiter carrying orders between them.

  • Front end (client): the pages, buttons and forms in the browser or phone app.
  • Back end (server): code that runs on a computer you control, checks permissions and does the work users mustn't be able to tamper with.
  • Database: organised storage for users, posts, orders and anything else that must be remembered.
  • API: the agreed way for one piece of software to ask another for something.

The three languages of the web page

  • HTML: the structure. Headings, paragraphs, buttons, images.
  • CSS: the look. Colours, fonts, spacing, layout. Tailwind is a popular way to write CSS with short class names.
  • JavaScript: the behaviour. What happens when you click, type or load. TypeScript is JavaScript with labels (types) that catch mistakes early.

Frameworks and packages

Almost nobody builds from scratch. A framework is a ready-made structure for building apps: React is the most popular for interfaces, and Next.js builds on React to handle pages, server code and fast loading. (This very website is built with Next.js.)

Packages are reusable pieces of code other people publish. npm is the package registry for JavaScript; a project's package.json lists the packages it uses. When the AI says 'install a package', it means adding one of these.

Where code runs: your computer, the terminal and the cloud

While building, the app runs on your own computer (local development, usually at an address like localhost:3000). The terminal (or command line) is the text window where you run commands such as npm install or npm run dev.

When you deploy, the app's code is copied to computers in the cloud so anyone can use it at a real web address. Environment variables are settings and secrets (like database keys) that the app reads at run time, kept outside the code.

Sign-in: authentication and authorisation

Authentication answers 'who are you?' (signing in). Authorisation answers 'what are you allowed to do?' (permissions). Apps need both. A common vibe-coding bug is checking permissions only in the front end, which anyone can bypass. Real permission checks live in the back end or the database.

Key terms

Front end
The part of an app people see and touch: pages, buttons, forms.
Back end
Code on a server that checks permissions and does work users mustn't tamper with.
Database
Organised storage for everything an app must remember.
API
An agreed way for one piece of software to ask another for something.
HTML
The language for a web page's structure: headings, paragraphs, buttons, images.
CSS
The language for how a page looks: colours, fonts, spacing, layout.
JavaScript
The programming language that makes web pages interactive.
TypeScript
JavaScript with types that catch mistakes before the code runs.
Framework
A ready-made structure and toolkit for building apps.
React
The most popular JavaScript library for building interfaces from components.
Next.js
A React framework for pages, server code and fast loading, made by Vercel.
npm / package
npm is the registry of reusable JavaScript code; each reusable piece is a package.
Terminal (command line)
A text window where you run commands like npm install.
Localhost
Your own computer acting as the server while you build, e.g. localhost:3000.
Environment variable
A setting or secret the app reads at run time, kept outside the code.
Authentication
Checking who someone is (signing in).
Authorisation
Checking what a signed-in person is allowed to do.
See the full glossary

Try it

Take an app apart

  1. Pick an app you use daily (a food delivery app works well).
  2. List what lives in its front end, its back end and its database.
  3. Name two APIs it probably calls (payments, maps, messages).
  4. In any web page, right-click and choose Inspect to see its HTML and CSS.

Ask an AI tutor about this guide

Copy a prompt into ChatGPT, Claude or Gemini to go deeper. Check what it tells you against the guide.

Study with an AI tutor: copy this whole guide with tutoring instructions, then paste it into your AI assistant.
  • Explain it like I'm 12
  • Quiz me (5 questions, one at a time)
  • Show me a real example for my situation
  • What do beginners get wrong?

Knowledge check

Five questions. Get 4 right to earn the Stack Mapper badge. You can retake it as often as you like.

Question 1 of 5

In the restaurant picture, the database is:

Finished the How software works guides? Take the How software works track test for ten mixed questions.

My notes

Write what clicked, what confused you, and what you want to try. Saved in this browser only.

Learn it live

Digital Builders University runs small live workshops where you build something real with an instructor beside you, starting with Vibe Coding 101.

See workshops

Practise it

Last reviewed November 25, 2026. AI tools change fast; check each tool’s own site for current features, plans and prices.