Pepper & Carrot AI-powered flipbook · Part 7 — Building a Typed REST API: From Database to JSON
Post 7 of the Pepper & Carrot AI flipbook series. With one episode sitting in Postgres + LocalStorage from Post 5, it's time to surface it. Build two typed FastAPI routes — list episodes and episode detail — that resolve relative storage keys into absolute URLs at response time via the Storage Protocol, with the OpenAPI spec as the wire-format contract. By the end you have two endpoints returning episode JSON your browser can consume.