Goatside

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 changes

Sign 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

PathWhat
apps/goatsideThe app you self-host, on TanStack Start, deployed to Vercel
apps/webThis site, the landing page and these docs, built with Fumadocs
packages/coreThe entry parser, account matching, money and dates, in plain TypeScript
packages/dbThe Drizzle schema and migrations for Turso
packages/authSign-in for the one account, with credentials from env and a signed session cookie
packages/aiThe agent's logic for categories, people, accounts and questions
packages/uishadcn/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 DB

pnpm 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:ask

Add shadcn components from an app directory. The CLI installs them into packages/ui:

pnpm dlx shadcn@latest add drawer -c apps/goatside

Writing 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.

On this page