Decap CMS Integration
Decap CMS is a Git-based admin UI for content. Laika ships a Decap-compatible backend (@laikacms/server) so you can pair that admin with any Laika storage repository — filesystem, R2, S3, WebDAV, and more.
Laika works with upstream Decap CMS and maintains a standalone @laikacms/decap-cms fork. The fork follows the same separation of an agnostic core from opinionated outer packages and can be used without Laika. It is a general-purpose continuation of Decap CMS, not an admin UI coupled exclusively to this project. See the fork overview for its documentation and the boundary between the admin UI and the Laika backend.
Two integration shapes are supported, in increasing order of complexity:
| Pattern | When to use | Backend host | Auth |
|---|---|---|---|
| Hosted gateway | Multiple sites sharing one Decap admin + Laika backend | A separate Worker / server you operate (the laika-gateway app moved to its own repo) | GitHub OAuth (or other provider) |
| Standalone Worker | You want full control of storage, auth, and routing | Your own Hono/Worker app | JWT (or your scheme) |
The primary documented integration path is the Standalone Worker (BYO storage) wiring: you construct a StorageRepository, wrap it in the Catalog document/asset repos, and expose them through laikaApi(...). Everything else (admin shell, OAuth2, framework bridges) builds on top of that handler.
In this section
- The
@laikacms/decap-cmsfork — the admin UI itself; links out to the fork's own documentation on GitHub (overview, skills, CSP, contributing). - Self-Hosting Quickstart (FileSystem + Decap) — the end-to-end starting point: a plain Node.js server with filesystem storage and the Decap admin, no cloud account.
- Standalone Worker (BYO storage) — wire
laikaApi(...)by hand over any storage repository; seeding the server-side config; WebDAV storage. - Serving the Decap admin shell — compile and serve the admin browser bundle.
- Authentication — machine-to-machine API keys, SSR guards, logging, the
decap-oauth2server, and the multi-tenant hosted gateway. - Widgets & Editor Components — icon widgets and the embedded-entry editor component.
- Framework setup notes — per-framework request bridges (Express, Next.js, SvelteKit, Astro, Nuxt, AdonisJS, FoalTS, and more).
- AI assistant — mount
@laikacms/server/aifor the editor's chat and session endpoints;DecapAiConfigoptions, session callbacks, and authorization.