Scaffold from the repo Β· or paste anywhere

The one-shot prompt.

For the closest match to the demo, clone this repo, drop your exports (CSV, XLS, or XLSX) into the folder, and paste this into Claude Code. It reuses the finished dashboard as the template and just builds the pipeline for your numbers. No clone? Paste the same prompt into an empty folder and it builds everything from scratch. Either way, it runs on your machine.

scaffold: git clone github.com/MahmoudHalat/claude-finance-dashboard

Prompt β€” paste into Claude Code
GOAL: one self-contained, OFFLINE interactive HTML dashboard that consolidates my bank and
credit-card statement exports (CSV/XLS/XLSX β€” several accounts, different column layouts) into a
personal-finance intelligence report. Do it end to end, locally. Nothing leaves my machine. Use
subagents where they help. Verify it in a browser before you tell me it's done.

━━ STEP 0 β€” pick your path ━━
Look in this folder.
β€’ IF you see `public/dashboard.html` and `DATA_CONTRACT.md` (you're in the claude-finance-dashboard
  repo): SCAFFOLD from them β€” do NOT redesign anything.
    – `public/dashboard.html` is a finished, working, self-contained renderer (Apache ECharts
      inlined). It draws everything from one inlined object: `window.FIN = {…}`.
    – `DATA_CONTRACT.md` documents that object's exact shape, key by key.
    – Your only job: (1) build a local Python pipeline that turns MY statements into that exact
      `window.FIN` JSON, and (2) make my dashboard by copying `public/dashboard.html`, replacing its
      `window.FIN = {…}` block with mine, and stripping the demo branding ("SAMPLE Β· FICTIONAL DATA",
      "// DEMO", the demo <title>) so it shows my real numbers. Match the contract precisely so every
      chart, table and the audit section just work; drop (don't break) any section I have no data for.
β€’ ELSE (empty folder): build the renderer too, from scratch, per "FULL SPEC" at the bottom.

━━ THE DATA MODEL (do this either way β€” it's the important part) ━━
Build a small Python pipeline (pandas/openpyxl only if a file needs it):

1) PARSE every file into one normalized ledger: [date, account, account_type, description, outflow,
   inflow, currency]. Treat each file as one account (LibreOffice headless or xlrd for .xls). Where a
   statement prints its own totals (e.g. an AMEX "charges/payments" summary), reconcile your parse to
   them. De-dupe overlapping re-exports by (date, description, amount) with max-count semantics so
   nothing is doubled or lost.

2) CLASSIFY every row:
   β€’ flow_type β€” exactly one of: spend, income, transfer_internal, card_payment, transfer_person,
     investment, interest, fee, cash, refund, fx.
     THE KEY RULE: money moved between my own accounts, and credit-card bill payments, must NEVER
     count as spending. Only itemized card charges + real debits (mortgage/rent, utilities,
     insurance) are "spend".
   β€’ category (Groceries, Dining, Gas, Travel, Shopping, Housing, Utilities, Insurance,
     Subscriptions, Transport, Health, Charity, …) + a cleaned merchant name (strip processor
     prefixes, store numbers, cities, FX strings). Use a subagent for the long tail of merchants.
   β€’ recurring/subscription detection: a curated catalog of known services (Netflix, Spotify, Apple,
     insurers, telecom, utilities, gym, mortgage…) PLUS a recurrence algorithm (same merchant,
     regular cadence, stable amount). For each subscription compute a robust ~$/month run-rate
     (trailing 12 months, trimming one-off lumps), active/lapsed status, and a monthly timeline.

3) AGGREGATE into the dashboard's data object: monthly / quarterly / yearly rollups; spend-by-category
   over time; income by source; the subscriptions catalog; per-counterparty in/out series; daily
   spend; money-in/out totals; the flow-type summary; and audit-risk metrics (large unexplained
   inbound transfers, income-vs-outflow gap, cash withdrawals, foreign transactions, round-number
   transfers). If scaffolding, emit EXACTLY the `window.FIN` shape in DATA_CONTRACT.md.

4) RENDER: scaffold β†’ swap your data into the copied dashboard. From scratch β†’ inline Apache ECharts
   (vendored locally) + your data into ONE .html that opens offline by double-click.

━━ AUDIT ━━
Include a defensive "if I got audited, what would be flagged?" read: an overall risk score + severity-
ranked flags, each with finding, evidence (the real numbers), exposure, and what to do. Mark it
informational, not tax advice.

━━ PRIVACY ━━
Everything runs locally. Do NOT send my financial data to any external API or service.

━━ WHEN DONE ━━
Open it in a browser, check the console for errors, and screenshot it for me.

━━ FULL SPEC (only if building the renderer from scratch β€” skip if reusing public/dashboard.html) ━━
One page; every section full-width and collapsible; a dark/light toggle that re-themes the charts;
fully mobile-responsive (stacked panels, 2-col KPIs, scrollable short-label legends, heatmap labels
hidden on narrow screens).
  00 Overview β€” KPI tiles: money in, identified income, total spending, money out, active subs,
     ~$/mo digital subs, ~$/mo all recurring, span.
  01 Cash flow β€” diverging monthly chart (income up, spending down, net line); month/quarter/year
     toggle; zoom slider.
  02 Income β€” monthly stacked by source + an all-time donut. (Person-to-person transfers are tracked
     separately, NOT income.)
  03 Spending β€” monthly stacked bars by category, a full-width nested treemap (category β†’ merchant,
     click to drill, breadcrumb back), and a category Γ— period heatmap.
  04 Patterns β€” a GitHub-style daily-spend calendar heatmap (one year + a year selector), a month Γ—
     year heatmap, quarterly grouped bars.
  05 Subscriptions β€” group cards, a "how recurring cost has grown" stacked chart, and a sortable/
     filterable table with per-service sparklines + active/lapsed badges.
  06 Transfers β€” a Sankey (sources β†’ accounts β†’ uses), a top-counterparty diverging bar chart, and a
     click-to-chart per-person in/out timeline + a ledger table.
  07 Accounts β€” per-account summary cards (in / out / net / # records / date range).
  08 Explorer β€” a searchable, filterable, paginated table over every transaction (capped height,
     inner scroll, sticky headers).
  09 Audit β€” the risk assessment above.
  10 Report β€” a short written read of the key findings, from the data.
DESIGN β€” quant-terminal, not generic: IBM Plex Mono (headings/labels/figures) + IBM Plex Sans (body),
tabular nums; zero rounded corners; 1px hairline borders; grid-separated tiles; a subtle graph-paper
background; a neon-green accent on near-black for dark mode + a clean white "quant report" light mode;
ECharts with crosshair pointers, dashed gridlines, zoom sliders, scrollable legends; charts must
re-theme correctly when the toggle flips.
β–Ά See what it builds← Back to overview