Commit Graph

14 Commits

Author SHA1 Message Date
3bac852a40 Lazy paycheck generation, regenerate button, inline gross/net edit
- GET /api/paychecks returns virtual data (id: null) without writing to
  DB when no records exist for the month
- First interaction (bill toggle, OTE add, actual add) lazily calls
  POST /api/paychecks/generate to persist the paycheck
- New PATCH /api/paychecks/:id to update gross and net
- Regenerate/refresh button syncs gross/net from current Settings
- Inline pencil edit for gross/net on each paycheck column header
- 'preview' badge and info banner shown for unsaved months

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 20:06:41 -04:00
195a36c8a5 Add Recharts charts to Monthly Summary and Annual Overview
Monthly Summary:
- Spending breakdown donut (bills / variable / one-time)
- Variable spending by category bar chart
- Added actuals.by_category to /api/summary/monthly response

Annual Overview:
- Income vs. spending grouped bar chart
- Surplus/deficit bar chart (green/red per month)
- Stacked variable spending by category across all months
- New /api/summary/annual endpoint (single DB round trip for full year)
- AnnualOverview now uses /api/summary/annual instead of 12 parallel calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:58:50 -04:00
ea2ee9c5e6 Lock bill amount_override when marked paid, clear on unpaid
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:53:46 -04:00
00b55338af Fix pay_date NaN: parse DATE columns as strings in pg
pg returns DATE columns as JS Date objects which serialize to ISO
timestamps, causing split('-') to produce NaN for the day portion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:51:05 -04:00
3d41c623bc Fix dev compose: npm install on container startup
The ./server bind mount overwrites /app/server including node_modules
installed during the Docker build. Running npm install on startup
ensures deps are present after the volume mount.

Also reverts the node_modules named-volume workaround in favor of
this cleaner approach (requires node installed locally for non-Docker dev).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:27:52 -04:00
22b1cfbe6b Add monthly summary view
GET /api/summary/monthly returns income, bills, actuals,
and one-time expense totals. Summary page shows stat cards
and a breakdown table with surplus/deficit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:15:25 -04:00
17af71a7c7 Add variable expense actuals logging
API for expense categories and actuals with full CRUD.
Paycheck view shows actuals section and includes them in
remaining balance calculation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:12:25 -04:00
9ada36deda Add one-time expenses per paycheck
API for adding, removing, and marking one-time expenses paid.
Paycheck view supports inline add form and paid/delete actions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:12:07 -04:00
8a9844cf72 Add paycheck-centric main view
Two-column monthly view showing bills, amounts, paid status,
and remaining balance per paycheck. Month navigation included.
Also adds PATCH /api/paycheck-bills/:id/paid endpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:09:51 -04:00
afe3895210 Add paycheck generation and retrieval API
Auto-generates paycheck records from config and active bills.
GET /api/paychecks auto-generates if month not yet created.
Idempotent generation preserves existing paid status.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:08:03 -04:00
0835b86c1a Add bills CRUD API and management UI
Full REST API for bill definitions with validation.
Bills page supports add, edit, toggle active, and delete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:06:43 -04:00
5f5f1111c5 Add config API and settings UI
GET/PUT /api/config for pay dates and amounts.
Settings page fetches and saves configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:04:33 -04:00
adebe10f52 Add PostgreSQL schema and migration runner
All tables per PRD data model with default config seeds.
Migration runner tracks applied migrations in DB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:03:57 -04:00
83abac52f6 Add Docker Compose project scaffold
Sets up the full monorepo structure with:
- Multi-stage Dockerfile (client-build + production stages)
- docker-compose.yml for production, docker-compose.dev.yml overlay for development
- Express server (port 3000) with pg pool, health route, and SPA static file serving
- React 18 + Vite client with react-router-dom v6, nav bar, and placeholder page components
- .env.example with PostgreSQL and app config
- Empty db/migrations/ directory for future migrations
- CLAUDE.md updated with development workflow commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:02:17 -04:00