100 Commits
Author SHA1 Message Date
aj 2356b7d5c9 feat(api): add CSV upload import endpoint
Build MoneyMap image / build-and-push (push) Successful in 31s
2026-07-06 21:58:26 -04:00
aj b4211eac30 ci: fix MoneyMap Docker build context 2026-07-06 13:04:07 -04:00
aj 239daac422 ci: add Gitea Actions workflow to build and push Docker image 2026-07-06 09:42:59 -04:00
aj 9281211c24 ci: use master branch (not main) 2026-07-05 22:24:18 -04:00
ajandClaude Opus 4.6 f187b741a2 fix(mcp): set config base path so appsettings.json is found regardless of working directory
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 22:55:38 -04:00
ajandClaude Opus 4.6 274569bd79 refactor(mcp): rewrite all tools to use MoneyMapApiClient instead of direct DB access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:40:23 -04:00
ajandClaude Opus 4.6 4bee73ba26 refactor(mcp): remove Core dependency, switch to HttpClient-based architecture
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:37:45 -04:00
ajandClaude Opus 4.6 6c4f4bea7f feat(mcp): add MoneyMapApiClient typed HttpClient for API communication
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:37:36 -04:00
ajandClaude Opus 4.6 db1d96476b feat(api): add DashboardController with overview and monthly-trend endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:35:57 -04:00
ajandClaude Opus 4.6 51d6aee434 feat(api): add AccountsController with accounts and cards list endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:35:53 -04:00
ajandClaude Opus 4.6 c34ea74459 feat(api): add MerchantsController with list and merge endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:35:49 -04:00
ajandClaude Opus 4.6 9dc1a9064d feat(api): add ReceiptsController with list, detail, image, and text endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:35:06 -04:00
ajandClaude Opus 4.6 5b4a673f9d feat(api): add CategoriesController with list, mappings, and add-mapping endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:34:36 -04:00
ajandClaude Opus 4.6 004f99c2b4 feat(api): add BudgetsController with status, create, update endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:34:07 -04:00
ajandClaude Opus 4.6 e773a0f218 feat(api): add TransactionsController with search, detail, category, and summary endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:33:02 -04:00
ajandClaude Opus 4.6 ccedea6e67 feat(api): add Health and Audit controllers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:32:12 -04:00
ajandClaude Opus 4.6 768b5e015e feat(api): add controller infrastructure, Swagger, remove inline /api/audit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 20:30:49 -04:00
ajandClaude Opus 4.6 2a75c9550e chore: add docs/superpowers, .playwright-mcp, settings.local.json to gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 19:45:13 -04:00
ajandClaude Opus 4.6 7b2d6203df fix: update Dockerfile for multi-project solution structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 19:42:01 -04:00
ajandClaude Opus 4.6 cbc46314db feat(mcp): implement all MCP tools (transactions, budgets, categories, receipts, merchants, accounts, dashboard)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:27:09 -04:00
ajandClaude Opus 4.6 f54c5ed54d feat: add MoneyMap.Mcp project skeleton with stdio transport
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:21:47 -04:00
ajandClaude Opus 4.6 62fa1d5c4c refactor: consolidate service registration into AddMoneyMapCore extension
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:20:23 -04:00
ajandClaude Opus 4.6 d63ded45e1 refactor: abstract IWebHostEnvironment to IReceiptStorageOptions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:19:31 -04:00
ajandClaude Opus 4.6 3b01efd8a6 refactor: move services and AITools to MoneyMap.Core
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:18:20 -04:00
ajandClaude Opus 4.6 3deca29f05 refactor: extract Models and Data into MoneyMap.Core shared library
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 18:16:33 -04:00
ajandClaude Opus 4.6 d831991ad0 Add implementation plan for MoneyMap MCP server
14 tasks covering: Core library extraction, service migration,
IWebHostEnvironment abstraction, shared DI registration, MCP project
skeleton, and all 20 MCP tools across 7 tool files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 16:25:25 -04:00
ajandClaude Opus 4.6 dcb57c5cf6 Add design spec for MoneyMap MCP server
Shared class library (MoneyMap.Core) extraction with MCP console app
for conversational financial analysis, category correction with receipt
image verification, and budget feasibility modeling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 16:17:54 -04:00
ajandClaude Opus 4.6 aa82ee542c Fix: add libman restore to Dockerfile for client-side libraries
Bootstrap CSS/JS and jQuery were gitignored (wwwroot/lib/) so they
were missing from Docker builds, causing all dropdown menus and
styling to break on the deployed version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:31:03 -05:00
ajandClaude Opus 4.6 2f3047d432 Hide spending by category when only one category exists
Both the doughnut chart and top categories table are now hidden
when there's only a single category, as they provide no useful
breakdown in that case. The net cash flow chart expands to full
width when the category chart is hidden.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:17:19 -05:00
ajandClaude Opus 4.6 7725bdb159 Improve: Move select-all checkbox into table header row
Move the "Select all on page" checkbox from the card header into the
first column header of the transactions table, aligned with per-row
checkboxes for a cleaner layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:09:05 -05:00
ajandClaude Opus 4.6 59b8adc2d8 Improve: Restyle UI with modern fintech light theme
Replace the generic Bootstrap dark theme with a polished light theme
featuring an indigo primary color, refined cards with subtle shadows,
uppercase table headers, and updated chart palettes. Pure CSS restyle
with no layout or functionality changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:09:05 -05:00
ajandClaude Opus 4.6 f4ab4c4e7d Config: change Kestrel listen port to 5010 to avoid conflicts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:48:58 -05:00
ajandClaude Opus 4.6 a7c304ccb5 Config: Switch receipt parsing to Qwen3-VL-Thinking model
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:06:18 -05:00
ajandClaude Opus 4.6 f622912f2e Improve: Support reasoning models in AI vision pipeline
Strip <think>...</think> blocks from reasoning model output (e.g.
Qwen3-VL-Thinking) and increase max_tokens from 4096 to 16384 to
accommodate thinking token overhead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:04:29 -05:00
ajandClaude Opus 4.6 299ea3d4fe Cleanup: Remove unused Privacy page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 21:41:01 -05:00
ajandClaude Opus 4.6 b5f46a7646 Cleanup: Remove redundant AI categorization pages
ReviewAISuggestions and ReviewAISuggestionsWithProposals were a two-page
workflow superseded by AICategorizePreview, which handles batch approval,
tabs, and TempData storage in a single page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 20:02:50 -05:00
ajandClaude Opus 4.6 4be5658d32 Improve: Overhaul navigation with grouped dropdowns, breadcrumbs, and quick-actions
Restructure the flat 7-item navbar into logical dropdown groups (Transactions,
Receipts, Accounts), add a prominent Upload button, settings gear icon, breadcrumb
navigation on 11 deep pages, and dashboard quick-action cards with hover effects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:41:56 -05:00
ajandClaude Opus 4.6 324ab2c627 Fix: ViewReceipt parse button now uses parse queue instead of direct parsing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:26:40 -05:00
ajandClaude Opus 4.6 e6512f9b7f Docs: Update ARCHITECTURE.md for tool-use, parse queue, and bulk upload
Document AI tool-use framework, receipt parse queue system, background
worker, bulk upload, ParseStatus enum, and updated AIReceiptParser flow
with tool-aware vs enriched-prompt paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:35 -05:00
ajandClaude Opus 4.6 516546b345 Config: Update storage path, port, and AI model defaults
Change receipt storage to \TRUENAS\receipts, Kestrel port to 5005,
and add AI section with ModelsEndpoint and default ReceiptParsingModel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:31 -05:00
ajandClaude Opus 4.6 2be9990dbc Improve: Default transaction date filter and LLM response viewer
Transactions page now defaults to last 30 days when no date filters are
set. ViewReceipt page adds collapsible raw LLM response payload on
parse logs for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:27 -05:00
ajandClaude Opus 4.6 c3e88df43c Improve: Recategorize page error display and provider detection
Add error message alert for failed proposal applications. Derive AI
provider name from model prefix instead of separate config key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:23 -05:00
ajandClaude Opus 4.6 444035fd72 Refactor: AICategorizePreview with tabbed proposals and rule status
Split proposals into High Confidence / Needs Review tabs. Extract
proposal table into _ProposalTable partial view. Show rule status
(Create/Update/Exists) based on existing category mappings. Persist
proposals in hidden form field to survive app restarts. Add per-tab
select-all and improved error reporting on apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:19 -05:00
ajandClaude Opus 4.6 6e3589f7da Improve: AI categorizer with rule matching and unified model routing
Categorizer now pre-fetches existing rules and includes matching rules
in prompts so the AI respects established mappings. Unified model
routing via CallModelAsync replaces separate provider branching.
Improved pattern instructions require exact transaction name substrings.
Add rule update support (RuleUpdated) when a pattern exists with a
different category.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:14 -05:00
ajandClaude Opus 4.6 5eb27319e1 Feature: Receipt queue dashboard and multi-file upload UI
Add ReceiptQueue page with tabbed dashboard (queued/completed/failed),
AJAX polling for live status updates, and per-receipt retry. Update
Receipts page with multi-file upload modal, file preview, upload
spinner, and bulk retry for failed parses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:09 -05:00
ajandClaude Opus 4.6 705f4ea201 Feature: Receipt parse queue with background worker
Add ReceiptParseQueue (Channel-based singleton) and
ReceiptParseWorkerService (BackgroundService) for sequential receipt
parsing. Replaces fire-and-forget Task.Run with a proper queue.
ReceiptManager now enqueues uploaded receipts and supports bulk upload
via UploadManyUnmappedReceiptsAsync. Worker recovers pending items on
startup. Register IAIToolExecutor and IAIVisionClientResolver in DI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:05 -05:00
ajandClaude Opus 4.6 16c8d121d4 Feature: Add ReceiptParseStatus enum and migration
Add ParseStatus field to Receipt model with states: NotRequested,
Queued, Parsing, Completed, Failed. Includes indexed column and EF Core
migration for tracking receipt parse queue progress.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:14:00 -05:00
ajandClaude Opus 4.6 396d5cfc1d Feature: Database-aware receipt parsing with tool-use and enriched prompts
AIReceiptParser now routes to tool-aware or standard vision clients.
Tool-capable models (OpenAI, Claude, LlamaCpp) call search_categories,
search_transactions, and search_merchants during parsing. Ollama gets
pre-fetched DB context injected into the prompt. Adds suggestedCategory
and suggestedTransactionId fields with AI-driven transaction mapping.
Includes NullableLongConverter for resilient JSON deserialization and
restructured receipt prompt with strict field types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:13:56 -05:00
ajandClaude Opus 4.6 167b7c2ec1 Feature: Add tool-use support to AI vision clients
Add IAIToolAwareVisionClient interface and OpenAIToolUseHelper for
function-calling via /v1/chat/completions. OpenAI and LlamaCpp clients
now support multi-round tool calls, letting the AI query the database
during receipt image analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:13:51 -05:00
ajandClaude Opus 4.6 5c0f0f3fca Feature: Add AI tool-use framework for database-aware receipt parsing
Introduce provider-agnostic tool definitions (AIToolRegistry) and an
executor (AIToolExecutor) that lets AI models query MoneyMap's database
during receipt parsing via search_categories, search_transactions, and
search_merchants tools. Includes an enriched-context fallback for
providers that don't support function calling (Ollama).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:13:47 -05:00
ajandClaude Opus 4.5 865195ad16 Feature: Save AI parsing notes with receipt
Store user-provided parsing notes in the database so they persist
across parsing attempts. Notes are displayed in Receipt Information
and pre-populated in the textarea for future parses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:49:31 -05:00
ajandClaude Opus 4.5 c5fad34658 Feature: Add Settings page with centralized AI model configuration
- Add Settings page for AI model selection with load status indicators
- Add ModelWarmupService to preload configured model on app startup
- Consolidate AI model config to single AI:ReceiptParsingModel setting
- Simplify ViewReceipt and AICategorizePreview to use Settings model
- Improve AI categorization confidence prompt for varied scores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 18:06:02 -05:00
ajandClaude Opus 4.5 29d26b4771 Refactor: Consolidate AI endpoint config to AI:ModelsEndpoint
- Simplify model dropdown to single flat list with local models first
- Show loaded/unloaded status with bullet indicators
- Remove separate Ollama:BaseUrl and LlamaCpp:BaseUrl configs
- All AI vision clients now use AI:ModelsEndpoint (default: athena.lan:11434)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 23:41:05 -05:00
ajandClaude Opus 4.5 38b7d8a9ca Feature: Add dynamic model selection to ViewReceipt page
Enhance receipt parsing model selection:
- Fetch available models from LlamaCpp server dynamically
- Show loaded/unloaded status in model dropdown
- Persist selected model to appsettings.json
- Read default model from AI:ReceiptParsingModel config
- Inject LlamaCppVisionClient and IConfiguration dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:53:40 -05:00
ajandClaude Opus 4.5 fc4855bd1a Refactor: Use session-based TempData provider
Switch from cookie-based to session-based TempData to avoid
cookie size limits when storing AI categorization proposals.
Chain AddSessionStateTempDataProvider() to AddRazorPages().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:53:28 -05:00
ajandClaude Opus 4.5 9fbbeca1e6 Feature: Add AI-Powered Categorization section to Recategorize page
Add new card for AI categorization alongside rule-based:
- Rename existing section to "Rule-Based Categorization"
- Add "AI-Powered Categorization" section with provider badge
- Link to AICategorizePreview for AI category suggestions
- Display explanation of how AI categorization works
- Inject IConfiguration to read AI provider setting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:53:16 -05:00
ajandClaude Opus 4.5 f72c32c52f Feature: Add transaction multi-select for batch AI review
Add selection UI to Transactions page:
- Add checkbox column for selecting transactions
- Add sticky selection bar showing selected count
- Add Select All / Clear Selection controls
- Wire up form to send selected IDs to AICategorizePreview page
- Preserve row click navigation for unselected areas

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:53:05 -05:00
ajandClaude Opus 4.5 c43fe12124 Feature: Add LlamaCpp provider support to TransactionAICategorizer
Enhance AI categorization with multi-provider support:
- Add configurable AI:CategorizationProvider setting (OpenAI/LlamaCpp)
- Add CallLlamaCppAsync() for local LLM categorization
- Improve prompt with existing categories for consistency
- Include additional transaction context (card, account, transfer info)
- Fix batch processing to avoid DbContext concurrency issues
- Add model parameter to interface methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:52:54 -05:00
ajandClaude Opus 4.5 cba20f20fc Feature: Add LlamaCpp model discovery API
Add GetAvailableModelsAsync() to LlamaCppVisionClient that:
- Queries llama.cpp /v1/models endpoint for available models
- Filters out multimodal projector models (mmproj-*)
- Tracks loaded/unloaded status for each model
- Returns sorted list with loaded models first

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:52:41 -05:00
ajandClaude Opus 4.5 b5406106ec Feature: Add AICategorizePreview page for AI transaction categorization
Add new page that allows users to:
- Generate AI categorization suggestions for uncategorized transactions
- Review proposals with confidence levels before applying
- Select specific transactions from Transactions page for AI review
- Choose to create mapping rules for high-confidence matches
- Support both OpenAI and LlamaCpp providers with model selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:52:30 -05:00
ajandClaude Opus 4.5 954af2f952 Chore: Rename docker-build-and-push.cmd to docker-publish.cmd
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:54:38 -05:00
ajandClaude Opus 4.5 541bbf01af Refactor: Simplify receipt storage path handling
Store only filename in database instead of full relative path.
GetReceiptPhysicalPath now combines config base path with filename.
AIReceiptParser uses ReceiptManager for consistent path resolution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:54:27 -05:00
ajandClaude Opus 4.5 de5ee33a77 Feature: Add ReviewReceipts page for receipt-to-transaction mapping
New page shows unmapped receipts with scored transaction candidates,
allowing manual mapping or bulk auto-map. Displays confidence scores
and match quality indicators. Also shows recently mapped receipts
for verification with unmap option.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:54:15 -05:00
ajandClaude Opus 4.5 f3b847cc68 Feature: Enhanced receipt auto-mapping with weighted scoring
Replace simple matching with weighted scoring algorithm (40% amount,
25% date, 35% merchant, 10% due date). Uses confidence thresholds:
- 85%+ auto-maps immediately
- 50-85% uses LLM to decide
- Below 50% returns candidates for manual review

