Skip to content
Driptanil.
← Selected works
Personal Product / Developer Tool

Feature Book

A documentation workspace where an agent writes the docs and a human keeps editing them. Next.js 15 and Nextra 4 render the site; a BlockNote editor persists every page to Postgres; and an MCP server lets Claude document a codebase straight into the workspace — point it at a repository, approve the page tree, and the pages land where they stay editable in the browser.

Organisation
Personal Product / Developer Tool
Surfaces
5 features
Stack
7 tools
/projects/feature-bookScreens
Feature Book
Feature Book — screen 2
01What it does
01

MCP Documentation Server

Claude connects over OAuth 2.1 with dynamic client registration — no key to paste. The client discovers the authorization server from an unauthenticated 401, registers itself, and the token it receives is scoped to the workspaces that user belongs to and nothing else.

02

Section-Level Updates

Docs are updated one section at a time: `getPageOutline` for the block id, then `updatePageSection`. The call never carries the rest of the document, so an edit cannot silently drop a paragraph it was not asked about.

03

Conflict Detection

`updatePageSection` refuses with a conflict rather than reverting a page that moved between the read and the write — the agent is told to re-read instead of overwriting a human edit.

04

Persisted Block Editor

BlockNote in two forms — embeddable in MDX pages, and persisted to Postgres under `/projects`. Every page has read-only version restore points, and the page tree lives in the layout so it survives navigation.

05

Revocable Access

Every connected client is listed under Settings → MCP access, named after the client. Revoking one is a click and stops that client immediately without touching the others; headless clients get a personal access token from the same panel.

02What I did
  1. 01Enforced a hard server boundary: `app/` never imports Prisma, it calls `server/actions`. Everything server-only lives under `server/`, with `lib/` as the shared middle importable from both.
  2. 02Built round-trip verification for the editor: `blocks:check` pushes a document through a real editor instance and diffs it, catching blocks the editor would silently drop.
  3. 03Added `sections:backfill` and `sections:verify` to re-derive every page's Section rows and prove they still reassemble into the original document.
  4. 04Found and fixed an untypechecked corner of the repo — `tsconfig` included only `**/*.ts`, leaving the four scripts that write to the database unchecked; one had been silently broken by bad import paths.
  5. 05Documented a schema-migration route that avoids Prisma's shadow database, which would otherwise create and drop against an instance whose public schema belongs to another app.
03Built with
NextJSReactTypeScriptTailwindCSSPostgreSQLPrisma ORMShadCN