Kapable starter template: Personal Notes / KB (auth, data, ai)
  • TypeScript 74.6%
  • CSS 22.3%
  • JavaScript 3.1%
Find a file
Kapable Starter Apps 3a6d5233cf fix(notes): drop client-set updated_at from PATCH — kapable-data stamps it (was 502 on every save)
updateNote sent updated_at in the patch payload; kapable-data treats it as a
system-managed column and 4xxs (system_column_immutable). Result: every title/
tag/body save 502d with a Couldnt-save toast. Fix: never include updated_at (the
server bumps it to NOW() on each patch, so the rail updated_at-desc order is
intact) + guard against an empty patch. App-local bug, not a platform fault.
2026-06-21 20:55:17 +00:00
app fix(notes): drop client-set updated_at from PATCH — kapable-data stamps it (was 502 on every save) 2026-06-21 20:55:17 +00:00
public Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
.gitignore Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
.npmrc Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
bun.lock Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
DESIGN.md Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
package.json Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
react-router.config.ts Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
README.md Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
seed.ts Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
tsconfig.json Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00
vite.config.ts Notes — Notion-lite KB starter (kapable-data CRUD + full-text search, kapable-ai summarize/suggest-tags) 2026-06-21 20:46:34 +00:00

Kapable Starter Kit

The on-brand fork-point for Kapable v2 apps. Every starter/template app forks this repo, then builds its own routes on top.

What you get out of the box:

  • React Router 7 SSR + TypeScript, with the /health resource route the deploy pipeline gates on (keep it).
  • Kapable theme system — the canonical --kp-* token set from kapable-theme.css, [data-theme="dark|light"] on <html>, FOUC-free first paint (the in-<head> script + kapable-theme.js), and a theme toggle wired to window.KapableTheme.cycle(). Tailwind v4 is bridged to the same tokens (bg-surface, text-fg, border-line, text-accent, …).
  • @kapable/sdk wired server-side in app/lib/kapable.server.ts with explicit per-service base URLs (never the bare api.kapable.ai default for everything). Session (kses_) read from the request; tokens never reach the client bundle.
  • Error → toast on every fetch (sonner), a skip-to-content link, a global :focus-visible ring, 44px touch targets, and a branded error boundary.

Develop

bun install
bun run dev

Build + run (what the platform does)

bun run build
bun run start   # react-router-serve on :3000

Calling the SDK

All SDK calls are server-side (loaders/actions). Always pin the client to the service you're calling — each has its own base URL:

import { kapable } from "~/lib/kapable.server";

export async function loader({ request }) {
  const data = kapable("data", { request });        // data.kapable.ai
  const { data: rows } = await data.data.listRows("my_table");
  return { rows };
}
Service Base URL Notes
auth, ai, data, comms, board, billing, store, harbor dedicated subdomain own Caddy host block
wiki, knowledge, secrets, warrant, projects, herald https://api.kapable.ai path-routed gateway (no dedicated subdomain — the subdomain falls through to launchpad)

api.kapable.ai reaches every service via /v1/* and is the safe universal choice. Prefer the caller's kses_ session over a bare sk_live_ for writes.

Add a route

  1. Create app/routes/<name>.tsx.
  2. Register it in app/routes.ts — RR7 404s unregistered routes silently.

Theme tokens

Defined in public/kapable-theme.css. Use var(--kp-bg), --kp-surface, --kp-text, --kp-accent, --kp-border, --kp-danger/success/warn/info, or the Tailwind aliases. A single data-theme flip recolors everything.