What is a Server?
A server is a computer program that provides functionality to other programs or devices, called clients. When you build a frontend application, it runs in the user’s browser. A backend server runs on a remote computer and responds to requests from many different clients.
Key differences between frontend and backend:
- Frontend code runs in the user’s browser
- Backend code runs on a server computer
- Frontend can be inspected by users (open DevTools)
- Backend code is private and secure
- Frontend handles user interface
-
Backend handles data processing and storage

Server Responsibilities
Servers handle three main responsibilities:
1. Data Storage
- Servers connect to databases to store information permanently
- They ensure data persists even when users close their browsers
- They manage who can access what data
2. Business Logic
- Servers process data according to your application’s rules
- They perform calculations and transformations
- They enforce constraints (e.g., “users can only edit their own posts”)
3. Security
- Servers keep sensitive information private (API keys, passwords)
- They authenticate users (verify who they are)
- They authorise actions (check what users can do)
Client-Server Architecture
In web applications, the client (frontend) and server (backend) communicate over the internet using HTTP. The client sends requests, and the server sends responses. This happens every time you:
- Load a webpage
- Submit a form
- Click a “Load More” button
- Log into an application