Before 1.0
Mica is experimental and not ready for production. This page says what Mica does today, at 0.16, now with localization for multilingual websites. The notes of each 0.x release are on GitHub.
Mica is experimental and not ready for production. The API and the content format can still change before 1.0. This is what Mica does today, at 0.16.
The model and the website
- You write the content model in TypeScript: collections, singletons and fields for text, rich text, media, relations, places on a map and more.
- An entry has an ID: one part, the name of its folder, and what a relation stores. You declare it with
id(). The page of an entry has a URL, such as/news/{id}. - A collection's URL can have more parts, such as
/{activity}/{id}. A part can be a select, a relation to one entry, or a date without a time. @micacms/astroturns the model into Astro collections. The build needs no server, no token and no network. Rich text is Markdoc, and images in it come out as optimisedsrcsetimages.
Localization (i18n)
- A site declares its languages with the names of Astro's i18n:
locales,defaultLocale,fallbackandprefixDefaultLocale. - A field with
localized: truehas a value for each language, in the same entry. Rich text has one file for each language, such asbody.de.mdoc. A Git diff shows each translation on its own line. - A missing translation falls back to another language, for example Swiss German to German, then to the main language.
localize()gives a page the values of its language, with the types of the model. - A URL can name the language, such as
/{locale}/news/{id}. A link in rich text can get the address of the page's language. - The editor shows a form in one language at a time. The language switcher counts the missing translations, and a button beside each translated field shows the other languages and reuses one.
- The preview and "Open on website" show the page in the language of the form. A page in another language in the live preview changes the form to that language.
mica checkand Publish report two entries with the same translated ID in one language, because they would have the same address.- Find what still needs a translation: the list of a collection counts the missing translations of each entry and filters by language, and the Overview lists them for each language.
list_entriesgives them to an agent, andmica checklists them. localesOf()gives the languages that an entry has its own text in, so a site can make a page, a sitemap entry or anhreflanglink only for them.
Editing
- The local editor runs with
npx mica start. It has no sign-in and listens only on your machine.npx mica start --previewalso starts the website'sastro dev, and it finds the right address when port 4321 is busy. - The self-hosted editor is one Docker container with OpenID Connect sign-in. Editors who are not developers use it. With Google, a domain rule admits only accounts of your Workspace domain.
- The editor saves by itself. A save is a draft. Publish makes one Git commit of the changes that the editor chooses, also when there are thousands of them.
- The editor shows the page's URL under the ID field, in the list of a collection and in the pickers of relations. A relation to one entry has Edit, Change and Remove.
- The live preview shows the real page of the website beside the form, with the drafts in it. A click on a text, an image, a date or an option in the page opens its field. The self-hosted editor shows it with the optional preview container
ghcr.io/micacms/preview. - Coding agents can edit the content over MCP, and they follow the same rules as the editor. An agent needs your consent, and the consent page waits one second before it accepts Allow.
Content in Git
- The content is files in your repository: JSON, Markdoc and media. Mica has no database and no content API.
- Large media can live in Git LFS. The content can live in a repository of its own, as a Git submodule.
- Reference sets let an entry link to data that Mica does not edit, such as a list of thousands of places.
mica checktests every entry against the model, andmica importmoves Astro collections into Mica.
Checked and clear
- A broken entry file does not hide its collection. Mica names the file it cannot read. A full disk or a server failure gives a clear message with a reference that is also in the log.
- The tests run on Windows, macOS and Node.js 26, on the packed packages in a new Astro project, on the local editor in a browser, and on the self-hosted live preview in a browser.
The details of each release
The notes of every 0.x release are in the GitHub releases.