Skip to Content
tansy
Getting started

Run from source

Clone the repository and run the CMS and its starter app from the workspace, for contributing or for reading the code.

Running from source is for working on Tansy itself. To build a site, start from a new project instead.

Requires Node 24. SQLite is the default database, and any Postgres works through DATABASE_URL.

npm install
npm run tansy -- init       # writes .env with new secrets
npm run tansy -- migrate
npm run dev

On first start the server log prints a one-time setup link. Open it to create the superadmin.

The workspace

FolderWhat is in it
packages/cmsThe CMS: core, components, API routes, dashboard, Prisma schema, CLI
packages/create-tansyThe create-tansy command
apps/starterThe app the CMS is developed against: entry files and tansy.config.ts only
apps/docsThis documentation site
plugins/*The first-party plugins and their provider adapters
themes/*The themes that ship
examples/*Small, single-purpose extensions used as worked examples
docs/The markdown these pages are built from

Checks

npm run check             # type-check, lint, unit and contract tests
TEST_DATABASE_URL=file:./.data/cms_test.db npm run test:integration   # wipes that file
TEST_DATABASE_URL=file:./.data/cms_test.db npm run test:package       # the same suite, against the tarball in a fresh app

npm run check has to pass before a change is done. The integration suite is the end-to-end security suite and needs a disposable database whose name contains test or smoke.

The docs site

These pages are built from the repo's own markdown. After editing anything under docs/:

npm run docs:sync         # regenerate the reference pages
npm run docs:dev          # the site at http://localhost:3000

On this page