Adapted from the cms repository docs. Private repo.
Content management for blackcandletech.com — products and their wikis. SvelteKit 2 + Svelte 5 + adapter-node, SQLite via node:sqlite (Node 24+). The website consumes published content through a public JSON API; editing happens in the admin UI gated by Black Candle admin sign-in.
npm install
npm run seed # import products + the courier wiki from the website repo
npm run dev # http://localhost:5173
Production: npm run build, then node build (see DEPLOY.md).
| Var | Default | Purpose |
|---|---|---|
CMS_DB_PATH |
./data/cms.db |
SQLite file |
AUTH_SERVICE_URL |
http://127.0.0.1:8472 |
Black Candle authd base URL |
AUTH_API_KEY |
(empty) | Shared authd API key |
ORIGIN |
— | Public URL (required for admin form POSTs, SvelteKit CSRF) |
PORT / HOST |
3000 / localhost | Node server bind |
slug (unique), name, tagline, description (markdown), status (draft/published), links (JSON). Deleting a product cascades to entries and sections.body_markdown, sort order.Schema created in code at startup (no migration files). Section bodies stored as markdown, rendered to sanitized HTML (marked + sanitize-html) for the public API.
| Endpoint | Returns |
|---|---|
GET /api/products |
Published products |
GET /api/products/:slug |
One published product |
GET /api/products/:slug/wiki |
Published entries with rendered sections |
GET /api/products/:slug/wiki/:entry |
One published entry |
404 when the product/entry doesn't exist or isn't published.
/admin — requires a Black Candle account with is_admin (session cookie validated against authd). Dashboard (product list, statuses, entry counts), product editor (fields, publish toggle, cascade delete), entry editor (title/slug/excerpt/status + per-section cards with markdown body, live preview, reorder).
npm run seed parses the website's hardcoded wiki pages, splits prose at <h2> headings, converts to markdown, stores as courier entries with ordered sections; creates courier, price-tracker, lumen products. Idempotent; --reset wipes and reseeds.
Revision history, media uploads, public write API — all writes go through the admin UI.
black-candle-technologies/cms (private)