@kody/example-reading-list
A small reading list app built from the app starter: warm theme, mobile layout, sign-in, and saved books.
Files
Reading list: agent notes
An example built from @kody/app-starter. Only app/content/site.ts, public/tokens.css, and package.json differ from the starter.
Start with search({ entity: "guide:making_great_apps" }). Ask the person who
the app is for before you change anything.
No build step
Starters must work with no local build step. Kody bundles the source on
publish, so edit and republish source files directly (packageSave or a git
push, then publish). Keep the app buildless: no bundler config, no build
scripts, no TanStack Start. Use TanStack Router, Query, and Form from
dependencies.
Where to work
app/content/site.ts: names, copy, and sample text.public/tokens.css: the shared theme tokens (--color-*,--font-sans,--radius,--space-1to--space-4) for light and dark. Style everything with these names.app/routes/: one file per page. Add the route toapp/router.tsx.app/data/: storage helpers.packageStorage()keys are per signed-in person (items:<userId>).app/components/ui.tsx: Button, TextField (always labeled), Alert, LoadingRows, EmptyState. Reuse them for new pages.
How it fits together
app/server.tsxis thekody.app.entryfetch handler. It serves/health, the JSON API under/api/, and server-renders every page.app/client.tsxhydrates the same router in the browser.- Sign-in reads the verified
X-Kody-Visitorheader (app/auth.ts). Sign-in and sign-out links go to/-/auth/loginand/-/auth/logout. - Every route has a pending state (
LoadingRows), and the root route has an error state with a retry button and a not-found page.
Smoke tests
kody dev fetch /healthreturns{ "ok": true }.kody dev fetch /and/itemsreturn HTML with a<main id="main">.kody dev fetch /api/itemsreturns 401 when signed out.
After you build
Run kody app check and fix what it shows.