cairncms
v1.0.0
Published
CairnCMS is a real-time API and App dashboard for managing SQL database content
Maintainers
Readme
cairncms
cairncms is the distributable CLI for CairnCMS, a self-hosted headless CMS that serves a REST and GraphQL API with a no-code admin app on top of an SQL database. Installing this package gives you a single binary that runs the API, serves the admin app, and handles database bootstrap and migrations.
Install
npm install -g cairncmsNode 22 or newer is required. pnpm and yarn work too.
Quick start
For a quick local run against SQLite:
export KEY=$(openssl rand -hex 16)
export SECRET=$(openssl rand -hex 32)
export DB_CLIENT=sqlite3
export DB_FILENAME=./cairncms.db
cairncms bootstrap
cairncms startKEYandSECRETsign and encrypt auth tokens. Any random strings work; keep them stable across restarts.DB_CLIENTselects the database driver. Each driver expects its own vendor-specific variables (DB_FILENAMEfor SQLite,DB_HOST/DB_USER/DB_PASSWORDfor networked databases, etc.).bootstrapruns first-time setup: applies migrations and creates the admin tables and default admin user. Safe to run on an empty database; skip it on subsequent starts.startserves the API and admin app.
After start, the admin app is available at http://localhost:8055.
Supported databases
- SQLite 3
- PostgreSQL (current release and 10.x LTS)
- MySQL 8 and MySQL 5.7
- MariaDB
Documentation
See the CairnCMS documentation for configuration, authentication, extension development, and API reference details.
Issues, contributing, security
- Bug reports: GitHub Issues
- Contributing guide: CONTRIBUTING.md
- Security vulnerabilities: security policy or email [email protected]
