GENAI 102
M02 · L04
The Server Side

Backend Basics

The backend is the server — the part your users never see. It runs the logic, enforces the rules, and guards the data behind everything the frontend shows.

01 / 08
GENAI 102
M02 · L04
Four Jobs

What the Backend Does

Whatever the app, the server side keeps coming back to the same handful of jobs.

  • Business logic — the rules of your app
  • Auth — who is allowed to do what
  • Talking to the database — reading and writing stored data
  • Exposing an API — the endpoints the frontend calls
02 / 08
GENAI 102
M02 · L04
The Core Loop

Request → Response

The backend receives a request, checks permissions, does the work, and returns data — usually as JSON.

One-line example
GET /tasks/this-week → check the user, read the database, return the list as JSON
03 / 08
GENAI 102
M02 · L04
Trust Boundary

You Can’t Trust the Browser

Anything sent to the browser, the user can change — the code, the data, every value client-side. So security, secrets, and the source of truth must live on the server, where the user cannot reach them.

The rule
Validate and enforce on the server — never rely on the frontend to keep anyone honest.
04 / 08
GENAI 102
M02 · L04
Builder’s View

Small, but Understood

A small backend can be a handful of endpoints. A coding agent can scaffold it for you in minutes — but you still need to understand auth and where secrets live, so you don’t ship something unsafe.

05 / 08
GENAI 102
Build It
From Concept to Capstone

Build It

How to implement: list the 3–4 actions your tool needs the server to do — for example “add a task,” “list this week,” “summarize.” Those become your API endpoints.

  • Weekly AI Tasks tracker — the backend holds the messaging webhook, the LLM calls, auth, and the database access. It is where the real logic lives.
  • Personal brand site — a static site often needs no backend at all. Recognizing that saves cost and complexity (a Module 4 tradeoff).
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

The backend runs the logic, handles auth, talks to the database, and exposes an API. It exists separately because the browser can’t be trusted — secrets and the source of truth belong on the server.

08 / 08