8000 GitHub - jfbloom22/aphex: A modern, extensible headless CMS built with SvelteKit, featuring a portable core package, database/storage agnostic adapters, and a Sanity-inspired admin interface. · GitHub
[go: up one dir, main page]

Skip to content

About

A modern, extensible headless CMS built with SvelteKit, featuring a portable core package, database/storage agnostic adapters, and a Sanity-inspired admin interface.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

885 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AphexCMS logo

AphexCMS

An open-source CMS for SvelteKit. Content lives in your own database.

Schemas are TypeScript. The admin UI, APIs, and your site deploy as one SvelteKit app.

Website · Try the demo · Documentation · Get started

CI status npm version npm downloads MIT license

The Aphex Studio showing a page's fields beside its live site, with the hero selected for editing in place

Quick start

pnpm create aphex my-app
cd my-app
pnpm install
pnpm dev

Open localhost:5173/admin. The first user to sign up becomes super admin.

New projects use SQLite by default and create their tables on first boot, so there is nothing to install or migrate. Postgres is one env var away (APHEX_DATABASE=postgres). Schemas and code don't change between adapters, but content doesn't move between databases — pick the one you'll ship with early. See Database.

Schemas

Content types are defined in TypeScript:

import { defineType } from '@aphexcms/cms-core';

export const menuItem = defineType({
	type: 'document',
	name: 'menuItem',
	title: 'Menu Item',
	fields: [
		{ name: 'name', type: 'string', title: 'Name' },
		{ name: 'price', type: 'number', title: 'Price' },
		{ name: 'image', type: 'image', title: 'Image' }
	]
});

From that one definition you get:

Interface What you get
Local API Typed queries from your SvelteKit load functions, no HTTP round trip
HTTP API REST endpoints with zod-validated request bodies
GraphQL A schema generated from your content types
Studio An admin UI with validation, drafts, version history, and publishing
MCP A Streamable HTTP MCP server so AI clients can read and write content, subject to the same permissions

Editing

  • Visual editing: live preview of your SvelteKit pages with click-to-edit (stega-encoded).
  • Drafts, auto-save, scheduled publish/unpublish, and version history.
  • Rich text is Portable Text, edited with TipTap. Supports custom block types, inline objects, marks, and annotations.
  • The admin and the site are the same SvelteKit app, so there is one deploy and no webhook sync between a CMS host and a frontend host.

Adapters

Infrastructure is behind adapter interfaces, so the core has no dependency on a specific database, storage, auth, or email provider.

Concern First-party support
Database PostgreSQL, PGlite, SQLite, Turso/libSQL
Storage Local filesystem, S3, Cloudflare R2, MinIO
Authentication Better Auth
Email SMTP/Nodemailer, Resend
AI OpenAI-compatible providers, MCP for external clients

Both database adapters run the same conformance test suite. SQLite is a full adapter, not a reduced one for local development.

Also included

  • Multi-tenancy: organizations with parent/child hierarchy, role-based permissions, field-level access rules, and row-level security on PostgreSQL
  • Events and jobs: an append-only domain event log, a transactional outbox, and a database-backed job queue with leases, retries, exponential backoff, and dead-lettering
  • Assets: local or S3-compatible storage, private assets, image variants, direct uploads
  • Plugins: add schemas, admin UI, routes, permissions, MCP tools, event consumers, and job handlers from a package
  • An AI assistant in the admin UI that uses the same schemas and permissions as everything else

Packages

Package Purpose
@aphexcms/cms-core Content engine, Studio, API handlers, GraphQL, and MCP
@aphexcms/postgresql-adapter PostgreSQL and PGlite database adapters
@aphexcms/sqlite-adapter SQLite and Turso/libSQL database adapters
@aphexcms/storage-s3 S3-compatible object storage
@aphexcms/nodemailer-adapter SMTP email, including a Mailpit development helper
@aphexcms/resend-adapter Resend email for production
@aphexcms/ai-openai OpenAI-compatible model backend for the Studio assistant
@aphexcms/visual-editing Live preview, stega helpers, and click-to-edit overlays
@aphexcms/plugin-forms Editor-composed forms, submissions, and notifications
@aphexcms/plugin-seo SEO fields, previews, and metadata generation
@aphexcms/ui Shared shadcn-svelte component library
create-aphex Project scaffolder used by pnpm create aphex

Documentation

The docs also publish an llms.txt and a Markdown version of every page.

License and contributing

Everything in this repository is MIT licensed: the admin UI, the content engine, the APIs, the adapters, and the job system.

Contributions are welcome. See the contributing guide for setup, architecture, code standards, and the release process. CLAUDE.md doc 614F uments the architectural boundaries and common traps for anyone working in the repo with an AI agent.

Development is supported by White Raven Brands and sponsors.


About

A modern, extensible headless CMS built with SvelteKit, featuring a portable core package, database/storage agnostic adapters, and a Sanity-inspired admin interface.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0