BillTracker/scripts
null 1238ac5b14 feat(demo): full "take it for a ride" seed + surgical, correct removal
The demo seeder created bills + categories only, so nearly every page
rendered empty; clear-demo had a data-loss bug and error-protection gaps.

Seed now populates every user-facing surface: bills with autopay states,
3-6 months of payment history (with drift + debt paydown), monthly
skips/overrides/snoozes/notes, a demo bank source + accounts + matched/
unmatched/subscription transactions, categorised spending + budgets +
rules, planning income/starting-amounts, category groups, an active
snowball plan (+ extra-payment), merchant rules, and a calendar feed —
so a new user can explore Tracker (incl. overdue/drift), Analytics,
Summary, Spending, Snowball, Payoff, Transactions, Matches, Subscriptions,
Banking and Calendar with realistic data.

Correct removal (the emphasis):
- Migration v1.07 adds an is_seeded marker to the 12 user-scoped,
  non-cascading demo tables (bill-children cascade with their seeded bill).
- clearSeededDemoData() (new, in userDataService alongside eraseUserData)
  removes ONLY seeded rows in one transaction, child->parent, and keeps a
  seeded category if a user's own bill still references it.
- Fixes the category collision: seed marks ONLY categories it creates, so
  clear no longer deletes the user's default categories / uncategorises
  their real bills.

Error protection: idempotency guard on seeded (not all) bills -> 409
instead of a fake "created 0"; whole seed wrapped in one transaction
(atomic); rate-limit + audit + standardizeError on all three routes;
seeded-status reports payments/transactions counts; dead --force removed.
Client copy/counts corrected.

Verified: typecheck/check clean; server suite 232/232 (+6 new); client
typecheck/lint/build clean; e2e probe 17/17; on a COPY of the real prod
DB the v1.07 migration applies (integrity ok) and a seed->clear round-trip
on the data-rich user restores their real data byte-for-byte with no
orphans.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 13:06:47 -05:00
..
docker-push.sh v0.27.02 push 2026-05-14 21:00:07 -05:00
docker-test.sh v0.25.0: roadmap redesign, import CSRF fix, AdminDashboard removed 2026-05-11 21:42:36 -05:00
ecosystem.config.js refactor(server): migrate app entry point to TypeScript (.cts) — server migration 100% 2026-07-06 11:41:56 -05:00
migrate-db.js refactor(server): migrate app entry point to TypeScript (.cts) — server migration 100% 2026-07-06 11:41:56 -05:00
pipeline-report.py feat: merge pipeline workflow into bill-tracker (batch v0.36.0) 2026-06-03 20:28:37 -05:00
prod-smoke.js test(qa): production-build smoke (B15) — validates split chunks at runtime 2026-07-02 21:45:25 -05:00
prod-smoke.sh fix(migration): repair server.js/.cts launch + require refs missed in the JS→TS migration 2026-07-06 12:05:40 -05:00
seedDemoData.cts feat(demo): full "take it for a ride" seed + surgical, correct removal 2026-07-06 13:06:47 -05:00
server-setup.sh initial commit 2026-05-03 19:51:57 -05:00
test-cookie-options.js refactor(server): migrate app entry point to TypeScript (.cts) — server migration 100% 2026-07-06 11:41:56 -05:00
test-import-fixture.xlsx initial commit 2026-05-03 19:51:57 -05:00
test-import-multi-fixture.xlsx initial commit 2026-05-03 19:51:57 -05:00
test-import.js refactor(server): migrate app entry point to TypeScript (.cts) — server migration 100% 2026-07-06 11:41:56 -05:00
test-oidc-smoke.js refactor(server): migrate app entry point to TypeScript (.cts) — server migration 100% 2026-07-06 11:41:56 -05:00