ac3d18a483148d1c02a7f6ef11ff28a0d8268893
Asked for as a reset that includes the currencies and the seed categories. Between an empty dataset and first-run state the owner chose first-run: the three starter posts, the DKK/USD/EUR table, the baked rates, this month at zero income, no purchases. store.reset() calls the same createSeedDataset(currentMonth, seedRates) that load() uses on a first run, through the same write queue. Seeding stays in the store rather than moving into the UI so "reset" and "a brand-new browser" cannot drift apart, and a reset issued while a mutation is still in flight cannot be overtaken by it. The confirm panel reuses the import flow's shape and, more importantly, its order of operations: the JSON backup downloads BEFORE the destructive write, and a backup that fails aborts the reset rather than destroying the only copy of the user's data. The write is guarded, which src/ui/storeWriteErrors.test.ts requires of every direct store call in the UI. Also gives both confirm panels and the error line the top margin they never had — they butted straight against the button row. Verified by clicking through in real Chrome and reading IndexedDB back: 3 seed posts, DKK/USD/EUR, both baked manual rates, 0 purchases, one month at zero income. Whether headless Chrome wrote the backup file is not observable here, so the backup is issued rather than confirmed openable — a gap the import flow has always had too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Budget 2.0
A personal budgeting PWA. Envelope-style monthly budgets with rollover, split purchases, finance plans, multi-currency, and JSON/ODS export. All data lives in your browser — there is no server and no account.
Development
bun install
bun --hot src/index.ts # dev server with hot reload
bun test # run the test suite
bun run build # production build into dist/
Self-hosting with Docker
docker build -t budget2 .
docker run --rm -p 3000:3000 budget2
To serve from a subpath, build and run with BUN_PUBLIC_BASE_PATH:
docker build -t budget2 --build-arg BUN_PUBLIC_BASE_PATH=/budget/ .
docker run --rm -p 3000:3000 -e BUN_PUBLIC_BASE_PATH=/budget/ budget2
GitHub Pages
Pushing to main builds and deploys to Pages automatically, using
/<repository-name>/ as the base path. Enable Pages with "GitHub Actions" as
the source in the repository settings.
Your data
Everything is stored in this browser's IndexedDB. Export regularly from Settings → Your data: the JSON export is both your backup and how you move your budget to another device. Import replaces everything and downloads a backup of your current data first.
Known limitations
- Data is per-browser. There is no account and no sync. If you clear this browser's site data, or move to a different browser or device, your budget is gone unless you exported it first. The JSON export is not just a nice-to-have backup — it is the only way to move a budget between devices.
- The install prompt is incomplete.
manifest.webmanifestcurrently only ships an SVG icon. Chrome requires PNG icons at 192×192 and 512×512 to offer the "Install app" prompt; until those are added, the app works fine as a regular tab but won't be installable on Chrome/Chromium.
Documentation
- Design:
docs/superpowers/specs/2026-09-01-budget-app-design.md - Implementation plan:
docs/superpowers/plans/2026-09-01-budget-app.md
Languages
TypeScript
98.3%
CSS
1.4%
HTML
0.2%