Skip to content

Latest commit

 

History

History
192 lines (166 loc) · 11.1 KB

1.0-ROADMAP.md

File metadata and controls

192 lines (166 loc) · 11.1 KB

TanStack CMS — 1.0 Feature-Gap Tracker

A working list of gaps in the 1.0 feature set, benchmarked against what mature CMS products (Payload v3, Sanity, Contentful, Strapi) ship at 1.0. Derived from a five-domain code audit (content modeling, editorial workflow + i18n, media/DAM, auth/API/ops, admin UX).

This is a planning/tracking doc, not published documentation. It lives at the repo root, not under docs/.

Legend

  • [ ] open · [~] in progress · [x] done

Wave 1 landed (local, on feat/events-hooks-system). Four features built in parallel (isolated worktrees), merged sequentially, full pnpm test:pr green across all 27 projects: conditional fields, shareable preview tokens, non-image media + metadata + library search, and soft-delete/trash. Merge notes: media and soft-delete both claimed SQLite migration v9 → soft-delete renumbered to v10; preview relied on a cmsHead({ noindex }) option that didn't exist → added to core SEO. Postgres paths are typecheck-verified only (no live DB locally) — run the Postgres conformance suite with POSTGRES_TEST_URL before release.

Wave 2 landed (local, on feat/events-hooks-system). Field-level i18n, user→role mapping + DB-auth provider, and editorial collaboration (comments + assignment + notifications), built in parallel worktrees and merged sequentially; full pnpm test:pr green across all 27 projects. These branched off the pre-wave-1 base, so integration renumbered colliding migrations (SQLite settled at v9 media, v10 soft-delete, v11 i18n, v12 user-roles, v13 comments; Postgres v3 soft-delete, v4 user-roles, v5 comments) and reconciled one semantic conflict: soft-delete made delete reversible, so comments now cascade on purge, not on trashing (a trashed doc keeps its comments for restore). Same Postgres caveat applies.

Wave 3 landed (local, on feat/events-hooks-system). Assets phases 2–3 (orphan-sweep cron, focal-point crops, dual-read removed), webhooks routed through the durable outbox, an expanded admin audit/activity log, and admin dark mode + ⌘K command palette — built in parallel worktrees, merged sequentially, full pnpm test:pr green across all 27 projects. Migrations now run through SQLite v15 (audit generalize) / Postgres v7. Release-note behavior changes: webhook delivery is now at-least-once (dedupe on x-cms-delivery; with events.dispatch: 'manual' a drain must be scheduled), and a crashed upload's bytes are reclaimed by the opt-in orphan sweep. Same Postgres-live-DB caveat.

  • Tier 1 — would fix before calling it 1.0 (table-stakes / data-safety)
  • Tier 2 — strongly expected editorial ergonomics
  • Tier 3 — polish users will notice
  • Tier 4 — production/enterprise; mostly deferrable

Intentional non-goals (not gaps)

These surfaced as "absent" but are owned design decisions. Keep them documented so they don't read as oversights:

  • GraphQL — REST + OpenAPI 3.1 by design.
  • Hosted cloud / content lake — it's a library you deploy with your app.
  • Real-time co-editing — optimistic concurrency (CONFLICT on stale save) instead.
  • Built-in auth/login/MFA — strictly bring-your-own auth.getUser. (But see the user→role mapping item in Tier 2 — that is a real gap within the BYO model.)

Tier 1 — 1.0 blockers

  • Non-image media assets. Upload hard-rejects anything that isn't PNG/JPEG/GIF/WebP/AVIF/SVG (packages/core/src/server/media.ts:160). Add video, audio, PDF, and generic files (sniff + size-limit + sanitize path, skip image-transform for non-images). Touches core media, media-s3, and the admin upload/preview UI.
  • Media as a first-class collection. Media is currently inline URL strings on documents; there is no asset document to edit metadata once or reuse centrally. findMediaUsage() exists but has nothing to link into. Design: DESIGN-assets-as-collection.md. Phase 1: asset is a real document collection (bytes in the MediaAdapter, referenced via a new asset field, /api/media/<id> preserved, governed like content, where-used via findReferences, media ops rewritten as wrappers, media→asset migration). Phases 2–3: orphan-sweep cron job, focal-point-aware crops, and the media-table dual-read removed (image formalized as the URL-valued image-asset specialization). Remaining pre-release cleanup: drop the media table itself (a later step per the design).
  • Media library search/filter + richer metadata. Grid is capped at 120 items with no search/filter (packages/ui-react/src/components/editor/image-field.tsx). Assets carry alt + dimensions only (MediaRecord in packages/core/src/storage/types.ts); add caption, credit, tags, description, and search/filter over them.
  • Soft delete / trash / restore. delete_document purges immediately — the one irreversible action in a system otherwise built on reviewable, revisioned writes. Add deletedAt + trash view + restore. Contrast with the existing revision restore, which only covers edits, not deletes.

