Case study
Book Studio: writing an illustrated book as a team
A Next.js app where a team writes, illustrates and reviews a book together, with an AI assistant and a connector for people's own Claude.
- My role
- Sole engineer
- When
- Oct 2026
- Status
- Live
- Stack
- Next.js 16, React 19, Tailwind 4, Supabase, TipTap, Claude API, MCP
1
editor per page at a time, with conflict-safe saves
4
roles per book, enforced in the database
The problem
The company is writing an illustrated non-fiction book as a team. Shared Word files make it easy for two people to overwrite each other, for pictures, captions and sources to drift away from the text they belong to, and hard to see who changed what.
What I built
A private workspace where the book is Book → Chapter → Section → Page, with a picture library per book:
- access per book (owner, editor, commenter, viewer), enforced by row-level security on every table, the file storage and the live channels
- live updates and presence, so everyone sees who is where and can ask for a page
- every editing session saved as a version, compared word by word and restorable
- Word drafts and Excel outlines imported with a preview first; export to Word with embedded fonts, a print-ready PDF, a designer package and a status report, all built in the browser
- an AI assistant whose edits, new pages and captions arrive as suggestions an editor accepts or rejects
The hard part: two people, one page
Opening a page takes a lock that is refreshed every 30 seconds, released when the editor leaves or after 10 minutes idle, and handed over when someone asks. Saves go through one database function that refuses anyone not holding the lock and returns a conflict instead of overwriting when the text changed underneath. Text typed while offline is kept and saved on reconnect.
Use it from your own Claude
The app is also a remote MCP server: people add it to their own Claude and work on the book from there. Sign-in uses Supabase Auth's OAuth 2.1 server, so Claude discovers it, registers itself and sends the person through the normal login and a consent screen. Anything Claude changes becomes the same reviewable suggestion as the in-app assistant's, so no AI edit reaches the book without a person accepting it.
Limits
One editor per page is a deliberate trade-off: it rules out lost work, but two people can't type in the same page at once. Comments and suggestions are how a second person works on a page someone else holds.