Transactions can no longer match before receipt date since receipts
are issued at time of purchase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:54:03 -05:00
ajandClaude Opus 4.5 dc56021a77 Feature: Add local LLM vision clients (llama.cpp and Ollama)
Add LlamaCppVisionClient and OllamaVisionClient for local AI inference
as alternatives to OpenAI and Claude. Includes text-only prompt support
for LLM-assisted receipt matching.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:53:51 -05:00
ajandClaude Opus 4.5 2c74e5e403 Docs: Document Financial Audit API in ARCHITECTURE.md
Add documentation for:
- FinancialAuditService responsibilities and methods
- Audit flag types and severities
- /api/audit endpoint with query parameters and response
- Version bump to 1.4 with recent changes section

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 20:08:19 -05:00
ajandClaude Opus 4.5 3ce91f4c07 Feature: Add Financial Audit API for AI analysis
Add /api/audit endpoint providing comprehensive financial data:
- Summary stats (income, expenses, net, daily average)
- Budget statuses with period info
- Category spending with budget correlation
- Top 20 merchants by spending
- Monthly trends with top categories
- Per-account summaries
- AI-friendly flags (over-budget, spending increases, etc.)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 20:07:29 -05:00
ajandClaude Opus 4.5 a3ca358e9a UI: Use dark text on yellow budget progress bars
Improves readability of percentage text when progress bar
is in warning state (80-99% of budget used).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 22:59:00 -05:00
ajandClaude Opus 4.5 3184545270 Fix: Add required attribute to pattern fields in CategoryMappings
Prevents form submission with empty pattern, keeping modal open
for validation instead of closing and showing error after redirect.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 22:24:17 -05:00
ajandClaude Opus 4.5 33a664a3e1 Feature: Add budget tracking with period-based spending limits
- Budget model with Weekly/Monthly/Yearly periods
- BudgetService for CRUD and spending calculations
- New /Budgets page for managing budgets
- Dashboard integration with progress bars
- Support for category-specific or total spending budgets
- Period boundaries calculated from budget start date

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 22:24:01 -05:00
ajandClaude Opus 4.5 f5cfd982cd UI: Replace cash flow bar chart with running balance line
- Add RunningBalance to SpendTrends model
- Calculate cumulative balance over 30 days
- Display as smooth filled line chart (neutral blue)
- Cleaner date labels (MMM d format)
- Better tooltip formatting with $ values

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 22:05:09 -05:00
ajandClaude Opus 4.5 55e758a42a UI: Add dark theme using Bootstrap 5 dark mode
- Enable data-bs-theme="dark" on html element
- Update navbar to dark variant
- Replace text-dark links with text-body (theme-aware)
- Replace bg-white/bg-light with bg-body/bg-body-secondary
- Update sticky table headers to dark theme
- Fix Chart.js legend and axis colors for dark backgrounds
- Adjust focus ring color for better visibility on dark

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:51:23 -05:00
ajandClaude Opus 4.5 65601c1fcb Chore: Improve Docker deployment configuration
- Use environment variables in docker-compose for secrets/paths
- Add .env.example template for required variables
- Add .env to .gitignore to prevent secret exposure
- Add docker-build-and-push.cmd helper script

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:33:17 -05:00
ajandClaude Opus 4.5 a5435b1549 Config: Set default culture to en-US for currency formatting
Ensures consistent $ currency display regardless of server locale

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:33:11 -05:00
ajandClaude Opus 4.5 7b0853b74c Feature: Add pagination to Receipts page
- Add PageNumber and PageSize query parameters (default 25 per page)
- Implement server-side pagination with Skip/Take
- Display "Showing X-Y of Z" count in header
- Add Bootstrap pagination controls with sliding page window

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 21:33:05 -05:00
ajandClaude 101a340d8c Chore: Add Docker containerization support
- Add Dockerfile with multi-stage build for .NET 8
- Include ImageMagick dependencies for Magick.NET
- Add docker-compose.yml with volume mount for receipts
- Add .dockerignore to exclude build artifacts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:01:03 -05:00
ajandClaude 3a817e0f3f UI: Convert receipt upload panel to modal dialog
Move the upload form from a card panel at the top of the page
to a modal triggered by an "Upload Receipt" button in the header.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:00:55 -05:00
ajandClaude 36a044da4f Feature: Add category pie chart and case-insensitive search
- Add doughnut chart showing spending by category
- Fix search to use EF.Functions.Like for explicit case-insensitivity
- Include Chart.js CDN for chart rendering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:12:13 -05:00
ajandClaude f42d5e87f9 Config: Update Program.cs with new service registrations
- Add AddMemoryCache() for TransactionCategorizer caching
- Register IPdfToImageConverter
- Register OpenAIVisionClient and ClaudeVisionClient with HttpClient
- Update AIReceiptParser registration to use scoped instead of HttpClient

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:12:04 -05:00
ajandClaude 9f64c7784a Refactor: Extract AI vision clients from AIReceiptParser
Extract for better separation of concerns:
- Services/PdfToImageConverter.cs - PDF to image conversion using ImageMagick
- Services/AIVisionClient.cs - OpenAI and Claude vision API clients
  - IAIVisionClient interface
  - OpenAIVisionClient, ClaudeVisionClient implementations

