Skip to main content
Version: v7

Develop Chibisafe

Use the Node version and pnpm version pinned by the application source. Run these commands from the app checkout root.

pnpm install --frozen-lockfile
(umask 077; cp -n apps/api/.env.example apps/api/.env.development)

Set a local INSTANCE_ADMIN_PASSWORD and use openssl rand -hex 32 to generate the local JWT_SECRET. Then run:

pnpm db:migrate
pnpm dev

The frontend runs on port 24424, and the API listens on loopback port 3001. Use DATABASE_FILE to select a separate SQLite database. For another backend, set the frontend's BASE_API_URL. Add the actual frontend origin to the API's TRUSTED_ORIGINS when testing over a LAN.

pnpm test
pnpm lint
pnpm build

Run frontend commands through pnpm --filter @chibisafe/frontend from the root. From apps/frontend, run a focused test with pnpm exec node --import=tsx --test path/to/example.test.ts. The repository owner regenerates frontend OpenAPI types with pnpm build:openapi http://localhost:3001/api/docs/json from that package. The argument can also be a schema file.

The built frontend lives in apps/frontend/.output. Use the frontend's start script with BASE_API_URL for a standalone build. The combined Docker image starts both processes and owns production deployment wiring.

Work on these guides​

The guides repository uses Docusaurus with Node 24 and npm. Use npm ci and npm start for local editing, then npm run typecheck and npm run build. The production build checks links and generates the search index and legacy redirects. Use relative Markdown links within a version so snapshots keep working when their URL prefix changes.