Skip to content

What Trokky is

Trokky is a headless CMS you run yourself. You define content types in TypeScript, editors work in a React admin UI, and your frontend reads through an HTTP API with types generated from the same schema.

If you have used Sanity, the model will feel familiar: schemas as code, structured documents, references, a studio. The differences are where it runs and who holds the data.

PackageWhat it is
@trokky/trokkyThe server. Engine, HTTP handlers, storage adapters, mail, the Express integration.
@trokky/studioThe admin UI. React, and the field system editors work in.
@trokky/clientThe frontend SDK. Query builder, image URLs, type generation.

They share one version number and are released together, so there is no compatibility matrix to reason about.

The server is an Express app in your repository. Content lives in storage you chose — JSON files on disk, or Postgres. Media are real files on a disk or in a bucket you control.

There is no hosted service in the loop. Nothing phones home, nothing rate-limits your reads, and a backup is a zip file you can restore into a different storage backend entirely.

That last property is not incidental. trokky backup from a Postgres instance restores into a filesystem instance and vice versa, because the backup describes content rather than storage.

Sites where the content model is genuinely structured and the team writing the frontend is comfortable in TypeScript. Editorial sites, documentation, institutional sites, anything with editors who need a real UI and developers who want their content model type-checked.

Trokky is not a page builder. Editors compose structured fields, not layouts — if your users expect to drag blocks around a canvas, this is the wrong tool.

It is also not multi-tenant today. One instance serves one project.

import express from 'express'
import { TrokkyExpress } from '@trokky/trokky/express'
import '@trokky/trokky/adapters/filesystem-data'
import '@trokky/trokky/adapters/filesystem-media'
const app = express()
const trokky = await TrokkyExpress.create({
schemas: [postSchema, authorSchema],
storage: { /* ... */ },
})
trokky.mount(app)
app.listen(3000)

That mounts the API, the Studio and the media routes onto an Express app you own. Everything else in these docs is detail on top of that.

Ready? Build your first site.