# 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. ## 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. ## Deployment - [Deployment](/deployment): Ship Aphex to production with Docker or Render. Env vars, migrations, signed assets, backups, health checks. ## 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). ## 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 headless content management system built with SvelteKit. ## 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. ## 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. - [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.