Technical Documentation
How Writan works under the hood. This section explains the architecture, data model, and AI generation pipeline.
Architecture
- The Node Tree Architecture — The hierarchical data model that structures every story
- Data, Generation & Output Layers — The three layers that exist on every node
- Database Schema — The PostgreSQL schema (projects, nodes, pips)
- Store Architecture — Zustand stores, local-first sync, and data flow patterns
AI & Generation
- How AI Generation Works — The generation endpoint and prompt composition (partial)
- What Data Feeds Into Generation — How context is composited from the node tree (partial)
Feedback & Analysis
- The Pip System — The universal feedback surface (craft pips implemented)
- The Writing Rules Engine — 27 mechanical rules with client-side detectors