Docs / Architecture
Architecture
One platform on webdefy.com, built in layers. Everything runs on Cloudflare (decision ADR-002).
| Layer | What it does | Runs on |
|---|---|---|
| Edge | DNS, TLS, caching, redirects, security headers | Cloudflare |
| Experience | Every page on webdefy.com: the app, the AI agency, docs | Astro on Cloudflare Workers |
| App API | Reactions, Keep, sign-in, health | The same Worker |
| Agents | Research, write, check and judge moments | Workers with Workflows and Queues |
| Pipeline | Quick checks every card passes before review | Python |
| Data | The Canon, Threads, kept moments, reactions | Neon Postgres with pgvector, through Hyperdrive; KV for caches |
| Admin | Review and approve moments | admin.webdefy.com, behind Cloudflare Access |
How a moment goes live
- AI drafts the line, why it mattered, and the source.
- Quick checks run: 6 to 14 words, a “why” line, an https source, the year in the source, nothing before 1969.
- A person reads it against the source and approves it.
- Approved moments appear on the site within five minutes.
AI rules
- Every model call goes through one gateway. No direct SDK calls anywhere else.
- Which model does which task is configuration, never code.
- The model that checks the writing is never the model that wrote it.
- Each task has a daily spend cap.
- No personal data is sent to a model.
Privacy by design
- Reactions are stored against a keyed, one-way voter hash, never an account or device id.
- Public reaction bands appear only after 20 reactions, never as exact counts.
- Your Rewind answers stay private and can be deleted at any time.
Shipping
Every change is a pull request with checks (types, unit tests, build, browser smoke tests, secret scan). Merging to main deploys to production.