AIReceiptParser now orchestrates using injected services.
Adds proper logging for auto-mapping operations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:56 -05:00
ajandClaude ea7b2c2a3c Refactor: Extract dashboard services from Index page
Extract to separate files for better maintainability:
- Models/Dashboard/DashboardModels.cs - Dashboard DTOs
- Services/DashboardService.cs - All dashboard-related services
  - IDashboardService, IDashboardStatsCalculator
  - ITopCategoriesProvider, IRecentTransactionsProvider
  - ISpendTrendsProvider

Reduces Index.cshtml.cs from 355 lines to 37 lines.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:48 -05:00
ajandClaude 2ceb3a7b57 Refactor: Extract import services from Upload page
Extract to separate files for better maintainability:
- Models/Import/ImportContext.cs - Import context and PaymentSelectMode enum
- Models/Import/ImportResults.cs - Import result DTOs and TransactionKey
- Models/Import/PaymentResolutionResult.cs - Payment resolution DTO
- Services/TransactionImporter.cs - CSV import logic
- Services/CardResolver.cs - Payment method resolution

Reduces Upload.cshtml.cs from 615 lines to 216 lines.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:39 -05:00
ajandClaude a30e6ff089 Refactor: Extract CategoryMapping model and add caching
- Move CategoryMapping class to Models/CategoryMapping.cs
- Add IMemoryCache with 10-minute TTL for category mappings
- Add InvalidateMappingsCache() method for cache invalidation
- Reduces repeated DB queries during bulk categorization

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:29 -05:00
ajandClaude 625314d167 Refactor: Add structured error logging to TransactionAICategorizer
- Add ILogger for proper error logging
- Differentiate between HTTP, JSON parsing, and general errors
- Log errors with descriptive messages for debugging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:21 -05:00
ajandClaude d9e883a9f3 Security: Add MIME type validation and logging to ReceiptManager
- Add magic bytes validation to prevent file extension spoofing
- Add ILogger for proper error logging in background parsing
- Log background parsing success/failure with receipt ID

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:13 -05:00
ajandClaude 1de3920db4 Perf: Add composite database indexes for common queries
Add indexes for:
- (AccountId, Category) - account spending by category
- (AccountId, Date) - account transaction timelines
- (MerchantId, Date) - merchant spending trends
- (CardId, Date) - card activity analysis
- FileHashSha256 on Receipts - duplicate detection
- (TransactionId, ReceiptDate) on Receipts - receipt lookups

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:11:05 -05:00
ajandClaude 53c674c6e0 Perf: Fix N+1 queries in entity services
- CardService.GetAllCardsWithStatsAsync: Use single query with Select projection
- AccountService.GetAccountDetailsAsync: Use single query with Select projection
- TransactionStatisticsService: Calculate stats at DB level, fix N+1 in GetCardStatsForAccountAsync

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:10:56 -05:00
aj a85de793d7 Feature: disable preview button until CSV file is selected
Added validation to prevent users from submitting the upload form without
selecting a file first. The preview button is now disabled by default and
only enables when a file is selected, improving user experience and
preventing empty form submissions.

