CMS quick start
This page takes you from zero to reading back an entry you created yourself.
Requirements
Section titled “Requirements”| Dependency | Version |
|---|---|
| Node.js | 22 or newer |
| pnpm | 10 or newer |
| Database | PostgreSQL 16+ or SQLite 3.40+ |
Install
Section titled “Install”pnpm add @hhl/cmsDefine a content model
Section titled “Define a content model”Content structure lives in cms.config.ts and is versioned with your code:
import { defineConfig, field } from '@hhl/cms';
export default defineConfig({ collections: { post: { fields: { title: field.string({ required: true }), slug: field.slug({ from: 'title' }), body: field.richText(), publishedAt: field.date(), }, }, },});Start the server
Section titled “Start the server”pnpm cms devIt listens on http://localhost:8787 by default and creates tables on first start.
Write an entry and read it back
Section titled “Write an entry and read it back”curl -X POST http://localhost:8787/api/collections/post \ -H 'content-type: application/json' \ -d '{"title":"Hello","body":"world"}'Then read it:
curl http://localhost:8787/api/collections/postIf the entry you just wrote comes back, the whole chain works. Next, read the API reference and wire it into your frontend.

