You’ve spent four levels writing queries against a local Postgres. The L5
capstone wraps that database in an API and a UI, then deploys both behind a
custom domain. Every box in the stack has to talk to its neighbors. The
sooner you can see the whole picture, the easier the rest is.
You hit http://localhost:3000 and the page renders from :8000. Same shape
in prod, just different hostnames.
Try it
Draw the architecture diagram for the L5 capstone, including:
Where the database lives in dev vs prod
The two domains (1pride.app, app.1pride.app)
The ETL job that refreshes data each week
A failure case: what happens if the API is down?
Five minutes with a pen. The goal is to be able to talk through the whole
system on a 30-second whiteboard.
Common mistakes
Putting the API and the UI in one process. Tempting for “small”
projects, painful the moment you want to deploy them independently. The
L5 architecture has them split.
Skipping the ETL step and reading nflverse directly from the API.
Every page load downloads parquet files. Don’t.
Storing secrets in the frontend.NEXT_PUBLIC_* env vars ship to the
browser. The DB URL must never have a NEXT_PUBLIC_ prefix.
No CORS config. Browser blocks calls from the UI to the API. FastAPI’s
CORSMiddleware solves it — the L5 capstone already wires this up.
Quick check
Why Postgres instead of just reading parquet files in the API?
Why FastAPI in front of the database instead of letting the UI query it
directly?
What gets refreshed by the weekly ETL — the schema, or just the rows?