Local API
Query your content directly, without a network hop.
collections.post.find() FindResult<Post> View docsAphex is a fully open source CMS built on SvelteKit. One codebase, one deploy, with content stored in your own database. Developers get schema-as-code and typed APIs. Editors get a polished Studio.
pnpm create aphex defineType({
type: 'document',
name: 'post',
title: 'Post',
fields: [
{ name: 'title', type: 'string', validation: (Rule) => Rule.required() },
{ name: 'slug', type: 'slug', source: 'title' },
{ name: 'excerpt', type: 'text', rows: 2 },
{ name: 'heroImage', type: 'image' },
{ name: 'content', type: 'array', of: [{ type: 'block' }, { type: 'image' }] },
{ name: 'categories', type: 'array', of: [{ type: 'reference', to: [{ type: 'category' }] }] }
]
})
Define a TypeScript content schema once. Aphex turns it into a typed Local API, HTTP endpoints, GraphQL, and a complete editing interface for your headless CMS.
defineType({
type: 'document',
name: 'post',
title: 'Post',
fields: [
{ name: 'title', type: 'string', validation: (Rule) => Rule.required() },
{ name: 'slug', type: 'slug', source: 'title' },
{ name: 'excerpt', type: 'text', rows: 2 },
{ name: 'heroImage', type: 'image' },
{ name: 'content', type: 'array', of: [{ type: 'block' }, { type: 'image' }] },
{ name: 'categories', type: 'array', of: [{ type: 'reference', to: [{ type: 'category' }] }] }
]
})Query your content directly, without a network hop.
collections.post.find() FindResult<Post>Use predictable endpoints from any frontend or service.
GET /api/documents?type=post 200 OK · application/jsonAsk for exactly the fields each customer surface needs.
query { allPost { title } } data.allPostGive content teams a complete editor from the same model.
Content / Posts 3 documentsQuery your content directly, without a network hop.
collections.post.find() FindResult<Post> View docsUse predictable endpoints from any frontend or service.
GET /api/documents?type=post 200 OK · application/json View docsAsk for exactly the fields each customer surface needs.
query { allPost { title } } data.allPost View docsGive content teams a complete editor from the same model.
Content / Posts 3 documents View docsGive content teams a Studio shaped around the business, with clear publishing states, safe history, and visual editing when page context matters.




The built-in Assistant helps editors work in context. MCP gives AI clients and coding agents a governed way to understand schemas, inspect content, and prepare changes through the same CMS.
CMS-aware answers and content tools
AI can make mistakes. Review content changes before publishing.
Set up the adapters for your environment, then reference them in your CMS config. Aphex keeps database, storage, auth, and email boundaries explicit, so infrastructure changes don't require redesigning your schemas or editor experience.
PostgreSQL Database Supported
SQLite Database Supported
Turso Hosted SQLite Supported
Amazon S3 Object storage Supported
Cloudflare R2 Object storage Supported
MinIO Object storage Supported
Better Auth Authentication Supported
Resend Email Supported
SMTP Email Supported
Anthropic AI provider Supported
OpenAI AI provider Supported
Ollama Local AI SupportedTyped plugins extend schemas, UI, APIs, agent tools, and durable automation without forking the core.
Contribute new schemas, transform the resolved content model, and normalize writes with typed schema hooks that run before validation.
Drop in Svelte field inputs, document actions, or complete tools that live inside the Studio.
Mount server routes with explicit access rules, expose capability-gated agent tools, and add permissions that appear in the roles UI.
Subscribe to immutable domain events. A transactional outbox creates database-backed delivery jobs with leases, retries, backoff, and dead-lettering, all inspectable in Activity.
definePlugin({ name: '@aphexcms/plugin-seo', parts: [{ implements: 'aphex/schema/transform', transform: injectSeoField }, { implements: 'aphex/admin/tool', id: 'seo', component: SeoTool }] }) Typed manifestYour plugin stays self-contained. Schemas, UI, routes, permissions, encrypted settings, event consumers, and job handlers ship together as one package.
These people and organizations fund the ongoing development of Aphex and help keep the entire CMS open source.
Become a sponsorAphex is fully MIT licensed from Studio to server. The editor, content engine, APIs, adapters, and job system are free to fork, extend, and deploy for every client, team, and website.