Alinea is a modern, headless CMS built around a simple philosophy: your content belongs in your repository. Instead of syncing with an external database, Alinea stores all content as flat files committed directly to your git repo. A TypeScript schema defines every content type, so editors work through a visual dashboard while developers query fully-typed content with zero network overhead — no API round-trips, no cold starts, no data fetching waterfalls.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alineacms/alinea/llms.txt
Use this file to discover all available pages before exploring further.
Git-Native Storage
Content lives as JSON and MDX files in your repository. Every edit is a
commit. Branches, pull requests, and rollbacks all work exactly as expected.
Full TypeScript Types
Schemas defined with
Config and Field generate precise TypeScript types.
Every query result is fully typed — no casting, no any.Zero-Latency Queries
Content is bundled with your application and queried from an in-memory
database. No network call is made during static generation or server
rendering.
Visual Dashboard
Editors get a first-class UI for creating, editing, and organizing entries.
Launch it locally with
npx alinea dev or deploy it alongside your app.How Alinea Works
The entire system revolves around a single config file — conventionallycms.ts — where you define your content schema using Config and Field from the alinea package. That schema drives everything: the shape of stored JSON files, the structure of the visual dashboard, and the types returned by queries.
Content storage. Each entry created in the dashboard is saved as a flat file (JSON by default, MDX for rich-text documents) inside a directory you choose — typically content/ at the root of your project. Those files are committed to git just like source code, giving you a full history of every content change.
Querying content. Alinea compiles your content into an in-memory SQLite database at build time. Three primary methods are available on your cms instance:
cms.find({...})— fetch an array of entriescms.first({...})— fetch the first matching entry, ornullif none foundcms.get({...})— fetch a single entry, throwing if not foundcms.count({...})— count entries matching a query
type, optional select, filter, orderBy, and take options, and return fully-typed results driven by your schema.
The dashboard. Running npx alinea dev starts a local dashboard server. Editors can create new entries, edit fields, upload media, and publish changes — all without leaving the browser. In production you deploy the dashboard as part of your Next.js app using a route handler.
Schema Example
Define content types incms.ts using Config.document and Field:
Config.document declares an entry type that can hold child entries. Config.workspace groups one or more content roots, and Config.root is the top-level tree visible in the dashboard sidebar. The full suite of field types — Field.text, Field.richText, Field.select, Field.image, Field.date, and more — is described in the Field reference.
Alinea is a framework you add to your own project, not a hosted service you
sign up for. You run the dashboard yourself and content stays in your
repository. If you want a managed backend with authentication and file
storage, Alinea Cloud provides those primitives on
top of the same open-source core.
Next Steps
Quickstart
Install Alinea, scaffold a schema, and query your first typed content in
under 10 minutes.
Configuration
Full reference for installation options, package exports, and Next.js
integration setup.