This page mirrors the full v2 architecture table from Migration > V2 direction summary so the architecture snapshot is visible from the Contracts rail.
It is a contract review surface, not a silent lock. Rows that conflict with newer accepted Blockdata direction are called out below.
Full architecture v2
Cloudflare end-to-end. Specifically:
| Layer | Service |
|---|---|
| Frontend (web) | Cloudflare Pages |
| Backend API (FastAPI, Python) | Cloudflare Containers — not Cloud Run. Cloud Run was a planned Phase 2 in v1 and never actually used; v2 skips it entirely. |
| Edge router / lightweight endpoints / auth | Cloudflare Workers (Hono) sitting in front of Containers |
| Object storage | R2 (already partially wired) |
| Vectors | Vectorize (≤5M vectors for MVP) |
| Secrets | Cloudflare Secrets Store (already partially wired) |
| Realtime / WebSocket / Yjs | Durable Objects (when collab is needed) |
| Background jobs | Cloudflare Queues + Workers, or in-Container workers |
Open forks (not yet closed)
- Editor: BlockNote vs Tiptap-with-own-shell. Both ProseMirror-based; BlockNote gives block-with-stable-id natively.
- chattr's role. Locked v1 memory says "chattr + kai-ai is the agent harness." User opened the door to: keep chattr Python as an HTTP-callable service, swap harness for Mastra (TS, MIT, adopt-not-build). Not yet pinned.
- kai-ai language. Greenfield enough to choose TS or Python. Depends on the harness decision above.
- Apache AGE vs ArangoDB vs Zep-only for the KG. Zep covers the temporal-KG slot for v2 MVP; AGE/ArangoDB only enter if Zep's graph proves insufficient. Defer.
v2repo name. "writing-system-v2" is placeholder. May ship under a different product name.
Reconciliation needed before lock
- Backend host: the source table says Cloudflare Containers; the current accepted Blockdata runtime ADR says Fly.io for the backend foundation.
- Auth: the source table says Workers/Hono + Better Auth; the template-base direction keeps auth open between Better Auth and Python JWT/OAuth.
- Secrets: the source table says Cloudflare Secrets Store; the current repo contract locks SOPS-only secret handling.
- Vectors: the source table says Vectorize; the template brings Milvus plus other vector-store options, while Blockdata has not locked the vector backend yet.
- Background jobs: the source table says Cloudflare Queues plus Workers or containers; the template brings Celery plus Redis, and the final job runner is not locked.
- Billing: Stripe is required, but plan shape, webhook host, and cutover timing are not locked.
- Observability: the final logging/tracing stack is not locked for the Fly/backend-template path.