Frontend vs backend
The frontend is what runs on your device. The backend runs on servers, stores the data and applies the rules.
Every app has two halves. One you can see and tap. The other you never see at all. Developers call them the frontend and the backend.
What they are
The frontend runs on your device: the screens, buttons and forms. The backend runs on servers. It stores the data, applies the rules, and talks to the database.
How they work
When you tap buy, the frontend, built with HTML, CSS and JavaScript, sends a request to the backend. The backend checks the stock, records the payment, saves the order and replies. Then the frontend shows the confirmation. The two talk through an API.
Why it matters
Anyone can change what runs on their own device, so the backend must never trust the frontend. Prices, permissions and secrets get checked on the server.










