Commit Graph

6 Commits

Author SHA1 Message Date
3e6231b654 Teach local AI from user category corrections
- Add MerchantCorrection model: upsert by merchantName, Category enum
- Check corrections DB first in suggestCategoryForMerchant (source: "learned",
  no confirmation required); falls through to rules then Ollama if no match
- Inject recent corrections as few-shot examples in the Ollama prompt so the
  model improves even for merchants not yet explicitly corrected
- Add POST /categories/correct route to persist corrections
- Detect category override on form save (suggestedCategory !== chosen category)
  and silently fire a correction — no extra UX required
- Fix test isolation: beforeEach re-applies vi.fn() defaults after restoreAllMocks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 17:28:26 -04:00
1015e24e69 Add dashboard error handling, seed data, and Docker host Ollama wiring
- Wrap getDashboardSnapshot in try/catch; return JSON 500 instead of crashing
- Add prisma/seed.ts with realistic Feb + Mar 2026 data: biweekly $2,850 pay
  schedule, $2,430 rent, expenses across all 8 categories
- Update Dockerfile and backup route for host Ollama runtime

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 17:20:38 -04:00
83d6891023 Add biweekly pay schedule with projected paychecks and dashboard integration
- Add PaySchedule model (anchorDate + amountCents + active flag)
- Add /pay-schedule API route (GET, POST, DELETE)
- Project biweekly pay dates from anchor; deduplicate against manual paychecks
- Merge projected paychecks into dashboard totals and daily chart
- Fix DST day-shift bug in getProjectedPayDates by using Date.UTC throughout
- Rewrite paycheck workspace: schedule panel at top, manual entry below,
  projected dates with "Mark received" buttons, confirmed badges
- Pass paySchedule context to Ollama insight prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 17:20:32 -04:00
a745c0ca1e Add offline monthly insights with Ollama 2026-03-23 14:12:35 -04:00
dec639ec16 Fix local database ignore rules 2026-03-23 12:37:05 -04:00
905af75cd8 Implement expense tracking foundation for v1 2026-03-23 12:32:36 -04:00