Canica

Canica app guide

Canica: a reactive database (Drizzle on SQLite), typed queries, mutations and actions as Effect generators, file-based React routes, UI from canica/ui (shadcn/ui). Types, lint and tests say what to use; this page is the map. Commands, in the app's directory: npm run dev, npm run typecheck, npm run lint, npm test, npm run storyboard (with pnpm: pnpm dev, pnpm typecheck, …); canica --help lists the rest. canica deploy runs typecheck, lint and tests first (--skip-checks when you just ran them). canica deploy puts it at https://<name>.canica.run (apps live on canica.run, the platform at canica.app: sign-in, deploys; separate sites). Never hardcode either: links are relative paths, absolute ones come from location.origin.

server/index.ts      tables, queries, mutations, actions (export default app)  server/*.test.ts  server tests
server/apis.ts       external APIs (OpenAPI) for actions; server/apis.gen/ is generated by `canica apis`
server/seed.ts       sample data for the storyboard (calls your mutations)     src/*.test.tsx   scene tests
server/emails.tsx    email templates (see Email)
shared/              code for both sides (field schemas, math; builders from "canica/fields")
src/routes/          one file per screen (index.tsx → /, rooms/$room.tsx → /rooms/$room); __root.tsx layout; 404.tsx
src/components/      components (functions of props), modals (with the forms)  src/theme.css    design tokens

Sections