|
| 1 | + |
1 | 2 | # Feature 032: AI-Powered Category Suggestions |
| 3 | +> **Status:** In Progress |
| 4 | +
|
| 5 | +--- |
| 6 | +## Implementation Status (2026-01-27) |
| 7 | + |
| 8 | +**UI:** Implemented (see Blazor client) |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +**Backend/Integration Checklist:** |
| 13 | + |
| 14 | +- [x] CategorySuggestionService analyzes uncategorized transactions and integrates with MerchantKnowledgeBase |
| 15 | +- [x] Auto-creation of categorization rules after category acceptance (API and service logic present) |
| 16 | +- [~] Dismissed suggestions are persisted (restore/undismiss not yet implemented) |
| 17 | +- [x] System learns from user manual categorizations and updates merchant mappings |
| 18 | +- [~] Endpoints for suggesting, accepting, dismissing, and refreshing category suggestions (restore not implemented) |
| 19 | +- [x] Endpoints for merchant-category mapping management |
| 20 | +- [x] Unit and integration tests for new logic and endpoints (see tests for CategorySuggestionService, MerchantMappingService, and CategorySuggestionsController) |
| 21 | +- [x] OpenAPI docs and user documentation for new endpoints/features (see table below) |
| 22 | + |
| 23 | + |
| 24 | +All required UI elements and flows described in the feature spec are present. See `src/BudgetExperiment.Client/Pages/CategorySuggestions.razor` and `src/BudgetExperiment.Client/Components/AI/CategorySuggestionCard.razor` for details. |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## API Endpoint Summary (OpenAPI) |
| 29 | + |
| 30 | +The following endpoints are available for AI category suggestions and merchant mapping. All endpoints are documented in the OpenAPI spec and available via the Scalar UI (`/scalar`). |
| 31 | + |
| 32 | +| Method | Endpoint | Description | |
| 33 | +|--------|----------------------------------------------------------|-----------------------------------------------| |
| 34 | +| POST | `/api/v1/categorysuggestions/analyze` | Analyze uncategorized transactions and generate suggestions | |
| 35 | +| GET | `/api/v1/categorysuggestions` | Get all pending category suggestions | |
| 36 | +| GET | `/api/v1/categorysuggestions/{id}` | Get a specific category suggestion by ID | |
| 37 | +| POST | `/api/v1/categorysuggestions/{id}/accept` | Accept a suggestion and create the category | |
| 38 | +| POST | `/api/v1/categorysuggestions/{id}/dismiss` | Dismiss a suggestion | |
| 39 | +| POST | `/api/v1/categorysuggestions/bulk-accept` | Accept multiple suggestions in bulk | |
| 40 | +| GET | `/api/v1/categorysuggestions/{id}/preview-rules` | Preview rules that would be created for a suggestion | |
| 41 | +| POST | `/api/v1/categorysuggestions/{id}/create-rules` | Create categorization rules from suggestion patterns | |
| 42 | +| GET | `/api/v1/merchantmappings` | Get all learned merchant mappings | |
| 43 | +| POST | `/api/v1/merchantmappings/learn` | Learn a merchant-to-category mapping from manual categorization | |
| 44 | +| DELETE | `/api/v1/merchantmappings/{id}` | Delete a learned merchant mapping | |
| 45 | + |
| 46 | +See the OpenAPI/Swagger UI at `/scalar` for full request/response schemas and try-it-out functionality. |
| 47 | + |
| 48 | +This checklist will be updated as each backend/integration item is confirmed. |
| 49 | + |
| 50 | +---- |
2 | 51 |
|
3 | 52 | ## Overview |
4 | 53 |
|
|
0 commit comments