Remixable Val Town template. Connect your bank via Teller or upload CSV exports, get AI-powered categorization with an editable prompt, and track your monthly burn with interactive charts.
Uses Val Town's per-val scoped SQLite (
std/sqlite/main.ts) so each remix gets its own isolated database — no prefix dance, no shared state with other vals on the same account.
- Remix this project on Val Town
- Set environment variables (see below)
- Open the dashboard — upload a CSV or connect a bank
- Hit "Preview Classification" to categorize transactions with AI
Time to value: ~5 minutes
The feedback loop is the key insight: more data + prompt refinement = better classification over time. Once your data is categorized, the structured output powers everything downstream.
Once your transactions are classified, the structured data is yours to build on. Some starting points:
- Find & cancel subscriptions — "Show me all my recurring subscriptions. Which ones haven't I used in 3 months? Help me cancel them by next billing cycle."
- Budget guardrails with alerts — Set up a cron that texts you when a category (restaurants, golf, shopping) exceeds your monthly budget. Proactive, not reactive.
- Spending trends & accountability — "How much do I spend on food per day on average? How do I trend that down?" Have the agent check in weekly and keep you honest.
- Smart digest emails — Weekly or monthly email: "You spent $X this month, up 15% from last month. Top 3 categories that grew: ..."
- Ask anything — The
/asktab already lets you chat with your financial data. Ask "what did I spend on travel last quarter?" or "am I on track for my savings goal?" - Custom automations — Val Town crons + Claude + your categorized data = any workflow you can imagine. Budget forecasting, tax prep summaries, spending comparisons across months.
| File | Type | Purpose |
|---|---|---|
app.ts |
http | Dashboard, settings, API routes |
db.ts |
script | SQLite schema, config helpers, default categories |
lib.ts |
script | Formatting, HTML shell, category colors |
classify-engine.ts |
script | LLM classification engine (tool use with JSON schema) |
classify-ui.ts |
script | Classification drawer UI (extracted for file size limits) |
classify.ts |
interval (daily) | Thin cron wrapper — calls runClassification() |
sync-engine.ts |
script | Teller mTLS sync logic |
sync.ts |
interval (15min) | Thin cron wrapper — calls runSync() |
| Var | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
Yes | Claude API for AI classification + Ask tab |
TELLER_APP_ID |
No | Your Teller application ID (free at teller.io) |
TELLER_ENV |
No | sandbox (default), development, or production |
TELLER_CERT |
No | Teller mTLS certificate PEM (not needed for sandbox) |
TELLER_KEY |
No | Teller mTLS private key PEM (not needed for sandbox) |
Teller vars are only needed if you want automatic bank sync. Without them, CSV upload still works. Sandbox mode lets you test with fake bank data without mTLS certificates — just set TELLER_APP_ID.
Set these in Val Town Environment Variables — they are never stored in code.
- / — Monthly burn overview, stacked bar chart, Spend/Net Income toggle, category breakdown with expandable transactions, unclassified banner with classification drawer
- /ask — Chat with your financial data using Claude (natural language queries)
- /settings — Classification prompt editor, Teller bank connection, CSV upload (Chase, Amex, Venmo), category management
- Cross-source dedup — Matches same amount ±2 days across institutions, marks bank-side as transfer
- LLM classification (Claude Haiku) — Uses Anthropic tool use with JSON schema to enforce valid categories. The
categoryfield is constrained to anenum— no hallucinated categories possible - User overrides — Manual category changes are permanent and never re-classified
- Click "Review & Classify" banner → drawer opens with unclassified transactions
- Review/edit the classification prompt → click "Preview Classification"
- Review results with color-coded category pills + confidence scores
- Edit prompt inline and "Retry" or "Approve All" to commit
Housing, Food, Transportation, Shopping, Entertainment, Health, Subscriptions, Bills, Travel, Investments, Transfers, Salary, Income, Gifts, Other
Customizable on the Settings page. The tool schema updates dynamically.
Supports Chase, Amex, and Venmo CSV exports with automatic format detection and deduplication. Upload via Settings page.
transactions -- All transactions (bank + CSV)
monthly_summaries -- Pre-computed monthly aggregates
config -- Key-value settings (classification prompt, categories, etc.)
teller_tokens -- Linked bank account tokensPlain table names — no prefix needed because this val uses Val Town's per-val scoped SQLite via import { sqlite } from 'https://esm.town/v/std/sqlite/main.ts'. Each remixed val gets its own isolated DB. The legacy account-scoped import (std/sqlite without /main.ts) would share one DB across all your vals.
