Case study / Product / Independent
Kanonara
A novel-writing and publishing platform that remembers your canon.
- Role
- Designed, built and operated independently
- Period
- 2026 – present
- Status
- Live / Early access
- Type
- Product / Independent

01
The problem
Long fiction accumulates canon: who knows what, where everyone is, which rules the world obeys. Writing tools store the words but not the story, and AI writing tools generate text without understanding what has already been established. Continuity errors slip in between chapters and are expensive to find by hand.
The goal was a platform where the system understands and remembers the story while the author stays the single source of truth. AI may analyze, explain and suggest, but it must never change the story on its own.
02
Approach
Every saved chapter goes through the same loop. The chapter is analyzed to extract what happened, the result is compared with the existing story, new information comes back as proposals and possible conflicts come back as Story Doctor alerts, each linked to the passages behind it. The author accepts, rejects or edits each one, and only approved changes enter the story bible.
The system is a TypeScript monorepo: a Next.js app for authors and readers, a separate staff console, and a Fastify API over PostgreSQL, with shared packages for the database schema, shared types and tooling.
03
Architecture
- 1
Clients
Next.js apps; the reader renders the same fixed pages the author writes on.
- 2
API
Fastify, one folder per feature with routes, plain service functions and Zod schemas.
- 3
Story intelligence
Provider-agnostic AI layer with per-language model routing and a fallback chain.
- 4
Data & storage
Story entities keep their history instead of being overwritten.
04
Key decisions
- D01
Author approval is a hard boundary
AI output is stored as proposals, never applied directly. Canonical story data changes only through an explicit accept, reject or edit, which keeps the author in control and makes every change traceable.
- D02
Saving never depends on AI
Chapter saves are independent of analysis. If analysis fails or a provider is unavailable, the chapter stays saved and analysis can be run again later.
- D03
History instead of overwrites
Characters and relationships keep their history as the story moves, so questions like "where was this character at chapter 27?" have a real answer.
- D04
A provider-agnostic AI layer
Models are reached through one adapter with a fallback chain and per-language routing. A timed-out or malformed response moves on to the next model, and the safety check uses its own model so routing changes never swap the reviewer.
- D05
Contracts pinned by tests
Every implemented API route is covered by an HTTP contract suite, and browser end-to-end tests cover key author and reader flows.
05
Tradeoffs
- The approval step adds friction for authors, accepted deliberately so the system can never silently rewrite a story.
- A modular API in one deployable keeps operations simple; feature folders keep boundaries clear enough to split later if needed.
- Fixed A6 pages make pagination identical on every device at the cost of reflowable layouts.
06
Where it stands
- Live in early access, with a public library where readers can read without an account, and comment and react once signed in.
- Story bible, Story Doctor, timeline and relationship graph, world map, story memory search and publishing are available to approved writers.
- Manuscript export and full-book backup and restore.
- Page typesetting for 11 languages across seven scripts, including Myanmar, Thai, Han, Kana, Hangul and Devanagari.
The source code is private. This case study describes the architecture at a level that does not expose implementation or infrastructure details.
Stack
- Next.js
- React
- TypeScript
- Fastify
- Drizzle ORM
- PostgreSQL
- Zod
- OpenRouter
- Turborepo
- Playwright
- Docker
- Fly.io