# Aphex CMS Documentation ## Access Control - [Access Control](/access-control): Roles, capabilities, and schema/field-level access rules — how Aphex decides who can read and write what. ## Ai Assistant - [AI Assistant](/ai-assistant): A chat panel inside the admin that reads and edits your content through the same tools exposed over MCP — with a live bridge into the open editor, a per-turn audit trail, and one-click undo. ## Api Keys - [API Keys](/api-keys): Create and manage API keys for programmatic access, scoped to organizations with parent–child hierarchy support. ## Authentication - [Authentication](/authentication): Set up auth, organizations, password reset, and API keys — with createAphexAuth or by wiring Better Auth yourself. The AuthProvider interface lives at the bottom for replacing it entirely. ## Configuration - [Configuration](/configuration): The complete reference for aphex.config.ts — schemas, adapters, auth, GraphQL, versioning, branding, and security. ## Contributing - [Contributing](/contributing): How to work on Aphex itself — the monorepo, dev workflow, releases, and the studio → template → CLI sync chain. ## Database - [Database](/database): Aphex runs on SQLite by default (zero-infra) and Postgres for scale. Run migrations, switch adapters with one env var, and customize multi-tenancy. ## Events And Jobs - [Events & Jobs](/events-and-jobs): A durable event log, transactional outbox, and DB-backed job queue — the spine for reacting to what happens in your CMS (scheduled publishing, webhooks, sync, notifications). ## Forms - [Forms](/forms): Editor-composed forms with stored submissions, server-side validation, rate limiting and email notifications — via @aphexcms/plugin-forms. ## Frontend - [Frontend Integration](/frontend): Fetch published content and render it on your public site. Server load functions, slug lookups, layout singletons, reference resolution. ## Getting Started - [Getting Started](/getting-started): Scaffold a new Aphex project, run it locally, and ship your first schema. ## God Mode - [God Mode](/god-mode): Instance-level admin surface for super admins — manage every organization, control instance settings, bootstrap tenants without invites. ## Graphql - [GraphQL API](/graphql): Auto-generated GraphQL API with queries, mutations, filtering, and an interactive GraphiQL explorer. ## Http Api - [HTTP API](/http-api): RESTful endpoints for querying, creating, updating, and managing your content over HTTP. ## Docs - [Introduction](/): Aphex CMS — a Sanity-inspired content management system that runs inside your SvelteKit app. ## Local Api - [Local API](/local-api): Query and mutate your content directly from the server using the type-safe Local API. ## Mcp - [MCP Server](/mcp): Let AI clients like Claude Code and Cursor read and write your CMS content through the Model Context Protocol. ## Plugins - [Plugins](/plugins): Extend your CMS with a small, typed SDK — install a ready-made plugin, or write your own right inside your project. A recipe-driven guide. ## Singletons - [Singletons](/singletons): Global one-of documents — site navigation, footer, settings — that always exist as a single row per organization. ## Storage - [Storage](/storage): Configure local filesystem or S3-compatible storage for asset uploads. The StorageAdapter interface lives at the bottom for custom-adapter authors. ## Type Generation - [Type Generation](/type-generation): Generate TypeScript types from your CMS schemas for type-safe content access across your entire app. ## Version History - [Version History](/version-history): Aphex tracks every draft save and publish, lets editors browse the history, and supports one-click restore. ## Visual Editing - [Visual Editing](/visual-editing): Live preview + click-to-edit. Wrap your site once, add a previewUrl, and edits stream into a side-by-side preview where every field is clickable. ## Deployment - [Coolify & Dokploy](/deployment/coolify-dokploy): Self-hosted PaaS deployment with docker-compose.prod.yml — your own VPS, your own domain, TLS handled for you. - [Docker](/deployment/docker): The bundled Dockerfile and entrypoint explained, running with compose on a VPS, and what the container needs to survive a redeploy. - [Deployment](/deployment): Ship Aphex to production — one-click on Render or Railway, or self-hosted with Docker. Platform comparison, production checklist, full environment variable reference. - [Operations](/deployment/operations): Running Aphex in production — migrations on deploy, the background job worker, health checks, backups, caching and upgrades. - [Other platforms](/deployment/other-platforms): Vercel, Netlify, Cloudflare, DigitalOcean, buildpack hosts — what works, what doesn't, and the split deployment that solves most of it. - [Railway](/deployment/railway): Two one-click templates with nothing to fill in — SQLite on a volume, or Postgres with object storage. Usage-billed, cheapest to start. - [Render](/deployment/render): One-click deploy to Render with the bundled render.yaml blueprint — one container, one disk, no database to provision. ## Schemas - [Array](/schemas/array): Ordered lists of items with drag-and-drop reordering. - [Block Content](/schemas/block): Rich text editing with Portable Text — an array of blocks with custom types, inline objects, and annotations. - [Boolean](/schemas/boolean): True/false toggle for binary choices. - [Conditional Fields](/schemas/conditional-fields): Show a field only when it applies, so editors aren't reading controls that do nothing. - [Date](/schemas/date): Date picker with configurable display format. - [Datetime](/schemas/datetime): Combined date and time input with UTC storage. - [File](/schemas/file): Upload arbitrary files (PDFs, documents, archives) and store them as asset references. - [Hooks](/schemas/hooks): Transform document data on save with typed beforeValidate hooks. - [Image](/schemas/image): Image upload with drag-and-drop, alt text, and asset browser. - [Schema Types](/schemas): Define your content model with document and object types. - [Number](/schemas/number): Numeric input for integers and decimals — or a drag slider with a unit label. - [Object](/schemas/object): Nested groups of fields for structured data. - [Reference](/schemas/reference): Links to other documents with a searchable picker. - [Slug](/schemas/slug): URL-friendly slugs with auto-generation from other fields. - [String](/schemas/string): Single-line text input with support for predefined lists — dropdowns, radio buttons, or an icon-friendly segmented control. - [Text](/schemas/text): Multi-line text input for longer content. - [URL](/schemas/url): URL input with built-in format validation. - [Validation](/schemas/validation): Validate field values with a fluent, chainable rule API.