Changes:
- Added IDs to file input and preview button
- Button starts in disabled state
- JavaScript listener enables button when file is selected
- Button disables again if file selection is cleared
2025-11-16 12:07:17 -05:00
aj e0638039d8 Feature: order upload transaction preview by date descending
Transaction previews on the upload page now display with newest transactions
first, making it easier to review recent imports at the top of the list.
2025-11-16 11:54:13 -05:00
aj 51c2ce2965 Config: exclude receipts folder from compilation
Added wwwroot/receipts to compilation exclusions to prevent build warnings
and improve build performance. Receipt files are user-uploaded content and
should not be included in the build process.
2025-11-16 11:54:07 -05:00
aj 0a15d09db4 Refactor: separate JavaScript from HTML into external files
Extracted all inline JavaScript from Razor pages into dedicated external
files for better code organization and browser caching:
- upload.js: transaction preview, pagination, form handling
- transactions.js: date range filters, Bootstrap tooltips
- edit-transaction.js: category/merchant dropdowns, copy functionality
- merchants.js: modal handling for merchant management
- category-mappings.js: modal handling for category rules

Updated all affected .cshtml files to reference external scripts instead
of inline script blocks. This improves maintainability, enables browser
caching, and provides better separation of concerns.
2025-11-16 11:54:00 -05:00
aj 1c28d9cc88 Refactor: remove unnecessary using directives
Removed unused using statements from page models and test files:
- Removed unused Microsoft.EntityFrameworkCore and MoneyMap.Data imports
- Removed redundant Xunit usings (already declared as global)

