Shared expense tracker built with Svelte 5 + SpacetimeDB.
Log expenses, split costs, settle debts — all in real-time across devices. Includes an AI chat assistant that understands your family's finances.
Create a free account at spacetimedb.com, then:
# Install the CLI
npm install -g @clockworklabs/spacetimedb-sdk
# Publish the module (pick your own name)
cd module/spacetimedb
npm install
npm run build
spacetime publish your-ledger-name
cd client
cp .env.example .env
Edit .env with your module name and (optionally) an AI API key:
VITE_STDB_MODULE=your-ledger-name
VITE_AI_API_KEY=your-api-key-here
npm install
npm run dev
Open localhost:5173, pick a nickname, and start logging expenses.
client/ Svelte 5 frontend
src/
App.svelte Main app (4 views: Expenses, Settle, Events, Chat)
lib/db.ts SpacetimeDB connection + reactive stores
lib/utils.ts Utilities (digitalRoot, formatCents, timeAgo)
lib/ai.ts AI chat client (streaming SSE)
module_bindings/ Auto-generated STDB TypeScript types
module/ SpacetimeDB backend
spacetimedb/
src/index.ts Tables, reducers, and server-side logic
desktop/ Neutralino desktop wrapper (optional)
docs/ Documentation
BUILDERS_GUIDE.md AI-guided learning roadmap with math optimizations
See docs/BUILDERS_GUIDE.md for a guided roadmap that
teaches full-stack development through building new features for this app. Each
feature introduces a mathematical optimization from the
Asymmetrica research project.
MIT