Tier 2 — editorial ergonomics (strongly expected)

  • User → role mapping system (BYO-provider-agnostic). The engine already maps role → permissions (ROLE_PERMISSIONS, custom defineCms({ roles }), auth.defaultRole in packages/core/src/lib/auth.ts). What's missing is the user → role layer and any in-admin visibility into who has access. Two complementary deliverables:
    • Generalized user→role mapping that works with any provider: map an external identity (provider user id / email) to a CMS role, editable in the admin. auth.getUser stays the source of identity; the CMS owns the role assignment and a management screen. This is the "sophisticated auth" path (Clerk/Okta/Better Auth own the user table; we own the mapping). Shipped: auth.roleMapping: 'fallback' | 'override', user_roles store, "Who has access" settings screen.
    • Optional simple DB-driven auth provider (official package) that owns a user table and ships a full user-management / invite screen — the batteries-included path for apps without an external IdP. Shipped: createDbAuth({ secret }), scrypt hashing, invite tokens, "Users" screen.
  • Field-level localization + locale fallback chains. Today: document-level locale variants + manual translationOf (packages/core/src/schema.ts, CmsI18nConfig in config.ts). Missing: per-field translation, fallback chains (en-GB → en-US → en), and a "list untranslated" query. If i18n stays a headline feature, this is the expected depth. (Alternatively: scope the i18n claim down in docs.) Shipped: localized: true fields with per-locale value maps + CmsLocale.fallback chains. (Note: top-level fields only; where-filtering on a localized field and "list untranslated" remain follow-ups.)
  • Editorial comments / annotations. Reviewers can approve/reject but can't leave feedback on a doc or field. No Comment/Thread model exists. Shipped: threaded, resolvable comments (one level deep), in editor + review queue.
  • Assignment / ownership + notification adapter. Events + outbox infra exists (packages/core/src/events.ts, OutboxOps) but there's no assignee concept and no built-in email/Slack on "entered review." Add an owner/assignee field + a notification handler (last mile on existing infra). Shipped: _assignee/_owner, "assigned to me" filter, review.submitted + document.assigned events, defineCms({ notifications }) seam.
  • Conditional fields. Show/hide a field based on another field's value — common modeling need, absent from the schema/field system.
  • Shareable draft preview tokens. Preview is authenticated-admin only (packages/ui-react/src/routes/p.$id.tsx). Add tokenized links so an unauthenticated stakeholder can view a draft.

Tier 3 — polish users will notice

  • Admin dashboard / landing — no home screen; the content list is the entry point. Add recent activity, stats, quick actions.
  • Dark mode for the admin — public UI is themeable via --cms-* vars; the admin is hard-coded light.
  • Drag-drop block reordering + nested blocks — reorder is ↑/↓ buttons (packages/ui-react/src/components/on-page/page-content.tsx); blocks are a flat array (no nesting).
  • Command palette — no global quick-action/search bar. (Shipped: ⌘K, registry-driven navigate/create actions + document search.)
  • Saved / named views — column config is localStorage-only, not named or shareable.
  • Menu / navigation builder — nav is derived from page collection metadata (sidebarLabel/sidebarOrder), not editable as a content model.
  • Inline-create of related docs in the relation picker (packages/ui-react/src/components/editor/relation-picker.tsx).

Tier 4 — production / enterprise (mostly deferrable)

  • Route webhooks through the durable outbox. Coherence gap: async event handlers ride the transactional outbox, but webhooks are best-effort and lost on process exit (packages/core/src/server/webhooks.ts). Routing delivery through the same outbox closes it and is in-scope for the events system already built.
  • Audit log beyond review decisions. No record of API-key creation, settings changes, or auth events (login / failed attempts). Matters for compliance contexts. (Review-queue decisions are audited via AuditRecord.)
  • Observability — pluggable logger + basic /health only. Optional: metrics (Prometheus), tracing / OpenTelemetry, deeper health checks.
  • Multi-tenancy / environments / dataset branching — one CMS instance = one dataset + one auth provider. Current guidance is separate deployments per env. Likely post-1.0.
  • API-key permission-level scoping + rotation — keys scope to collections + role only; no per-operation scoping, no rotation endpoint (revoke + create).

Well-implemented (for reference — no action)

Schema-as-code with 20 field types, custom field types, validation (context-aware

  • Standard Schema), relations with reverse-reference queries, singletons · drafts
  • revisions + restore, scheduled publish/unpublish, review queue with diff + audit
  • optimistic concurrency, bulk publish/unpublish/delete · RBAC per-collection and per-field · API keys (hashed, scoped), CSRF, rate limits, SVG sanitization · events
  • outbox + dead-letter, signed webhooks · OpenAPI 3.1 + typed client + stable error codes · cursor/offset pagination, filtering, sorting, sparse fieldsets · MCP / WebMCP · export / import / backup · admin i18n, a11y (ARIA + keyboard), mobile-responsive, content-list search/filter/sort/bulk.