Expense Analyzer is a personal finance dashboard built with Astro, React islands, and a CSV-first workflow. It turns a simple export file into an interactive website for understanding cashflow, category behavior, recurring charges, anomalies, and higher-level spending insights.
- Overview dashboard for top-level income, expense, and net trends
- Cashflow analysis for monthly direction, rolling trends, and year-over-year comparisons
- Category analysis for spend concentration, category trends, and spike detection
- Insights page for narrative learnings and optimization opportunities
- Transactions explorer for searchable drill-down into the raw ledger
- Recurring page for subscriptions and repeated spending patterns
- Astro + TypeScript
- React islands
- Tailwind CSS
- Recharts
- Papa Parse + Zod
- date-fns
- Vitest + Testing Library
- Playwright
The app expects a CSV with exactly these columns:
Date,Note,Amount,Category,Type
Rules:
Typemust beExpenseorIncomeAmountis stored as a positive number in the CSVTypedetermines whether the row counts as positive or negative cashflow- Dates are grouped by the calendar date embedded in the timestamp
The app loads CSV files in this order:
input/export.csvinput/export.local.csvinput/demo-export.csv
Use input/export.csv for your private local data. It is ignored by git.
The committed input/demo-export.csv is mock data for the public repo and GitHub Pages demo.
npm install
npm run devThen open the local URL shown by Astro.
Useful commands:
npm run build
npm run test
npm run test:e2e- Start with the global filter bar at the top of each page.
- Narrow by month range, category, transaction type, or free-text search.
- Use the quick presets like
Last 3 monthsorLast 12 monthsfor faster comparisons. - Copy the current view from the filter bar if you want to save or revisit a specific analysis state.
- Use the charts as navigation: several views let you click into a category or pattern and inspect the matching transactions.
High-level summary of your money: top KPIs, monthly income vs expense, big categories, top merchants, and recent activity.
Monthly income, expense, net, rolling averages, savings-rate style reads, and year-over-year comparisons.
Category totals, share of wallet, stacked monthly trends, and category spikes.
Narrative learnings extracted from the data, plus practical optimization opportunities with supporting evidence.
A filtered transaction explorer for validating the charts against the raw rows.
Repeated charges, likely subscriptions, recurring monthly drag, and cadence/amount patterns.
This repository is designed for a public GitHub repo:
- real exports are ignored by
.gitignore - the public repo uses
input/demo-export.csv - a GitHub Pages workflow is included at
.github/workflows/deploy.yml
|
|
|
|
|
|
|
|







