Fuku is a personal finance assistant with an 8-bit pixel mascot. Type or say things like "makan siang 25rb" and Fuku records the transaction, picks the category, and answers questions about your spending.
- Next.js 16 (App Router, TypeScript, Tailwind 4)
- Supabase (Postgres) as the ledger and system of record, with RLS per user
- TypeDB as the ontology projection (category hierarchy, counterparties, learned mappings)
- Streaming chat via the AI SDK with tools, plus an offline Indonesian rule-based fallback
- Node.js 20+
- Docker
- Supabase CLI
- TypeDB CLI (optional if you already run TypeDB elsewhere)
- Install dependencies:
npm install- Copy the env file and fill in the values:
cp .env.example .env.local- Start infrastructure:
npm run infra:up
npm run typedb:setupThis starts TypeDB (localhost:8000, database fuku) and the local Supabase stack. Apply migrations with:
supabase db reset- Generate icons (already committed, only needed if you change the sprite):
npm run gen:icons- Run the dev server:
npm run devOpen http://localhost:3000, sign up, and start talking to Fuku.
See .env.example for the full list.
NEXT_PUBLIC_SUPABASE_URL/NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY- local Supabase APITYPEDB_URL,TYPEDB_USER,TYPEDB_PASSWORD,TYPEDB_DATABASE- TypeDB HTTP APILLM_BASE_URL,LLM_API_KEY,LLM_MODEL- optional OpenAI-compatible provider
If no LLM key is configured, the assistant falls back to a deterministic Indonesian rule-based brain, so the app works fully offline.
npm run dev- dev servernpm run build- production buildnpm run start- serve the production buildnpm run lint- ESLintnpm run typecheck- TypeScript checknpm run infra:up/infra:down/infra:status- manage Docker infranpm run typedb:setup- create TypeDB database and schema (idempotent)npm run gen:icons- regenerate app icons from the sprite
- Messages go to
src/app/api/chat/route.ts, which exposes tools (recordTransactions,getMonthlySummary,findTransactions,topPlaces,deleteTransaction). src/lib/parser.tsparses Indonesian free text (amounts, dates, categories) deterministically.src/lib/finance.tsreads and writes Postgres through Supabase with the user's session.src/lib/ontology.tsmirrors category hierarchy and counterparty knowledge into TypeDB; the dashboard falls back to a local hierarchy walk if the TypeDB totals drift from the ledger.
See LICENSE.