2.5 KiB
2.5 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 offline
Ollamainsight 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 and offline-runtime fallback messaging.
5. Offline categorization
- 5.1 Implement deterministic merchant-to-category mapping for known merchants.
- 5.2 Implement a local-model category suggestion endpoint for unknown merchants.
- 5.3 Update the expense entry flow to auto-fill known merchants and require confirmation for model-generated suggestions.
- 5.4 Add local runtime availability handling so category suggestion falls back to manual selection without cloud calls.
6. Verification
- 6.1 Add automated tests for validation, persistence, dashboard aggregates, offline insight fallback behavior, and category suggestion rules.
- 6.2 Verify the primary user flows in the browser, including expense entry, paycheck entry, dashboard updates, category suggestion, and insight generation.