// 02 FIELD TOOLS
opensourceheadlesscms
A headless CMS in Rust. Content types, editorial workflows and roles are YAML files in the repository, and the server publishes what they describe as a REST API with an OpenAPI description, a GraphQL API and a React admin UI. It runs on SQLite with nothing else for a quick try, or on PostgreSQL and Redis in production, and ./demo.sh brings the whole stack up in Docker.
Site-wide settings
Things that aren't posts, like a site title, the navigation, a list of announcements or a set of themes, are "globals". Each is a YAML file that says whether it is a single value, a list, a set or a map, and what its items are. They can be read in one public call, as typed GraphQL fields under site, or as an ES module that a static site fetches once at build time and imports. Each one's value can live in the database, in a JSON, YAML or TOML file that is fine to edit by hand and keep in git, or in Redis.
Signing in
The admin UI uses an HttpOnly session cookie, and API clients use a bearer token. Editors can also sign in through an OpenID Connect provider such as a kith hub, with a second factor required if you ask for one and the provider's groups mapped to CMS roles. The Docker image is the API alone by default; a second build target adds the admin UI.
Stated honestly
- On first start it makes one admin with a random password and prints it to the log, once. That password has to be changed by hand.
- Its security notes ask for a long random signing secret, TLS and rate limiting in front of the login before it is exposed. The server only enforces the first.