@accord-cms/core
v0.1.1
Published
Self-hosted CMS engine, schema, fields, routing, and admin UI for TanStack Start and PostgreSQL
Maintainers
Readme
@accord-cms/core
To install dependencies: The core engine, database schema, field system, block builder, public routing, and Admin UI for Accord CMS.
Accord is a self-hosted, code-first CMS built on TanStack Start, PostgreSQL, and React 19.
Architecture & Features
- Code-First Truth: Collections, fields, and block schemas are defined in TypeScript. Database rows, Zod validators, and admin forms derive directly from your code.
- Transactional Versioning: Monotonic version snapshots on every item save with instant history diffs and one-click rollbacks.
- Embedded Admin UI: Mounts directly into your application at
/_cms/adminwith<CmsAdminRouter />and<AdminShell />. - Block Component System: Strongly typed nested blocks with responsive margin/padding/max-width controls and live visual editor.
- Model Context Protocol (MCP): Native AI agent support exposing tools for content querying, creation, updating, and route resolution.
- PostgreSQL & Drizzle: Native PostgreSQL backing using Drizzle ORM.
- BetterAuth: Complete authentication with role-based access control (RBAC).
Installation
bun install
# Bun
bun add @accord-cms/core
# pnpm
pnpm add @accord-cms/core
# npm
npm install @accord-cms/coreTo run: To scaffold a complete project with all routes, components, and schema configured, use the CLI:
bun run index.ts
bunx @accord-cms/cli create my-accord-appThis project was created using bun init in bun v1.3.9. Bun is a fast all-in-one JavaScript runtime.
Subpath Exports
@accord-cms/core provides modular sub-path exports:
| Export | Description |
| ------------------------------ | --------------------------------------------------------------------------- |
| @accord-cms/core | Core engine, runtime handlers, input schemas, and types |
| @accord-cms/core/admin | Built-in React Admin UI router, shells, and editor components |
| @accord-cms/core/server | Server configuration (defineCmsConfig) and media providers |
| @accord-cms/core/schema | Drizzle PostgreSQL schema definitions (cms_items, cms_assets, etc.) |
| @accord-cms/core/fields | Field types (text, number, image, relation, blocks, slug, etc.) |
| @accord-cms/core/components | Block definitions (defineComponent, defineBlock) and responsive helpers |
| @accord-cms/core/routing | Route registry (defineCmsRouteRegistry) |
| @accord-cms/core/lookup | Runtime route resolution (resolvePublicRoute) |
| @accord-cms/core/auth | Server auth utilities and RBAC checks |
| @accord-cms/core/auth-client | Client auth session hooks and helpers |
| @accord-cms/core/media | Media abstraction and reference tracking |
| @accord-cms/core/mcp | Model Context Protocol server tools and handlers |
| @accord-cms/core/pages | Page layout and mutation helpers |
Peer Dependencies
Ensure your project installs the required peer dependencies:
react&react-dom(>= 19.0.0)@tanstack/react-start&@tanstack/react-routerdrizzle-orm(pinned to0.45.2)better-auth(1.7.4)@tanstack/react-form
