Skip to content

System map

Single reference for what the system is and how components connect. For ADRs see decisions/. Deeper topics: cache, logs, runtime, maintenance.


High-level map

┌─────────────────────────────────────────────────────────────────────────────────┐
│                              CepatEdge                                           │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                  │
│   ┌──────────────┐         ┌──────────────────────────────────────────────────┐   │
│   │   Browser    │  HTTPS  │           Cloudflare Edge (global)              │   │
│   │   (Users)    │────────▶│  ┌─────────────┐    ┌─────────────────────┐   │   │
│   └──────────────┘         │  │ Pages (SPA) │    │ Workers (Hono API)   │   │   │
│                            │  │ React (Vite)│    │ Auth, Me, Maintenance│   │   │
│                            │  └──────┬──────┘    └──────────┬──────────┘   │   │
│                            │         │                      │               │   │
│                            │         │              ┌───────▼───────┐       │   │
│                            │         │              │ Durable Obj  │       │   │
│                            │         │              │ Sessions +   │       │   │
│                            │         │              │ Cache (DO)    │       │   │
│                            │         │              └───────┬───────┘       │   │
│                            └─────────┼──────────────────────┼───────────────┘   │
│                                      │                      │                   │
│   ┌──────────────────────────────────┼──────────────────────┼──────────────┐   │
│   │         External services         │                      │              │   │
│   │  ┌────────────┐  ┌────────────┐   │   ┌────────────┐    │              │   │
│   │  │ Neon       │  │ R2         │   │   │ Email       │    │              │   │
│   │  │ PostgreSQL │◀─┼────────────┼───┼───┤ (notifications) │              │   │
│   │  │ (DB)       │  │ (Storage)  │   │   └────────────┘    │              │   │
│   │  └────────────┘  └────────────┘   │                      │              │   │
│   └──────────────────────────────────┴──────────────────────┴──────────────┘   │
│                                                                                  │
└─────────────────────────────────────────────────────────────────────────────────┘

Request flow

  1. User → HTTPS → Cloudflare Edge
  2. UIPages (React + Vite SPA); APIWorkers (Hono)
  3. Workers:
    • Auth (JWT + DO session)
    • Cache (DO) when applicable; on miss → Neon (Drizzle)
    • Files → R2; notifications → email provider
  4. Response back through the edge

Infrastructure by layer

LayerTechnologyPurpose
Edge / CDNCloudflareTLS, DDoS, routing, edge execution
Compute (API)WorkersHono: auth, me, maintenance, system
Compute (UI)PagesStatic / SPA frontend
State / cacheDurable ObjectsSessions, cache namespaces
DatabaseNeon (PostgreSQL)Users, requests, attachment metadata
Object storageR2Avatars, maintenance attachments
EmailConfigurableNotifications

Public URLs (production)

RoleDomainApp
Marketingcepatedge.comapps/landing
Product SPAapp.cepatedge.comapps/web
APIapi.cepatedge.comapps/worker
Docsdocs.cepatedge.comapps/docs
Git analyticsgit.cepatedge.comapps/git

Auth cookies (.cepatedge.com) apply to app + API only. See guides/domains.md.


Component map

ComponentLocationDepends on
API routesapps/worker/src/routes/Services, middleware
Authservices/auth/JWT, cookies, DO session
Meroutes/me/, services/me/Auth, R2 avatar, DB
Maintenanceroutes/maintenance/, services/maintenance/Auth, DB, cache, R2
Cacheservices/cache/Durable Objects
Storageservices/storage/R2 bindings
DBlib/db/ (Drizzle)Neon
Mailerservices/mailer/Email provider

Data flow summary

  • Auth: Login → DB creds → DO session → cookie (JWT + session id). Later: cookie → DO session + JWT verify.
  • Maintenance: Workflow writes → DB; DO cache for reads when enabled; attachments → R2 + DB metadata.
  • Avatar: Upload → R2 + DB path; GET → R2 stream.
  • Backups: Neon backups; optional R2 copies — see Runbook.

Where to go next