Back
Architecture Overview
High-level system design, boundaries, and data flow.
System diagram
Monorepo with a Next.js frontend, BFF (API routes), and a Postgres DB. Async workers handle webhooks and long-running jobs via a queue (e.g., SQS/Redis). CDN caches static assets at the edge.
Key boundaries
- Frontend ↔ BFF: typed contracts, rate limits, and auth middleware.
- BFF ↔ DB: parameterized queries and migrations.
- BFF ↔ 3rd parties: circuit breakers and retries with jitter.
Non-functional requirements
- Availability 99.9%, RTO 30m, RPO 15m.
- Latency p95 < 300ms for key flows.
- Cost budget tracked monthly with alerts.