Fixes CS8019 and CS8933 hidden diagnostics.
2025-11-16 11:53:50 -05:00
aj 22c60602df Fix: make Receipt property nullable in ViewReceiptModel
Changed Receipt property from non-nullable (null!) to nullable (?) to properly
handle cases where receipt is not found. Fixes CS8601 null reference assignment
warning.
2025-11-16 11:53:42 -05:00
aj f9cf709206 Fix: remove unnecessary async from OnPostRejectProposalAsync methods
Removed async/await keywords from methods that don't perform any async
operations. The methods were triggering CS1998 warnings and running
synchronously despite being marked async.
2025-11-16 11:53:36 -05:00
aj ea14466f57 Fix: add null checks in AIReceiptParser to prevent null reference warnings
Added validation to ensure messageContent is not null or whitespace before
deserializing JSON responses from OpenAI and Claude vision APIs. This fixes
CS8604 warnings about possible null reference arguments.
2025-11-16 11:53:28 -05:00
ajandClaude 56089cc437 Fix: improve EditTransaction form handling and validation
- Add hidden fields for immutable transaction properties to preserve values during form submission
- Make category field optional by removing validation for empty values
- Simplify category input handling by removing duplicate hidden field
- Clean up JavaScript by using proper element IDs instead of querySelector

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 01:59:50 -04:00
ajandClaude 4bd89a0ab5 Config: add dotnet test permissions to Claude Code settings
Add auto-approve permissions for dotnet test, new, and add commands to support test-driven development workflow.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 00:01:41 -04:00
ajandClaude af4a638b81 Test: add comprehensive unit test project for services
Add MoneyMap.Tests project with xUnit tests for all new services:

