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:

LayerService
Frontend (web)Cloudflare Pages
Backend API (FastAPI, Python)Cloudflare Containersnot Cloud Run. Cloud Run was a planned Phase 2 in v1 and never actually used; v2 skips it entirely.
Edge router / lightweight endpoints / authCloudflare Workers (Hono) sitting in front of Containers
Object storageR2 (already partially wired)
VectorsVectorize (≤5M vectors for MVP)
SecretsCloudflare Secrets Store (already partially wired)
Realtime / WebSocket / YjsDurable Objects (when collab is needed)
Background jobsCloudflare Queues + Workers, or in-Container workers

Open forks (not yet closed)

  1. Editor: BlockNote vs Tiptap-with-own-shell. Both ProseMirror-based; BlockNote gives block-with-stable-id natively.
  2. 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.
  3. kai-ai language. Greenfield enough to choose TS or Python. Depends on the harness decision above.
  4. 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.
  5. v2 repo 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.

On this page