All blocks

App template

Doc workspace

Write pages in a nested tree, move blocks by their handles, keep a database inside a page, and discuss the text in comments.

Edited 25 min ago
Status
In review
Owner
Maya Chen
Target date
Jan 16
Teams
EditorPlatform
This spec covers the first release of shared docs. Comments are open until Friday.

Problem

Teams write a spec in one place and track the work in another, so the two drift apart within a week. People stop trusting the spec, and decisions get made in threads nobody can find.

Goals

  • One page holds the why, the plan and the live task list.
  • Comments sit on the sentence they're about, and resolve when the text changes.
  • Everything works from the keyboard: / to insert, Esc to select blocks.
DatabaseLaunch tasks

Open questions

Do private pages show up in search for admins? @Ana Ruiz to confirm.
Pick the default cover set, see Type scale.
Out of scope for this release
  • Offline editing
  • Page history older than 30 days
Write it down once, and keep it true.

Research lives in Research notes. Questions go to @Theo Robinson.

Use this template

Installs the whole app into your project: its pages, routes, services with sample data, agent tools and the browser entry. Every file is yours to edit.

npx shadcn@latest add checkfu/uicontext/doc-workspace
  1. Run itLoad from your page’s script. It builds the app with createApp: the browser’s router, the agent tools, an offline notice, and sign-in when you turn it on. Inside an app that already routes, render DocWorkspace, which brings its own in-memory router.
  2. Connect your backendEvery read and write goes through Docs in . Implement it over your API and point DocsLive at your Layer.
  3. Make it yoursPages are one file per route. Delete the ones you don’t need, and the sample data in .

Screens

  • Start page

    /

    The workspace’s start page, the first thing people open.

  • Page

    /pages/:id

    Blocks with handles and `/`, an inline database, comments on a phrase, sharing, and the pages that link here.

  • Trash

    /trash

    Trashed pages with their subpages, to restore or delete for good.

  • Today

    /today

    Today’s note, made the first time you open it.

Where your backend plugs in

Pages never call a backend. They read through the queries in queries/ and write through Commands kept beside the component that runs them; both capture the Docs service. Implement its interface in over HTTP, a sync engine or a database client, then change one line:

export const DocsLive = Docs.sample
// becomes your Layer, such as
export const DocsLive = Layer.effect(Docs, makeHttpDocs)

The root provides it once, so every page shares one instance. Sign-in is one line: delete auth: false in once your backend serves the session routes, and the sidebar shows who signed in.

What to delete

  • services/seed.ts, and Docs.sample in services/Docs.ts
  • The trash, if pages delete at once: pages/trash/TrashPage.ts and the Trash route

To drop a screen, delete its file in pages/ and its route in ; TypeScript points at every link that still prints it. The agent tools are in .