## 1. Project setup - [x] 1.1 Scaffold the `Next.js` app with TypeScript, linting, and baseline project configuration. - [x] 1.2 Add runtime dependencies for Prisma, SQLite, validation, charts, and `OpenAI` integration. - [x] 1.3 Add development dependencies and scripts for testing, Prisma generation, and local development. - [x] 1.4 Add base environment and ignore-file setup for local database and API key configuration. ## 2. Persistence and shared services - [x] 2.1 Define Prisma models for `Expense`, `Paycheck`, and `MonthlyInsight` and create the initial SQLite migration. - [x] 2.2 Implement shared validation schemas for expenses, paychecks, and month query parameters. - [x] 2.3 Implement shared money and local-date utilities for month boundary calculations. ## 3. Expense and paycheck workflows - [x] 3.1 Implement expense API routes for create, list, and delete operations. - [x] 3.2 Implement paycheck API routes for create, list, and delete operations. - [x] 3.3 Build the `Add Expense` view with form submission, validation feedback, and expense listing. - [x] 3.4 Build the `Income/Paychecks` view with form submission, validation feedback, and paycheck listing. ## 4. Dashboard and insights - [x] 4.1 Implement monthly dashboard aggregation services for totals, category breakdowns, and derived comparisons. - [x] 4.2 Implement the dashboard API route and render dashboard sections for month-to-date metrics and comparisons. - [ ] 4.3 Implement the `OpenAI` insight service with structured monthly snapshot input and sparse-month fallback logic. - [ ] 4.4 Implement insight generation and display in the dashboard, including persisted monthly insight records. ## 5. Verification - [ ] 5.1 Add automated tests for validation, persistence, dashboard aggregates, and insight fallback behavior. - [ ] 5.2 Verify the primary user flows in the browser, including expense entry, paycheck entry, dashboard updates, and insight generation.