Expense Tracker
A personal expense tracker where you log spending in plain language through a Discord bot — "nasi lemak 8" — and a language model turns it into a structured, validated expense. Also reads receipt photos, transcribes voice notes, and answers questions about your own spending. The web dashboard splits Spend from Transfers and tracks payday-to-payday budgets, savings goals and fixed monthly costs.
Solo full-stack — product, LLM integration, and deployment
Problem
Logging expenses in a form is slow enough that it doesn't get done. Free-text entry is faster, but free text is messy, and a model's output can't be trusted to be well-formed or sensible.
Approach
Every model call is a single judgment step wrapped in checks. Free text goes to a small, cheap model through OpenRouter and the reply is validated against a strict schema. A reply that fails validation becomes an unparsed entry the user can fix by hand. A date that isn't a real calendar date, or falls outside the last 12 months, is replaced with today and the reply says so. Past corrections are fed back into the prompt so the parser improves on the user's own habits.
Outcome
A deployed tool where a model failure degrades to manual entry instead of bad data. The model makes one judgment per call and never chooses tools or runs multiple steps.
Highlights
- Correction-aware prompting: the last 20 user corrections are injected into the prompt so parsing adapts to how the user actually writes
- Schema-validated parsing with a safe fallback: replies are checked with Zod, failures become an unparsed entry, and an implausible date falls back to today with a note in the reply
- Cost-aware model choice: Claude Haiku 4.5 by default, because the task is short structured extraction
- Budgeting by pay cycle rather than calendar month: Left to spend is income minus fixed costs minus spend so far, and fixed costs are entered automatically on their due day
- Responsive dashboard with a sidebar layout on desktop: category bar, daily spend chart, repeat-spend list, Spend/Transfers filters and savings-goal (Tabung) progress
- Also: receipt photo parsing, voice-note logging, natural-language questions over recent spending, daily and monthly summaries, passkey login, and an API-key health check