Skip to content

Walkthrough — customize your starter app

If you ran the Quickstart, you already have a running app with a Tasks list in the sidebar — and optionally re-skinned it in Make it yours. Good — this walkthrough opens the hood: what the starter generated and how to change it. No 100-line paste required.

Kumiko-generated admin UI: a task list with sortable columns and a status column

What the starter includes. kumiko new app scaffolds a demo tasks feature: entity, CRUD handlers, list + edit screens, sidebar nav, and seeded rows. You declare the shape once; Kumiko derives the table, API, access rules, and admin UI.

At the end you understand:

  • which files the scaffold created and what each does
  • how the tasks feature wires entity → handlers → screens → nav
  • how to add a field and see it in the UI after bun dev

Prerequisite: Bun ≥ 1.2.20. Follow the Quickstart first if you do not have ./my-tasks/ yet.

Step 1 — Scaffold (or use your Quickstart app)

Section titled “Step 1 — Scaffold (or use your Quickstart app)”
Terminal window
bunx @cosmicdrift/kumiko-cli@latest new app my-tasks
cd my-tasks
bun install

The workspace includes src/features/tasks/feature.ts (full demo feature), src/seed.ts (demo rows for bun dev), bin/dev.ts, src/client.tsx, .env.example, and docker-compose.yml.

src/run-config.ts mounts secrets, sessions, and tasksFeature. config, user, tenant, and auth-email-password are auto-mounted by composeFeatures because bin/main.ts passes auth: { admin: { … } }.

Step 2 — Configure env + boot validation

Section titled “Step 2 — Configure env + boot validation”
Terminal window
cp .env.example .env

Set in .env:

Terminal window
JWT_SECRET=$(openssl rand -base64 32)
KUMIKO_SECRETS_MASTER_KEY_V1=$(openssl rand -base64 32)

Then validate without a database:

Terminal window
bun run boot
[runProdApp] boot validation OK (8 features, 8 registry entries)

That’s KUMIKO_DRY_RUN_ENV=boot: every feature mounted, dependencies resolved, schemas validated — no Postgres or Redis.

Terminal window
docker compose up -d
bun dev

The welcome banner prints the URL (default http://localhost:4173) and admin login. Sign in as [email protected] / changeme, open Tasks — demo rows are already there:

Kumiko-generated edit form: typed fields with a boolean toggle and a number field

FileWhat it does
src/run-config.tsWhich features your app mounts (APP_FEATURES).
src/features/tasks/feature.tsEntity + handlers + screens + nav for the demo.
src/seed.tsInserts demo tasks on first bun dev (idempotent).
bin/dev.tsDev server + welcome banner + seeds: [seedDemoTasks].
bin/main.tsProduction bootstrap (bun run start).

Open src/features/tasks/feature.ts. The starter already declares:

  • taskEntity — fields (title, status, priority, isUrgent)
  • CRUD handlersdefineEntity*Handler for create/update/delete/list/detail
  • listScreen + editScreen — generated admin UI definitions
  • r.nav(...) — sidebar entries pointing at those screens

Add a notes text field to see schema-driven UI updates:

// In taskEntity.fields:
notes: createTextField(),

Add "notes" to listScreen.columns and editScreen.layout.sections[0].fields. Save — bun --watch reboots and the new column appears (dev mode auto-creates the column; production needs bun run schema:generate).

Re-run boot to confirm composition still validates:

Terminal window
bun run boot

The starter’s tasks feature is yours to edit or delete. For a second domain feature, use the CLI (scaffolds a bare entity — add screens when you need UI):

Terminal window
bunx @cosmicdrift/kumiko-cli add feature notes

This creates src/features/notes/ and auto-mounts it in src/run-config.ts.

  • Mount bundled features (audit, delivery, tier-engine, …) in src/run-config.ts.
  • What you get — full capability tour.
  • Concepts — why Kumiko works the way it does.
  • Patterns — complete r.* API reference.

If something does not match this doc, open an issue.