Development
Run Goatside locally, find your way around the repo, and contribute.
Run it locally
You need Node 24 or newer, pnpm and the Turso CLI, which serves the local database.
pnpm install
cp apps/goatside/.env.example apps/goatside/.env.local # then fill it in
pnpm dev # local DB on :8080, app on :3000, this site on :3001
pnpm db:migrate # first run, and after schema changesSign in at localhost:3000 with the GOATSIDE_USERNAME and
GOATSIDE_PASSWORD from your .env.local. Locally, AI needs an AI_GATEWAY_API_KEY
from the AI Gateway dashboard. Without one, entries save uncategorized.
Repo layout
| Path | What |
|---|---|
apps/goatside | The app you self-host, on TanStack Start, deployed to Vercel |
apps/web | This site, the landing page and these docs, built with Fumadocs |
packages/core | The entry parser, account matching, money and dates, in plain TypeScript |
packages/db | The Drizzle schema and migrations for Turso |
packages/auth | Sign-in for the one account, with credentials from env and a signed session cookie |
packages/ai | The agent's logic for categories, people, accounts and questions |
packages/ui | shadcn/ui components on Base UI, the coin brand, theme and styles |
Commands
pnpm typecheck
pnpm test # vitest
pnpm lint # oxlint
pnpm format # oxfmt
pnpm db:generate # new migration after editing packages/db/src/schema
pnpm db:studio # browse the local DBpnpm install sets up a pre-commit hook with lefthook. It formats
the files you stage with oxfmt and lints them with oxlint, so a commit with a lint warning
stops. To skip it once, commit with --no-verify.
Sample data and evals:
# 3 months of sample data into a separate local DB (local URLs only)
TURSO_DATABASE_URL=http://127.0.0.1:8090 pnpm --filter @workspace/db demo
# live accuracy evals for categorizing (needs AI_GATEWAY_API_KEY)
pnpm --filter @workspace/ai eval
# chat agent scenarios against a local demo DB (writes to it)
TURSO_DATABASE_URL=http://127.0.0.1:8090 pnpm --filter app eval:askAdd shadcn components from an app directory. The CLI installs them into packages/ui:
pnpm dlx shadcn@latest add drawer -c apps/goatsideWriting these docs
The docs are MDX files in apps/web/content/docs. Fumadocs
renders them on TanStack Start. Each folder's meta.json sets the order in the sidebar.
The site also serves every page as Markdown at its URL plus .md, and the whole set at
/llms.txt and /llms-full.txt.