Repository navigation
Closed
Labels
agent:blockedA station could not finish; see its last commentrisk:two-wayEasily reversedstate:in-progressThe looper is working it
Description
Problem
The README explains the architecture in prose (Start as the runtime, TanStack DB as the data layer, pluggable storage, agents going through a review queue), but it has no diagrams. A few Mermaid diagrams would make the system much easier to understand at a glance.
Acceptance criteria
- A new page
docs/architecture/overview.mdcontains five fenced```mermaiddiagrams, each under its own heading:- Overview: the Start app mounting the CMS via
cmsVirtualRoutes(), the operations registry in@tanstack/cms-api, and the surfaces that call it: admin UI, app loaders and components, HTTP/api/cms/v1, MCP/api/mcp, WebMCP, and the in-app content agent. - Data loading: in-process reads via Start server functions (
@tanstack/cms-api/start, no HTTP hop);createCmsCollectionOptions()(@tanstack/cms-client/db) feeding a live TanStack DB collection queried withuseLiveQuery, including a join with another service; and the read-onlymarkdownStorage()/loadMarkdownDir()path. - Data storage: the storage adapter boundary in
@tanstack/cms-corewithsqliteStorage(),d1Storage(),markdownStorage(),@tanstack/cms-store-postgresand@tanstack/cms-store-libsqlbehind it; per-collection storage; and the media path (local disk,@tanstack/cms-media-s3for S3/R2,sharpresizing). - Mutations: an optimistic TanStack DB write (
products.update(...)) →saveDoc→ CMS operations, showing validation, access rules, optimistic concurrency, revisions, hooks, webhooks, and rollback of the optimistic state on failure. - Agent writes and review: agent/MCP writes landing in the review queue, then draft → review → publish, including scheduled publish.
- Overview: the Start app mounting the CMS via
- The README's "Built on TanStack Start and TanStack DB" section gains one short summary Mermaid diagram (the overview, or a condensed version of it) and a link to
docs/architecture/overview.md. - Every function, package, route and option named in a diagram exists on
mainunder that exact name (each can be found withgrepinpackages/). A diagram must not show a step that the code doesn't perform; if a step's behaviour is unclear (for example, the exact order of hooks and access checks insaveDoc), follow the code inpackages/api/src/ops.ts/packages/core. - The new page is registered in
docs/config.jsonunder "Architecture & Auth", and the existingdocs/architecture/data-layer.mdandstorage.mdlink to the relevant diagram section. - Every Mermaid block is valid syntax (renders in the Mermaid Live Editor or on GitHub's markdown preview without a parse error).
pnpm test:docs(link verification) passes, and so doespnpm test:pr.
Out of scope
- Any change to source code, exports, APIs or behaviour. If a diagram exposes a mismatch between docs and code, document what the code does and note the mismatch in the PR description; don't fix the code.
- Rewriting the existing prose in the README or the architecture docs, beyond adding the diagram and links.
- Images or binary diagram assets (PNG/SVG) and new tooling or dependencies for diagrams.
- Changes under
.github/**and changesets (docs-only change, no package release needed).
Original report
The README explains the architecture in prose (Start as the runtime, TanStack DB as the data layer, pluggable storage, agents through a review queue), but there are no diagrams. A few visuals would make the system much easier to grasp at a glance.
Proposed diagrams
Mermaid blocks so they render on GitHub and stay editable in the repo:
- High-level overview: the TanStack Start app hosting the CMS (
cmsVirtualRoutes()), the operations registry in@tanstack/cms-api, and the surfaces that call it (admin UI, app loaders/components, HTTP/api/cms/v1, MCP/api/mcp, WebMCP, in-app content agent). - Data loading: how reads flow, both in-process via Start server functions (admin and loaders, no HTTP hop) and through
createCmsCollectionOptions()into a live TanStack DB collection queried withuseLiveQuery, including joins with other services and the read-onlymarkdownStorage()/loadMarkdownDir()path. - Data storage: the storage adapter boundary in
@tanstack/cms-coreand the adapters behind it (sqliteStorage(),d1Storage(),markdownStorage(), Postgres, libSQL/Turso), per-collection storage, and the media path (local disk, S3/R2,sharpresizing). - Mutations: an optimistic TanStack DB write (e.g.
products.update(...)) throughsaveDocand the CMS operations, showing validation, access rules, optimistic concurrency, revisions, hooks, webhooks, and how rollback happens on failure. - Agent writes and review: agent/MCP writes landing in the review queue, and the draft to review to publish flow (including scheduled publish).
Acceptance
- Diagrams added to the README (or to
docs/architecture/with a short summary diagram and links from the README). - Each diagram is checked against the current code so names match real functions and packages.
- Rendering verified on GitHub.
Metadata
Metadata
Assignees
Labels
agent:blockedA station could not finish; see its last commentrisk:two-wayEasily reversedstate:in-progressThe looper is working it
Activity
cms-triager commentedon Oct 30, 2026
Triaged as a docs-only change (two-way). I couldn't read the author association from the API in this run. The author,
jherr, wrote most of the commits onmain, and the issue hadstate:needs-triage, so I treated them as a maintainer. I chosedocs/architecture/overview.mdplus a README summary diagram, one of the two layouts the original report offered, so the README stays short.feat(core,api)!: coalesced change sets with stored strategy state, st…
feat(core,api,client)!: one event vocabulary — bus, webhooks and SSE …
feat(core,api): Phase 1 (partial) — auth & agent trust boundary (D3,D…
feat(core): Phase 1 complete — publicRead widening removed, demo-mode…