Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 11.3 KB

README.md

File metadata and controls

66 lines (48 loc) · 11.3 KB

Examples & Starters

TanStack CMS examples are organized by the 14-row starter architecture (starters/README.md and starters/catalog.json). To pick a starting point for a new project, walk the Choosing a Starter flowchart or run the select-cms-starter skill.

Run any workspace example with pnpm --filter <name> dev.

Delivery modes (#1–#2)

Modes describe how an app is consumed or operated. Unless the deliverable is only a backend or only the canned admin, pick a class starter first and apply the mode on top.

Mode Catalog ID Representative / Path Port What it shows
#1 Headless / API-only backend (mode) headless-api starters/headless-api 3031 One schema served over REST, typed client, and MCP with token auth and S5 contract parity.
#2 Admin-only CMS — no frontend (mode) admin-only starters/admin-only — The canned admin over a representative schema: search, filter, bulk edit, relations (S1 dogfood baseline).

Application classes (in flowchart order)

Class Catalog ID Representative / Path Port What it shows
#3 Existing app adds CMS later existing-app starters/existing-app — Embedding the CMS into an existing TanStack Start app on its own DB, session, and routing (S7).
#9 Multi-site / multi-tenant / agency fleet multi-tenant-fleet starters/multi-tenant-fleet — Two tenants on one deployment, template provisioning, and the S8 cross-tenant isolation suite.
#12 Generated app — user/AI-defined schema, forms & views runtime-tables starters/runtime-tables — Runtime schema defined in plain language, metadata-generated views, and reviewed schema changes (S2, S3).
#8 E-commerce / storefront & catalog ecommerce-storefront starters/ecommerce-storefront — Products, variants, persisted cart, customer actor auth, and native checkout path (S4, S5).
#11 Team internal / ops app team-ops starters/team-ops — Staff-only team workflow with field-level RBAC, approval chain, audit trail, and zero public surface (S3, S4).
#10 Bespoke domain app on the CMS database contact-cards starters/contact-cards — People + relationships schema, card + timeline views from Headless UI Primitives, staged /agent writes, /ask, and Review-only admin (S1, S3, S5).
#6 Editorial publication editorial-publication starters/editorial-publication — Multi-author draft → review → schedule workflow, member ≠ staff auth (S4), paywall tier, and email issue delivery.
#14 Gated membership, course & community membership-course starters/membership-course — Course enrolment, drip unlock, per-member lesson completion state machine, and quiz/certificate (S4, S6).
#13 Directory / listings / marketplace directory-listings starters/directory-listings — Untrusted front-end listing submissions, moderation/claim flow (S3, S4), and faceted + geo search homepage.
#7 Documentation / knowledge base / help centre documentation-kb starters/documentation-kb — Two product-release versions of a doc set, hierarchical sidebar nav, and cross-version search (S2).
#5 Personal blog & portfolio personal-blog blog 3003 Single-author static/SSG blog and pages, RSS, blocks, AI editing, and the Playwright E2E suite (pnpm test:e2e).
#4 Themed marketing / SMB site themed-smb-site starters/themed-smb-site — One theme, brochure pages, contact form, live preview, and SEO basics — the canned-admin acceptance test (S1, S6).

Reference apps (banner products — read for patterns, do not clone as starters)

Banner apps are complete, deployable products that prove the architecture at full product depth. Never clone a banner app to start a new project — start from its class's starter (contact-cards for #10, runtime-tables for #12).

Banner App Class Starter to clone instead Path What it shows
PRM (prm) #10 Bespoke domain app contact-cards app/prm Agentic personal CRM: recall people by what they do, deep-snoop enrichment with per-field provenance, groups & events, read-only /ask Q&A chat, and hosted MCP (/api/mcp). See app/prm/SCOPE.md.
Data (data / TanStack Base) #12 Generated app runtime-tables app/base Self-hosted AI-customizable database appliance with runtime collections, reviewed schema mutations, live-query viewers, and coffee-shop onboarding. See app/base/SCOPE.md.

Feature & data-layer examples (pre-existing)

These focused examples predate the 14-row starter catalog and demonstrate specific library capabilities. Under the naming rule, the TanStack DB examples use the db- prefix (db-sqlite, db-federated) so "Data" refers exclusively to the Class #12 banner app (app/base).

Example Port Class mapping & rename status What it shows
blog-voting 3004 Capability demo on #5 (personal-blog) Adding a custom collection (votes), server functions, and an extra route alongside the CMS routes.
picks 3023 Capability demo (faceted search) Standalone faceted search controls over a CMS guitar-pick catalog, with optional flag-gated AI.
db-sqlite 3021 Data-layer demo (renamed from data-sqlite) A CMS collection as a live, writable TanStack DB collection, next to the admin.
db-federated 3022 Data-layer demo (renamed from data-ecommerce) One live query joining CMS copy with mocked PIM, pricing, and inventory services.

See Data Layer with TanStack DB.

Migration pairs

Each *-after app sits next to the source it was migrated from, so the conversion is visible side by side, and each carries a MIGRATION.md with its field map and gap report:

Pair Ports Source format & skill
payload-before → payload-after 3010 → 3011 Payload v3 + SQLite (Lexical rich text over REST API). Skill: payload-to-tanstack-cms.
astro-starlight-before → astro-starlight-after 3012 → 3013 Astro Starlight Markdown/MDX docs on disk. Skill: astro-starlight-to-tanstack-cms.
emdash-before → emdash-after 3014 → 3015 EmDash blog (Portable Text JSON in seed/seed.json). Skill: emdash-to-tanstack-cms.
wordpress-before → wordpress-after — → 3016 WordPress WXR export (HTML + Gutenberg blocks). Skill: wordpress-to-tanstack-cms.

emdash-before is a standalone npm project outside the pnpm workspace, and wordpress-before is an export file rather than an app; see their READMEs.