Commit Graph

13 Commits

Author SHA1 Message Date
AJ
a44b3d41ac Major refactor: Split Cards and Accounts into separate tables
Schema Changes:
- Add Account model (Institution, AccountType enum, Last4, Owner, Nickname)
- Add Transfer model for tracking money movement between accounts
- Update Transaction to support both CardId and AccountId (nullable FKs)
- Rename Transaction.CardLast4 → Last4 (works for both cards and accounts)
- Add PaymentMethodLabel computed property to Transaction
- Create EF Core migration: SplitCardsAndAccounts

Data Model Improvements:
- Accounts: Checking, Savings, Other types
- Transfers: Source/Destination accounts, optional link to original transaction
- Transactions can now link to either a Card OR an Account
- Transfer categories excluded from spending reports via TransactionFilters

UI Pages:
- Add Accounts.cshtml - List all bank accounts with transaction counts
- Add EditAccount.cshtml - Create/edit bank accounts
- Add Accounts link to navigation
- Update all references from CardLast4 to Last4

Service Layer Updates:
- Update CardResolutionResult to use nullable CardId and renamed Last4
- Update TransactionKey record to include AccountId
- Update IsDuplicate check to include both CardId and AccountId
- Update all PaymentMethodLabel usage across pages

This architecture allows proper separation of credit cards from bank
accounts and enables tracking of transfers between accounts without
double-counting in spending reports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 20:52:54 -04:00
AJ
227e9dd006 Fix double-counting issue and refactor category mapping forms.
Transaction Filtering:
- Add TransactionFilters helper class to exclude transfer categories from spending reports
- Exclude "Credit Card Payment" and "Banking" categories from dashboard top spending
- Add ExcludeTransfers() extension method for reusable filtering
- Update dashboard header to indicate transfers are excluded

Category Mappings Refactor:
- Split form models into separate AddMappingModel and UpdateMappingModel
- Remove [BindProperty] attributes and use parameter binding instead
- Eliminate cross-validation issues between add/edit forms
- Simplify validation logic by removing manual ModelState cleanup

This fixes the issue where credit card payments were counted as spending
even though they're just transfers between accounts, causing inflated
spending totals on the dashboard.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 18:42:40 -04:00
AJ
ff14aed65f Add card management pages and enhance category mappings UI.
Features added:
- Cards page with list/create/edit/delete functionality
- EditCard page for modifying card details
- Enhanced CategoryMappings UI with inline add/edit/delete modals
- Category dropdown autocomplete in mapping forms
- Priority badges and visual indicators for high-priority mappings
- Click-to-edit functionality on patterns

Improvements:
- TransactionCategorizer: Add TARGET.COM to online shopping patterns
- TransactionCategorizer: Set Credit Card Payment to priority 200 to catch before Banking
- TransactionCategorizer: Add database migration comments
- Layout: Add Cards link to navigation
- Layout: Fix Bootstrap JS path
- ValidationScriptsPartial: Use Url.Content for script paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 16:49:18 -04:00
AJ
7ac0dd9dbc Add comprehensive architecture documentation and remove unused Privacy pages.
Created AGENTS.md with detailed documentation covering:
- Project overview and technology stack
- Architecture patterns and service layer design
- Complete domain model documentation
- Service implementations (TransactionImporter, CardResolver, TransactionCategorizer, DashboardService, ReceiptManager, OpenAIReceiptParser)
- Database schema and EF Core configuration
- Key workflows and design patterns
- Security considerations and performance optimizations
- Testing strategies and deployment guidance

Removed unused Privacy.cshtml and Privacy.cshtml.cs pages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 16:21:26 -04:00
AJ
a5046df38c Sanitize file name on upload 2025-10-04 18:19:08 -04:00
AJ
462973cf2f Make notes optional, again 2025-10-04 18:18:40 -04:00
AJ
159e47ee69 Fixed display of file size 2025-10-04 18:18:20 -04:00
AJ
99788a3d2d Moved receipt line items 2025-10-04 18:17:50 -04:00
AJ
65de073c01 Notes is optional when editing transaction 2025-10-04 12:24:36 -04:00
user1
c546235677 Improved parsing utility bills 2025-10-04 11:58:24 -04:00
user1
f01b44e9ac Pagination on Transactions 2025-10-04 03:32:25 -04:00
AJ
d04db5af12 ignore publish folder 2025-10-04 02:19:54 -04:00
AJ
d579029492 Initial commit 2025-10-04 02:13:50 -04:00