API Feature Lab
Backend API design, one technique per page. Every page calls a real endpoint of this site's own API, shows the raw request and response, and the code behind it. A sibling of the Vercel, Cloudflare and Motion labs. 8 of 13 built so far.
How it's built
- Hono serves everything under
/api: small, typed, and built on web-standard Request and Response, so it runs on any platform. - Zod schemas validate every request and generate the OpenAPI document, so docs and code can't drift.
- Postgres through Drizzle: Neon in production, PGlite (Postgres in WebAssembly) locally and in tests.
- Next.js renders these pages; the API is mounted into it with one route file.
Foundations
HTTP semantics
Auth
Reliability
Idempotency keysRetry a POST safely: the second one changes nothing.Phase 4
WebhooksSigned deliveries with retries and verification.Phase 4
Streaming (SSE)Server-Sent Events for live progress.Phase 4
API styles
REST vs tRPC vs GraphQLThe same data through three API styles.Phase 5
Platform
One API, two platformsThe same Hono app on Vercel and Cloudflare Workers.Phase 6