Update CLAUDE.md to match current codebase
- Add notification_parsing feature to directory map; analytics no longer placeholder - Fix schemaVersion 2 -> 6 - Update data model: transactions note->merchant + parsing/habit fields, settings.habitTrackingEnabled, accounts.isDefault, parsing tables - Drop completed 'wire FAB' item from What's-left and renumber Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ lib/
|
||||
theme/app_colors.dart # Palette extension (paper/ink/line/accent/positive/negative)
|
||||
theme/theme_mode_controller.dart # @Riverpod(keepAlive) ThemeMode — in-memory for now
|
||||
core/
|
||||
database/app_database.dart # @DriftDatabase, schemaVersion=2
|
||||
database/app_database.dart # @DriftDatabase, schemaVersion=6
|
||||
database/tables/ # users / app_preferences / settings / accounts / categories / transactions
|
||||
database/daos/ # *_dao.dart with .watch*() methods
|
||||
database/converters/enum_converters.dart # TypeConverter + re-exports all enums (UI imports enums from here)
|
||||
@@ -78,7 +78,12 @@ lib/
|
||||
# TransactionsSection, DayHeader, TxRow, MoneyText, FabAddTransaction
|
||||
state/selected_category_filter.dart # account/category filter providers (+ kAllAccountsId)
|
||||
month_summary.dart # client-side aggregates for KPI / donut
|
||||
analytics/ # placeholder
|
||||
analytics/ # analytics_screen + habit_analysis (providers/screen, /analytics/habits)
|
||||
notification_parsing/ # SMS/notification → transaction parsing (rules + AI/OpenRouter).
|
||||
# domain/data/application/presentation; Drift tables + DAOs;
|
||||
# data/parser/ (dedup, confidence, decision_gate, ai_parser),
|
||||
# data/openrouter/ (client, prompts, schema), ParsingWorker.
|
||||
# Screens: inbox, rules_list, rule_editor, parsing_settings, ai_consent, parsing_log
|
||||
profile/ # theme switcher screen
|
||||
shared/
|
||||
widgets/app_scaffold.dart # StatefulShellRoute wrapper + AppBottomNav
|
||||
@@ -94,10 +99,15 @@ Every domain table has a `userId` FK → `users`.
|
||||
|---|---|
|
||||
| `users` | id, name, createdAt |
|
||||
| `app_preferences` | key (PK), value — stores `active_user_id` |
|
||||
| `settings` | userId FK, baseCurrency, themeMode(enum), locale, firstDayOfMonth |
|
||||
| `accounts` | id, userId, name, type(enum), currency, initialBalance(int), iconCode, colorValue, archived |
|
||||
| `settings` | userId FK, baseCurrency, themeMode(enum), locale, firstDayOfMonth, habitTrackingEnabled |
|
||||
| `accounts` | id, userId, name, type(enum), currency, initialBalance(int), iconCode, colorValue, archived, isDefault |
|
||||
| `categories` | id, userId, name, type(enum), iconCode, colorValue, parentId(nullable), archived |
|
||||
| `transactions` | id, userId, accountId, categoryId(nullable), type(enum), amount(int), date, note(nullable), transferToAccountId(nullable), createdAt |
|
||||
| `transactions` | id, userId, accountId, categoryId(nullable), type(enum), amount(int), date, merchant(nullable, was `note`), extraInfo(nullable), transferToAccountId(nullable), obligation/impulse(habit enums, nullable), rawMessageId/autoApplied/appliedByRuleId (parsing), createdAt |
|
||||
|
||||
**Notification-parsing tables** (in `features/notification_parsing/data/drift/`): `raw_messages`,
|
||||
`parse_rules`, `rule_candidates`, `account_bindings`, `transfer_pairing_blocklist`. Their enums live
|
||||
in `notification_parsing/domain/enums.dart`; converters in `.../data/drift/converters.dart` (both
|
||||
imported by `app_database.dart`).
|
||||
|
||||
Enums live alongside their Drift tables; `enum_converters.dart` is the single import point for UI.
|
||||
|
||||
@@ -168,14 +178,13 @@ Icon/color helpers that used to live in `_mock_data.dart` now live with their fe
|
||||
|
||||
## What's left (priority order)
|
||||
|
||||
1. Wire FAB on Home → `/transactions/new` (screen exists; route/launch from FAB pending)
|
||||
2. Analytics screen — `fl_chart` over transaction streams
|
||||
3. Remove demo transactions from `UserSeeder` once add-transaction flow is solid
|
||||
4. Persist theme/locale via `settingsController` (replace in-memory `themeModeController`);
|
||||
1. Analytics screen — `fl_chart` over transaction streams (analytics_screen + habit_analysis exist; expand charts)
|
||||
2. Remove demo transactions from `UserSeeder` once add-transaction flow is solid
|
||||
3. Persist theme/locale via `settingsController` (replace in-memory `themeModeController`);
|
||||
make `MaterialApp.router` read `locale` from settings
|
||||
5. Transfer transactions: fix balance aggregation (`case transfer: break;` in `month_summary.dart`)
|
||||
6. `shared/formatters/` — intl money + date formatters; migrate `MoneyText` + day grouping
|
||||
7. Expand test coverage (currently: transactions repo/controller/form, users controller, onboarding)
|
||||
4. Transfer transactions: fix balance aggregation (`case transfer: break;` in `month_summary.dart`)
|
||||
5. `shared/formatters/` — intl money + date formatters; migrate `MoneyText` + day grouping
|
||||
6. Expand test coverage (currently: transactions repo/controller/form, users controller, onboarding)
|
||||
|
||||
## Open decisions (discuss before implementing)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user