# Alinea CMS > Alinea is an open source, Git-based headless CMS for Next.js. Content is stored as JSON files in your repository and queried with a fully typed API. Every docs page is available as Markdown by adding .md to its url. All docs in a single file: https://v2.alineacms.com/llms-full.txt. The npm package includes these docs for its version in node_modules/alinea/docs, start at index.md. ## Get started - [Get started](https://v2.alineacms.com/docs/get-started.md): Install Alinea in a Next.js project, build a first site with the tutorial, or upgrade an existing 1.x project. - [Introduction](https://v2.alineacms.com/docs.md): Alinea is an open source headless CMS written in Typescript. It stores content in flat files in your repository so they can be checked into Git. - [Quickstart](https://v2.alineacms.com/docs/quickstart.md): Add Alinea to a Next.js project in a few steps. Prefer to let your coding agent do the work? - [Set up with an AI agent](https://v2.alineacms.com/docs/ai-setup.md): Let a coding agent such as Claude Code, Cursor or Codex add Alinea to your Next.js project. - [Tutorial](https://v2.alineacms.com/docs/tutorial.md): Build a small but complete Next.js website with Alinea, one feature at a time. - [Step 1: Simple landing page](https://v2.alineacms.com/docs/tutorial/step-1-landing-page.md): Start with a homepage served at / that shows a title editors can change in the dashboard, with SEO metadata and a live preview. - [Step 2: Add a list of blocks](https://v2.alineacms.com/docs/tutorial/step-2-block-list.md): Most pages are built from a stack of blocks: a text section, an image, a call to action. - [Step 3: Add a root for shared layout content](https://v2.alineacms.com/docs/tutorial/step-3-layout-root.md): Content that appears on every page, such as the header and footer, doesn't belong to one page. - [Step 4: Adding a blog](https://v2.alineacms.com/docs/tutorial/step-4-blog.md): Add a blog: an overview page at /blog that lists its posts, and a page per post at /blog/ with links to the previous and next post. - [Step 5: Use a catch-all slug route](https://v2.alineacms.com/docs/tutorial/step-5-catch-all.md): So far every page type has its own route in app/. - [Upgrading from 1.x](https://v2.alineacms.com/docs/upgrading.md): This guide walks through moving an existing Alinea 1.7 project to 2.0. Your content files don't need a migration and the query API is unchanged. ## Content model - [Content model](https://v2.alineacms.com/docs/content-model.md): Your content model lives in code, in the config you pass to createCMS: a schema of types and their fields, and workspaces with roots that decide where entries… - [Schema](https://v2.alineacms.com/docs/schema.md): The schema is an object that maps names to Types. Pass it to createCMS as the schema option: every type an editor can create as an entry has to be listed here. - [Type](https://v2.alineacms.com/docs/schema/type.md): A type describes one kind of entry: the fields editors fill in and how entries of that type behave in the dashboard. - [Document](https://v2.alineacms.com/docs/schema/document.md): Config.document creates a Type for pages: it adds a title, a path and a metadata field to the fields you define. - [Fields](https://v2.alineacms.com/docs/fields.md): Fields make data editable. Every field is created with a Field function that takes a label and an options object, and is added to the fields of a Type under… - [Path](https://v2.alineacms.com/docs/fields/path.md): A path field holds the url segment of an entry, its slug. It fills itself with a slug of the title while it's empty, and editors can change it. - [Text](https://v2.alineacms.com/docs/fields/text.md): A text field holds a plain string: a name, a short description, a label. Use rich text when editors need formatting or links. - [Rich Text](https://v2.alineacms.com/docs/fields/rich-text.md): A rich text field holds formatted text: headings, paragraphs, lists, links, quotes and optionally tables and images. - [List](https://v2.alineacms.com/docs/fields/list.md): A list field holds an ordered list of rows, and every row has one of the types in its schema. Editors add, reorder and remove rows. - [Tabs](https://v2.alineacms.com/docs/fields/tabs.md): Tabs split a long form into sections. They only change the layout in the dashboard: the fields on a tab are stored on the entry as if they were defined… - [Select](https://v2.alineacms.com/docs/fields/select.md): A select field lets editors pick from a fixed set of options. It stores the key of the chosen option, so you can rename labels without touching content. - [Number](https://v2.alineacms.com/docs/fields/number.md): A number field holds a number: a price, a quantity, a percentage. It has increment and decrement buttons and keeps the value between the bounds you set. - [Check](https://v2.alineacms.com/docs/fields/check.md): A check field is a checkbox that stores true or false, for settings such as "Featured" or "Hide from navigation". - [Date & time](https://v2.alineacms.com/docs/fields/date.md): Field.date holds a calendar date and Field.time a time of day. Both store plain strings without a timezone, which makes them easy to compare, filter and sort. - [Code](https://v2.alineacms.com/docs/fields/code.md): A code field is a monospace editor with syntax highlighting, for snippets, embed codes or small bits of markup that editors paste in. It stores the text as is. - [Object](https://v2.alineacms.com/docs/fields/object.md): An object field groups fields and stores their values together as one object. - [Link](https://v2.alineacms.com/docs/fields/link.md): A link field lets editors link to a page in the CMS, an external url or an uploaded file, whichever they need. Use it for buttons and calls to action. - [Entry](https://v2.alineacms.com/docs/fields/entry.md): An entry field links to other entries in the CMS: the author of a post, related articles, the categories of a product. - [Url](https://v2.alineacms.com/docs/fields/url.md): A url field holds a link to an external resource: a website, a mailto: or tel: link, a social profile. - [File](https://v2.alineacms.com/docs/fields/file.md): A file field links to a file in the media library: a PDF brochure, a price list, a download. Editors pick it from the files uploaded to the media library. - [Image](https://v2.alineacms.com/docs/fields/image.md): An image field links to an image in the media library. - [Workspaces and roots](https://v2.alineacms.com/docs/workspaces.md): A workspace is a separate set of content with its own content directory and roots. Most sites need one. - [Roots](https://v2.alineacms.com/docs/workspaces/root.md): A root is a top-level section of a workspace, shown in the dashboard sidebar with its own tree of entries. - [Media](https://v2.alineacms.com/docs/workspaces/media.md): A media root holds the images and files editors upload. - [Querying content](https://v2.alineacms.com/docs/query.md): Read content with the methods on your CMS instance. - [Structural](https://v2.alineacms.com/docs/query/structural.md): Most queries start by saying which entries you want: of a type, at a url, in a root, in a locale. Then you choose what to get back and in which order. - [Filtering](https://v2.alineacms.com/docs/query/filtering.md): Use filter to match entries on the values of their fields, and search to find entries by the words they contain. - [Related](https://v2.alineacms.com/docs/query/related.md): A single query can also fetch entries related to the ones it finds: their parents, children and siblings, their translations, and the entries they link to. - [Advanced](https://v2.alineacms.com/docs/query/advanced.md): Patterns for larger sites: nesting relations, querying several types at once, reusing parts of queries and controlling how fresh the content is. - [Examples](https://v2.alineacms.com/docs/query/examples.md): Complete queries for pages most sites have. They use the example schema and the Next.js App Router, and assume a pages root without i18n unless noted. ## Guides - [Guides](https://v2.alineacms.com/docs/guides.md): Guides for the features you reach for after the basics: previews, publishing, editing, translations, permissions and deploying to production. - [Live previews](https://v2.alineacms.com/docs/live-previews.md): Live previews show the page you are editing next to the form in the dashboard. The page updates as the editor types, before anything is saved or published. - [Instant publishing](https://v2.alineacms.com/docs/instant-publishing.md): Content goes live on every commit, without a rebuild. - [Editing content](https://v2.alineacms.com/docs/editing-content.md): Your cms instance can create, update, publish and delete entries from code, for example to import content from another system or to seed a new project. - [Internationalization](https://v2.alineacms.com/docs/internationalization.md): Alinea translates content per root: every entry in a translated root has a version per locale, each with its own fields, path and URL. - [Roles and permissions](https://v2.alineacms.com/docs/roles-permissions.md): Roles decide what a signed-in user can see and change in the dashboard. Every project has an admin role with full access to all content and to user management. - [TypeScript](https://v2.alineacms.com/docs/typescript.md): Alinea infers TypeScript types from your schema, so there are no types to generate or keep in sync. - [Deploying](https://v2.alineacms.com/docs/deploy.md): Deploying an Alinea site means deploying your Next.js app. - [Self-Hosted](https://v2.alineacms.com/docs/deploy/self-host.md): Run the backend yourself instead of using Alinea Cloud. - [Alinea Cloud](https://v2.alineacms.com/docs/deploy/alinea-cloud.md): Alinea Cloud is a hosted backend for your handler. - [Working with AI agents](https://v2.alineacms.com/docs/ai-agents.md): Coding agents can change Alinea content in two ways: through the MCP server of alinea dev, or by writing the content JSON files themselves. - [MCP server](https://v2.alineacms.com/docs/mcp.md): alinea dev includes a Model Context Protocol (MCP) server. ## Dashboard UI - [Dashboard UI](https://v2.alineacms.com/docs/dashboard-ui.md): Build custom fields and views that look and behave like the rest of the dashboard. - [Components](https://v2.alineacms.com/docs/components.md): The dashboard is built from a library of React components, exported from alinea/components. - [Alert](https://v2.alineacms.com/docs/components/alert.md): A callout for an important message, with a title, a description and optional actions. - [AppShell](https://v2.alineacms.com/docs/components/app-shell.md) - [Badge](https://v2.alineacms.com/docs/components/badge.md): A small label for a status or a category. With status it takes the color the dashboard uses for that entry status. - [Blockquote](https://v2.alineacms.com/docs/components/blockquote.md) - [Breadcrumb](https://v2.alineacms.com/docs/components/breadcrumb.md) - [Button](https://v2.alineacms.com/docs/components/button.md): Triggers an action. Buttons come in solid, outline, ghost and link variants, in five colors and with sizes for toolbars and icon-only buttons. - [Calendar](https://v2.alineacms.com/docs/components/calendar.md) - [Checkbox](https://v2.alineacms.com/docs/components/checkbox.md): A single checkbox, its children are the label. To pick several values from a list, use a CheckboxGroup. - [CheckboxGroup](https://v2.alineacms.com/docs/components/checkbox-group.md): A labelled group of checkboxes for several values. - [Code](https://v2.alineacms.com/docs/components/code.md) - [Collapsible](https://v2.alineacms.com/docs/components/collapsible.md) - [ColorSwatchPicker](https://v2.alineacms.com/docs/components/color-swatch-picker.md) - [ComboBox](https://v2.alineacms.com/docs/components/combo-box.md) - [Command](https://v2.alineacms.com/docs/components/command.md): A searchable list of commands, like a command palette. - [ContentCard](https://v2.alineacms.com/docs/components/content-card.md) - [ContentGrid](https://v2.alineacms.com/docs/components/content-grid.md): A selectable grid of cards, like the media library. - [DataList](https://v2.alineacms.com/docs/components/data-list.md): Label and value pairs, such as the details of a file. - [DateField](https://v2.alineacms.com/docs/components/date-field.md) - [DatePicker](https://v2.alineacms.com/docs/components/date-picker.md) - [DateRangePicker](https://v2.alineacms.com/docs/components/date-range-picker.md) - [Dialog](https://v2.alineacms.com/docs/components/dialog.md): A modal window on top of the page that asks for a decision or collects input. DialogTrigger opens it and DialogClose closes it. - [DropdownMenu](https://v2.alineacms.com/docs/components/dropdown-menu.md): A menu of actions that opens from a button, like the actions of an entry in the dashboard. - [DropZone](https://v2.alineacms.com/docs/components/drop-zone.md) - [Empty](https://v2.alineacms.com/docs/components/empty.md) - [Field](https://v2.alineacms.com/docs/components/field.md): The label, help text and error around your own input. - [FileTrigger](https://v2.alineacms.com/docs/components/file-trigger.md) - [FoldIcon](https://v2.alineacms.com/docs/components/fold-icon.md) - [Heading](https://v2.alineacms.com/docs/components/heading.md) - [Icon](https://v2.alineacms.com/docs/components/icon.md) - [Kbd](https://v2.alineacms.com/docs/components/kbd.md) - [Link](https://v2.alineacms.com/docs/components/link.md) - [List](https://v2.alineacms.com/docs/components/list.md) - [MediaPreview](https://v2.alineacms.com/docs/components/media-preview.md): A thumbnail of an image or an icon for other files. - [MultipleSelect](https://v2.alineacms.com/docs/components/multiple-select.md) - [NavRail](https://v2.alineacms.com/docs/components/nav-rail.md) - [NumberField](https://v2.alineacms.com/docs/components/number-field.md): A number input with increment and decrement buttons. - [Page](https://v2.alineacms.com/docs/components/page.md): The header, content and footer of a dashboard page. - [Popover](https://v2.alineacms.com/docs/components/popover.md): Shows rich content in a panel next to its trigger, such as a few settings or a small form. - [PreviewFrame](https://v2.alineacms.com/docs/components/preview-frame.md): A device frame for a live preview, with its toolbar. - [RadioGroup](https://v2.alineacms.com/docs/components/radio-group.md) - [ResizablePanelGroup](https://v2.alineacms.com/docs/components/resizable-panel-group.md) - [SearchField](https://v2.alineacms.com/docs/components/search-field.md): A text input for search queries, with a clear button. - [Select](https://v2.alineacms.com/docs/components/select.md): Picks a single value from a list of options. The value is the value of the chosen SelectItem, and editors can clear it unless the field is required. - [Sidebar](https://v2.alineacms.com/docs/components/sidebar.md) - [SortableList](https://v2.alineacms.com/docs/components/sortable-list.md): Rows that editors reorder by dragging, like list fields. - [Spinner](https://v2.alineacms.com/docs/components/spinner.md) - [Surface](https://v2.alineacms.com/docs/components/surface.md) - [Switch](https://v2.alineacms.com/docs/components/switch.md): Turns a setting on or off, with an immediate effect. For choices that are saved later, as part of a form, use a Checkbox. - [Table](https://v2.alineacms.com/docs/components/table.md): Rows and columns of data with sorting, selection, nested rows and drag and drop. Describe the columns up front, then render a TableRow for every item. - [Tabs](https://v2.alineacms.com/docs/components/tabs.md): Splits content into sections that are shown one at a time. TabsTrigger and TabsContent are matched by their value. - [TagGroup](https://v2.alineacms.com/docs/components/tag-group.md) - [Text](https://v2.alineacms.com/docs/components/text.md) - [TextField](https://v2.alineacms.com/docs/components/text-field.md): A text input with a label, help text and a validation message. Set multiline for a text area that grows with its content. - [TimeField](https://v2.alineacms.com/docs/components/time-field.md) - [Timestamp](https://v2.alineacms.com/docs/components/timestamp.md): A date shown relative to now, with the full date on hover. - [Toggle](https://v2.alineacms.com/docs/components/toggle.md): A button that stays pressed until it is pressed again. - [ToggleGroup](https://v2.alineacms.com/docs/components/toggle-group.md): A row of toggles where one or several can be pressed. - [Toolbar](https://v2.alineacms.com/docs/components/toolbar.md): Groups buttons and toggles, like a text editor toolbar. - [Tooltip](https://v2.alineacms.com/docs/components/tooltip.md): A short description that appears when its trigger is hovered or focused. Use it to name icon-only buttons, not for information editors need to do their work. - [Tree](https://v2.alineacms.com/docs/components/tree.md) - [Custom fields](https://v2.alineacms.com/docs/custom-fields.md): When the built-in fields don't fit your content, create your own. - [Overviews](https://v2.alineacms.com/docs/overviews.md): When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title of each entry and, when they… ## Reference - [Reference](https://v2.alineacms.com/docs/reference.md): Working with Alinea should feel intuitive but if you're looking for more in-depth information or feel like something is missing have a look here. - [Configuration](https://v2.alineacms.com/docs/configuration.md): All configuration lives in cms.ts, which exports the cms instance your pages query and the handler serves. - [CLI](https://v2.alineacms.com/docs/cli.md): The alinea command line tool generates your content cache and runs the local dashboard.