- AccountServiceTests: Account retrieval, stats, validation, deletion
- CardServiceTests: Card retrieval, stats, validation, deletion
- MerchantServiceTests: Merchant CRUD operations
- ReferenceDataServiceTests: Reference data retrieval
- TransactionServiceTests: Duplicate detection, retrieval, deletion
- TransactionStatisticsServiceTests: Statistics calculations
- ReceiptMatchingServiceTests: Receipt-to-transaction matching logic
- DbContextHelper: In-memory database context factory for test isolation

Uses xUnit, Moq, and EF Core InMemory database. Solution file updated to include test project.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 00:01:28 -04:00
ajandClaude f8bb5d5a82 Feature: add ability to unmap receipts from transactions
Add unmap functionality to allow users to disassociate receipts from transactions without deleting them:

- ReceiptManager: Add UnmapReceiptAsync method
- Receipts page: Add OnPostUnmapAsync handler
- Receipts view: Add Unmap button for mapped receipts with confirmation dialog

This provides a non-destructive alternative to deleting receipts when they need to be remapped to different transactions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 00:01:11 -04:00
ajandClaude b4a91d8b7f Docs: update ARCHITECTURE.md with new services and reorganization
Document the expanded service layer architecture:

- Reorganize service layer diagram by functional groups (Core Transaction, Entity Management, Receipt, Reference & Dashboard)
- Add comprehensive documentation for AccountService, CardService, ReferenceDataService, and TransactionStatisticsService
- Update MerchantService documentation with new CRUD operations
- Document all DTOs and design patterns

Maintains architectural documentation consistency as the service layer continues to grow.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 23:08:42 -04:00