# Frontend and Backend

A division between the user-facing software that presents and collects information and the server-side software that applies shared rules and manages protected resources.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-23
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/frontend-and-backend/>)

## What it means

Frontend and backend describe responsibilities in an application. The frontend runs in or near the user's interface and handles presentation and interaction; the backend runs in a controlled environment and provides data, business capabilities, authentication, and integrations. The boundary is architectural, not necessarily one language, repository, team, or server.

## Why it matters

The distinction helps teams place responsibilities according to user experience, security, performance, reuse, and operational needs. A clear contract lets interfaces change without exposing protected data or duplicating important rules across every client.

## When to use it

Use the terms when discussing responsibility boundaries in web, mobile, or desktop products backed by services. Avoid treating them as a complete architecture: server-rendered pages, edge functions, local-first apps, and backend-for-frontend services can distribute work differently.

## How it works

1. Define the user interactions, shared business capabilities, data, and trust boundaries in the product.
2. Assign presentation and device-specific behavior to the frontend while keeping authoritative rules and secrets in controlled backend systems.
3. Connect the parts through documented APIs, events, or server-rendered responses.
4. Validate and authorize every backend operation without trusting frontend enforcement.
5. Observe the full interaction across rendering, network calls, backend processing, dependencies, and user-visible outcomes.

## A practical example

A travel app's frontend displays search controls and immediate form feedback. Its backend checks live availability, applies pricing rules, authorizes payment, and stores bookings. The frontend can improve its layout without moving authoritative fare calculation into downloadable client code.

## Where it breaks

The labels can hide several layers, services, and ownership boundaries. Network separation introduces latency and failure, while excessive separation creates chatty interfaces. Moving code to the frontend does not make sensitive data or rules trustworthy, because users control their clients.

## Common mistakes

- Equating frontend with a browser and backend with one physical server.
- Enforcing authorization or important business rules only in client-side code.
- Designing a backend directly around one screen so every interface change breaks its contract.
- Using the boundary as an organizational handoff that prevents end-to-end product ownership.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/frontend-and-backend/#visualization-frontend-and-backend>)

## Sources

1. [How the Web Works](<https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Web_standards/How_the_web_works>) — MDN Web Docs · Official technical documentation
2. [Server](<https://developer.mozilla.org/en-US/docs/Glossary/Server>) — MDN Web Docs · Official technical documentation

## Related topics

- [Client and Server](<https://wiki.soroush.uk/topic/client-and-server/>)
- [Application Programming Interface \(API\)](<https://wiki.soroush.uk/topic/application-programming-interface/>)
- [Request and Response](<https://wiki.soroush.uk/topic/request-and-response/>)
