Commit Graph

136 Commits

Author SHA1 Message Date
Nils-Johan Gynther 04b1fc3024 feat: add rematch functionality for recipe ingredients and enhance inventory management
Test Suite / test (24.15.0) (push) Has been cancelled
- Added a new API path for rematching recipe ingredients in `api_paths.dart`.
- Implemented a manual product creation dialog in `inventory_screen.dart` to allow users to create new products directly.
- Integrated the rematch functionality in `recipe_repository.dart` to handle rematching of recipe ingredients.
- Updated the recipe detail screen to include a button for triggering the rematch process.
- Introduced a new `RecipeMatchingService` in the backend to handle ingredient matching logic.
- Added database migration to include `aiEngineEnabled` column in the User table.

Co-authored-by: Copilot <copilot@github.com>
2026-05-06 09:20:31 +02:00
Nils-Johan Gynther 9fe85a719c feat: implement recipe analysis service and data models
Test Suite / test (24.15.0) (push) Has been cancelled
- Added RecipeAnalysisService to handle recipe ingredient analysis, including methods for checking ingredient availability and calculating quantities.
- Introduced new TypeScript definitions for recipe analysis results, including ingredient status and summary.
- Created corresponding Dart models for recipe analysis, including RecipeIngredientAnalysis, RecipeAnalysisSummary, and RecipeShoppingCandidate.
- Updated Flutter UI to reflect changes in ingredient availability status.
- Fixed color opacity issue in recipe image card.
2026-05-06 07:54:03 +02:00
Nils-Johan Gynther 969dafdbc6 Refactor code structure for improved readability and maintainability
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-06 07:37:59 +02:00
Nils-Johan Gynther e4f201ea36 feat: enhance recipe ingredient model; add raw fields and optional properties for better ingredient handling
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-06 07:25:42 +02:00
Nils-Johan Gynther ce20b1dd07 feat: implement AI recipe suggestions; add endpoint and UI for generating suggestions based on inventory
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-05 14:15:28 +02:00
Nils-Johan Gynther 3ea5a4778f feat: add functionality to manually add ingredients; implement CreateIngredientDto and update RecipesController and RecipesService
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-05 13:38:23 +02:00
Nils-Johan Gynther 2c8d6b69ae feat: add support for alternative ingredients; implement JSON storage and parsing logic
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 22:06:57 +02:00
Nils-Johan Gynther f32f69db5d feat: refactor recipe parsing logic; replace regex literals with constants for improved readability and maintainability
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 21:38:44 +02:00
Nils-Johan Gynther 38801f84eb feat: export ParsedIngredient and ParsedRecipe interfaces for external usage
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 21:35:14 +02:00
Nils-Johan Gynther b52205c8c3 feat: refactor recipe ownership logic; auto-claim ownerless recipes and ensure atomic updates for ingredients
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 21:33:33 +02:00
Nils-Johan Gynther b7c857732c feat: add product validation in recipe update and creation; throw BadRequestException for inactive products
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 21:30:51 +02:00
Nils-Johan Gynther 648e1856a1 feat: refactor recipe parsing logic; move parseRecipeMarkdown and related functions to a new utility file
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 21:28:06 +02:00
Nils-Johan Gynther a645d6a364 feat: refactor inventory and recipe services for improved error handling and code reuse; add systematic backend review plan
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 20:44:43 +02:00
Nils-Johan Gynther 64b06435cf feat: implement user-scoped receipt aliases with global fallback; enhance alias management in admin panel
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-04 19:43:13 +02:00
Nils-Johan Gynther 7c382dbf2e fix: forward 503 from importer-api as ServiceUnavailableException instead of 400
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-03 22:15:33 +02:00
Nils-Johan Gynther 5b6d44b555 feat(receipt-import): enhance receipt processing with new category rules and add unit tests
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 19:55:32 +02:00
Nils-Johan Gynther a555e74201 feat(receipt-import): add function to ignore specific receipt names and filter out ignored items
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 18:18:07 +02:00
Nils-Johan Gynther fa7f225ee5 feat(receipt-import): enhance bread category detection and improve session management
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 16:34:15 +02:00
Nils-Johan Gynther 87eff6a37f refactor(products): remove brand field from Product model and update related DTO and service
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 16:01:09 +02:00
Nils-Johan Gynther dbd8c6d849 refactor(products): remove subcategory from Product model and related queries 2026-05-03 15:54:23 +02:00
Nils-Johan Gynther 842561d2b8 refactor(categories-service): optimize path building in findFlattened method 2026-05-03 14:11:30 +02:00
Nils-Johan Gynther 2612a64ca5 fix(receipt-import): add missing UseGuards import in receipt-import.controller.ts
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 10:54:36 +02:00
Nils-Johan Gynther b2eb870ec7 feat(receipt-import): add refresh categories endpoint and UI integration
Co-authored-by: Copilot <copilot@github.com>
2026-05-03 10:48:06 +02:00
Nils-Johan Gynther d4769519c2 fix(receipt-import): correct regex for single pack extraction to handle unit formatting 2026-05-03 08:14:35 +02:00
Nils-Johan Gynther f108034742 fix(receipt-import): upgrade confidence level for next suggestion based on rule application 2026-05-02 23:36:19 +02:00
Nils-Johan Gynther b7d68afd58 chore(receipt-import): include quantity and package details in decision trace 2026-05-02 23:12:24 +02:00
Nils-Johan Gynther 5286db4385 fix(receipt-import): harden bacon signal detection with pork category fallback chain 2026-05-02 23:09:45 +02:00
Nils-Johan Gynther 4345547cbf chore(receipt-import): add decision-path tracing for category pipeline 2026-05-02 22:58:45 +02:00
Nils-Johan Gynther 60ab2465aa fix(receipt-import): add hard bacon override to pork category 2026-05-02 22:51:17 +02:00
Nils-Johan Gynther f45ec08c58 fix(receipt-import): replace invalid isNotEmpty string check 2026-05-02 22:47:07 +02:00
Nils-Johan Gynther 2cf0372eef fix(receipt-import): strengthen bacon detection with OCR-tolerant rule signals 2026-05-02 21:01:38 +02:00
Nils-Johan Gynther a88d6e2452 feat(receipt-import): run rules and AI for all users with trust-aware overrides 2026-05-02 20:48:47 +02:00
Nils-Johan Gynther 6733a50cfb fix(receipt-import): route egg items away from allergy dairy 2026-05-02 20:32:50 +02:00
Nils-Johan Gynther d9113bb89a fix(receipt-import): map standard milk away from lactose-free branch 2026-05-02 20:32:29 +02:00
Nils-Johan Gynther d2567e158c fix(receipt-import): classify vispgradde under dairy matlagning rules 2026-05-02 20:31:07 +02:00
Nils-Johan Gynther d823143611 feat(receipt-import): expand deterministic category rules and AI contradiction guards 2026-05-02 20:28:40 +02:00
Nils-Johan Gynther 38613e0cf3 fix(auth): expose both id and userId in JWT validate result 2026-05-02 20:11:24 +02:00
Nils-Johan Gynther 5842646e77 feat(products): include ownerId in product creation and enforce its requirement 2026-05-02 19:12:26 +02:00
Nils-Johan Gynther 4e568b4d2e feat(migration): enforce ownerId requirement in Product table
- Removed all products without an owner to maintain data integrity.
- Updated ownerId column to be non-nullable.
- Modified foreign key constraint for ownerId to use ON DELETE CASCADE.
2026-05-02 19:05:33 +02:00
Nils-Johan Gynther ec24f49836 feat(categories): add new categories for Kondis & fika and Kaffebröd, and Te & choklad 2026-05-02 17:44:01 +02:00
Nils-Johan Gynther 1604751b65 feat(receipt-import): add rule-based category suggestion logic for items
feat(migrations): add new categories for lactose-free products and allergy options
2026-05-02 16:42:33 +02:00
Nils-Johan Gynther 41ae7d4d06 feat(recipes): add recipe visibility and sharing features
- Implemented functionality to set recipe visibility (public/private) with appropriate checks for user permissions.
- Added ability to share recipes with other users, including validation for existing users and permissions.
- Introduced new DTOs for setting visibility and sharing recipes.
- Updated RecipesController and RecipesService to handle new endpoints for visibility and sharing.
- Enhanced inventory preview to consider user permissions and shared recipes.
- Updated front-end to support new sharing and visibility features, including UI changes for recipe detail and admin user management.
2026-05-02 09:19:59 +02:00
Nils-Johan Gynther f67bf8baef feat: update AI categorization model to 'mistral-tiny' for improved performance 2026-05-02 08:39:52 +02:00
Nils-Johan Gynther d64f34f4ff feat: enhance product matching logic with improved scoring and tokenization 2026-05-02 00:05:09 +02:00
Nils-Johan Gynther 9ee061d5f3 feat: add isPrivate field to Product model and implement private product creation and retrieval 2026-05-01 02:29:38 +02:00
Nils-Johan Gynther bfe9cb46fa refactor: remove unused parser files and update ParsedReceiptItem model with additional fields 2026-05-01 01:16:10 +02:00
Nils-Johan Gynther 32358a4e54 fix: update Blob creation for file uploads to use Uint8Array for better buffer handling 2026-04-30 20:15:41 +02:00
Nils-Johan Gynther 8910e6817d fix: update Blob creation for file uploads to handle buffer offsets correctly 2026-04-30 20:12:10 +02:00
Nils-Johan Gynther 797241f262 feat: migrate import functionality to microservice-importer for quick-import, receipt parsing, and markdown parsing 2026-04-30 20:00:32 +02:00
Nils-Johan Gynther 046791b63e feat: allow application/octet-stream MIME type for PDF uploads in receipt import 2026-04-30 13:38:23 +02:00