1.9 KiB
1.9 KiB
1. Project setup
- 1.1 Scaffold the
Next.jsapp with TypeScript, linting, and baseline project configuration. - 1.2 Add runtime dependencies for Prisma, SQLite, validation, charts, and
OpenAIintegration. - 1.3 Add development dependencies and scripts for testing, Prisma generation, and local development.
- 1.4 Add base environment and ignore-file setup for local database and API key configuration.
2. Persistence and shared services
- 2.1 Define Prisma models for
Expense,Paycheck, andMonthlyInsightand create the initial SQLite migration. - 2.2 Implement shared validation schemas for expenses, paychecks, and month query parameters.
- 2.3 Implement shared money and local-date utilities for month boundary calculations.
3. Expense and paycheck workflows
- 3.1 Implement expense API routes for create, list, and delete operations.
- 3.2 Implement paycheck API routes for create, list, and delete operations.
- 3.3 Build the
Add Expenseview with form submission, validation feedback, and expense listing. - 3.4 Build the
Income/Paychecksview with form submission, validation feedback, and paycheck listing.
4. Dashboard and insights
- 4.1 Implement monthly dashboard aggregation services for totals, category breakdowns, and derived comparisons.
- 4.2 Implement the dashboard API route and render dashboard sections for month-to-date metrics and comparisons.
- 4.3 Implement the
OpenAIinsight 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.