Commit Graph

617 Commits

Author SHA1 Message Date
Nils-Johan Gynther 6c38101e5c chore(deploy): add database maintenance and migration options
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 7m44s
Test Suite / flutter-quality (push) Failing after 8m15s
Added new deployment options to deploy.sh:
- --migrate: Runs Prisma migration deploy command
- --clean-database: Executes maintenance SQL to clean data while preserving categories

Added new maintenance directory backend/prisma/maintenance/ containing:
- clean-database.sql: SQL script for database cleaning operations

Updated deployment script to:
- Include new command-line flags in help text
- Add conditional blocks for running migrations and database cleaning
- Implement container readiness checks before running Prisma commands
- Preserve existing seed functionality while adding new maintenance features
2026-05-20 20:58:36 +02:00
Nils-Johan Gynther a1a2c33427 feat(shopping-list): add shopping list feature with flyer integration
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 5m8s
Test Suite / flutter-quality (push) Failing after 1m41s
This commit introduces a comprehensive shopping list feature with the following key changes:

Backend:
- Added ShoppingListItem model with relations to User, Product, and Category
- Added new fields to FlyerSession for source file metadata
- Added categoryId field to FlyerItem model
- Implemented session source file retrieval endpoint
- Added endpoint for updating flyer session items with category assignment
- Added endpoint for planning flyer selections to shopping list
- Implemented backfillCategoriesMine for AI-assisted category assignment
- Added ShoppingListModule and integrated with FlyerSelectionModule

Frontend:
- Added ShoppingListScreen and navigation route
- Implemented API paths and client methods for shopping list operations
- Added category tree loading for shopping list item creation
- Integrated shopping list functionality in flyer import tab
- Added category backfill trigger in inventory screen
- Updated FlyerImportItem model with categoryId support
- Added methods for updating flyer session items and retrieving source files

Database:
- Added new Prisma migration for flyer source metadata and shopping list items
- Updated schema with new relations and indexes

The shopping list feature allows users to:
1. Plan flyer selections directly to their shopping list
2. View and manage their shopping list items
3. Update flyer session items with proper categorization
4. Retrieve original flyer source files
5. Automatically backfill categories for uncategorized products
2026-05-20 09:07:30 +02:00
Nils-Johan Gynther 996f0d774b Updatede documentation
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 3m35s
Test Suite / flutter-quality (push) Failing after 1m29s
2026-05-19 22:01:44 +02:00
Nils-Johan Gynther 6cd5b80adb feat(flyer-import): add session management and retrieval endpoints
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m15s
Test Suite / flutter-quality (push) Failing after 1m25s
- Add new API endpoints for retrieving flyer import sessions:
  - GET /flyer-import/sessions/latest - Retrieve latest session for user
  - GET /flyer-import/sessions/:sessionId - Retrieve specific session
- Implement session persistence and restoration in Flutter UI
- Add toJson() methods to FlyerImportItem and FlyerImportResult for serialization
- Add new FlyerImportSession domain model for local session management
- Add unit test file for FlyerImportService
- Update FlyerImportController with new endpoints and user ID extraction
- Update FlyerImportService with session retrieval logic and response mapping
- Update API paths in Flutter client
- Add session restoration on widget init in FlyerImportTab
2026-05-19 21:55:55 +02:00
Nils-Johan Gynther 8b8f8b7b6f Update flyerimport. flutter timeout 300 sek
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 4m58s
Test Suite / flutter-quality (push) Failing after 1m41s
2026-05-19 20:53:39 +02:00
Nils-Johan Gynther 33190bd8e0 refactor(ai-parser): implement chunk-based text processing for flyer parsing
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m28s
Test Suite / flutter-quality (push) Failing after 1m14s
- Replace fixed text window retry strategy with dynamic chunk-based approach
- Add configurable chunk size, overlap, and maximum chunks via environment variables
- Implement chunk splitting with overlap handling for context preservation
- Add chunk processing with retry logic per chunk
- Include deduplication of items across chunks
- Update logging to reflect chunk-based processing

BREAKING CHANGE: Changes the retry strategy from fixed text windows to dynamic chunk-based processing. Existing configurations may need adjustment for FLYER_AI_CHUNK_SIZE_CHARS, FLYER_AI_CHUNK_OVERLAP_CHARS, and FLYER_AI_MAX_CHUNKS.
2026-05-19 20:24:03 +02:00
Nils-Johan Gynther 4d2942a8e5 chore(infra): add AI flyer parsing configuration and retry logic
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m9s
Test Suite / flutter-quality (push) Failing after 1m19s
- Add FLYER_AI_TIMEOUT_MS and FLYER_AI_RETRIES environment variables
- Configure timeout and retry settings in compose.yml
- Update AiFlyerParserService with configurable timeout and retry logic
- Add text window reduction strategy for retry attempts
- Update documentation in TEKNISK_BESKRIVNING.md
- Fix ESLint configuration in app.security.spec.ts
2026-05-19 20:13:59 +02:00
Nils-Johan Gynther 187d0283a5 feat(flyer-import): integrate AI-based flyer parsing with image support
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m31s
Test Suite / flutter-quality (push) Failing after 3m48s
Test Suite / backend-pr-quick (push) Failing after 13m57s
- Add support for PNG, JPEG, and WebP image formats in flyer import
- Replace external importer service with internal AI-based parsing pipeline
- Add new services: TextExtractorService, AiFlyerParserService, FlyerNormalizerService
- Integrate Mistral AI, pdf-parse, and tesseract.js dependencies
- Add quality confidence indicators and warning panels in Flutter UI
- Update package.json with new dependencies and transform ignore patterns
- Add documentation for flyer importer system
- Add Kilo AI planning file for Happy Island project

BREAKING CHANGE: Flyer import now uses internal AI parsing instead of external importer service
2026-05-19 19:57:54 +02:00
Nils-Johan Gynther 0ce1db5471 chore: update flyer import features and resources
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m43s
Test Suite / flutter-quality (push) Failing after 1m33s
- Remove outdated Willys flyer PDF (0001-0008_WIL_V21_ED1pdf.pdf)
- Add new Willys flyer PDF (willys_reklamblad.pdf)
- Improve offer detection logic in backend flyer-import service
- Add offer limit text extraction and sanitization in Flutter UI
- Fix Swedish character encoding issues in UI text
2026-05-18 23:40:05 +02:00
Nils-Johan Gynther c720f611ea Merge branch 'main' of ssh://gitea.gynther.se:2222/nilsjohan/recipe-app
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 1m36s
Test Suite / flutter-quality (push) Failing after 1m19s
2026-05-18 23:27:31 +02:00
Nils-Johan Gynther e658f2e6f1 chore(ci): update project documentation and flyer import features
Update project documentation with recent CI improvements and flyer import enhancements:

- Add ESLint configuration for backend and Dart lints for Flutter
- Document Prisma query logging via PRISMA_LOG_QUERIES environment variable
- Update NEXT_STEPS.md, README.md, and TEKNISK_BESKRIVNING.md with new features
- Add isOffer, offerLimitText, comparisonPrice, comparisonUnit, parseConfidence, and parseReasons fields to FlyerImportItem
- Update FlyerImportResponse type to include new fields
- Extend file picker to support image formats (png, jpg, jpeg, webp)
- Add offer badge display and price formatting in Flutter UI
- Implement PDF preview functionality for flyer import
2026-05-18 23:27:20 +02:00
nilsjohan a5cd49284a willys-reklamblad
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m11s
Test Suite / flutter-quality (push) Failing after 1m13s
Exempel på reklamblad från willys
2026-05-18 23:26:00 +02:00
Nils-Johan Gynther 3f242f9a6d docs: add Prisma query logging configuration guide
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 1m30s
Test Suite / flutter-quality (push) Failing after 1m17s
Add documentation for enabling Prisma query logging in test environments via PRISMA_LOG_QUERIES environment variable.

Include:
- Step-by-step instructions for configuration in Docker Compose
- Environment setup requirements
- Performance and security considerations
- Warning against production use
2026-05-18 23:08:29 +02:00
Nils-Johan Gynther f6ccdd859f ci(github): add linting and improve CI workflow
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 5m14s
Test Suite / flutter-quality (push) Failing after 1m36s
- Add ESLint configuration for backend TypeScript code
- Include linting step in backend quality checks
- Add linting step to GitHub Actions CI workflow
- Enable configurable Prisma query logging via PRISMA_LOG_QUERIES environment variable
- Update PrismaService to support dynamic log levels based on PRISMA_LOG_QUERIES
- Replace BadRequestException with UnauthorizedException in receipt import security tests
2026-05-18 23:01:29 +02:00
Nils-Johan Gynther d5f903db98 chore(import): improve error handling and add flyer integration
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 3m41s
Test Suite / flutter-quality (push) Successful in 2m3s
- Replace BadRequestException with UnauthorizedException for authentication failures in flyer-import and flyer-selection controllers
- Add bulk selection endpoint in FlyerSelectionController for creating multiple selections in one request
- Update FlyerSelectionModule to include new FlyerSelectionMatcherService and FlyerSelectionSyncController
- Extend FlyerSelectionService with createMany method for bulk operations
- Add new DTOs for bulk selection and receipt matching functionality
- Update ReceiptImportService to accept FlyerSelectionService dependency and track successful rows
- Extend SaveReceiptResponse with flyerAutoSync field for receipt-to-flyer matching results
- Add new API paths for flyer import and selection endpoints
- Update Flutter UI to include Flyer import tab and adjust tab controller length
- Add new domain models and repository methods for flyer import functionality
- Update test files to include new FlyerSelectionService dependency
- Modify .kilo plan documentation to reflect current system architecture
2026-05-18 22:51:27 +02:00
Nils-Johan Gynther 24a96c3da1 feat(flyer): add flyer session and selection system
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m49s
Test Suite / flutter-quality (push) Successful in 2m0s
- Add FlyerSession, FlyerItem, and FlyerSelection models to Prisma schema
- Implement session persistence with weekly key generation in FlyerImportService
- Add FlyerSelectionModule to AppModule
- Extend FlyerImportResponse with sessionId and flyerItemId fields
- Create new flyer-selection module directory structure
- Add migration for flyer session and selection tables

BREAKING CHANGE: Flyer import now persists data to FlyerSession and FlyerItem tables
2026-05-18 19:02:32 +02:00
Nils-Johan Gynther a31aff7c35 test: update admin aliases panel tests for product model changes
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m28s
Test Suite / flutter-quality (push) Successful in 2m21s
- Add imports for new domain models
- Update AdminProduct initialization to include canonicalName
- Update ReceiptAlias initialization to include ownerId and productName
- Replace Switch widget checks with SwitchListTile for global alias test
- Update test data to match new model structure
2026-05-18 18:48:26 +02:00
Nils-Johan Gynther f42132ed5b chore: add flyer import module and configuration
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 3m57s
Test Suite / flutter-quality (push) Failing after 1m19s
- Added FlyerImportModule to AppModule imports
- Created new flyer-import module directory
- Added .kilo/ configuration directory
2026-05-18 18:40:25 +02:00
Nils-Johan Gynther e6961fc593 created kilo.json
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m33s
Test Suite / flutter-quality (push) Failing after 1m22s
2026-05-16 09:24:29 +02:00
Nils-Johan Gynther 50816a6844 feat: add central help text system, Prisma migration, and Flutter help button
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 1m2s
Test Suite / flutter-quality (push) Successful in 1m40s
2026-05-13 17:04:44 +02:00
Nils-Johan Gynther bb7a4c1ff2 feat: add Copilot instructions for database command style and credential handling
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 1m2s
Test Suite / flutter-quality (push) Successful in 2m46s
2026-05-13 16:37:35 +02:00
Nils-Johan Gynther 3d9b124766 feat: add HelpText model, service, and controller for dynamic help text management
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 2m27s
Test Suite / flutter-quality (push) Successful in 1m47s
2026-05-13 16:20:04 +02:00
Nils-Johan Gynther 0da4bbf4cf feat: implement alias-scope management for admin, enhance category chip handling, and upgrade dependencies
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 1m40s
Test Suite / flutter-quality (push) Successful in 1m44s
2026-05-12 22:24:26 +02:00
Nils-Johan Gynther 4492d7aa1c feat: enhance receipt alias management with global scope support and update validation
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 50s
Test Suite / flutter-quality (push) Successful in 50s
2026-05-12 22:20:48 +02:00
Nils-Johan Gynther 4471e344eb chore(deps): upgrade NestJS and related dependencies to version 11.x
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 32s
Test Suite / flutter-quality (push) Successful in 51s
fix(auth): ensure JWT_SECRET is set in JwtStrategy constructor
2026-05-12 22:00:29 +02:00
Nils-Johan Gynther 621ced0e43 refactor: streamline alias editing and improve category path handling in admin panel
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 21s
Test Suite / flutter-quality (push) Successful in 57s
2026-05-12 21:53:19 +02:00
Nils-Johan Gynther a4d16cdbae feat: add workspace checkout step to CI workflow for improved reliability
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 21s
Test Suite / flutter-quality (push) Successful in 53s
2026-05-12 21:38:28 +02:00
Nils-Johan Gynther 6ff58ed013 refactor: simplify CI workflow by removing Node.js setup steps and verifying toolchain
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 1s
Test Suite / flutter-quality (push) Failing after 1s
2026-05-12 21:30:39 +02:00
Nils-Johan Gynther 37f931fa0b refactor: streamline Flutter setup in CI workflow by removing unnecessary steps
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 22s
Test Suite / flutter-quality (push) Failing after 1s
2026-05-12 21:28:34 +02:00
Nils-Johan Gynther 8184fbd7e9 refactor: simplify Node.js setup in CI workflows by removing matrix strategy
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 33s
Test Suite / flutter-quality (push) Failing after 5s
2026-05-12 21:26:21 +02:00
Nils-Johan Gynther 46b9be4791 feat: implement update functionality for receipt aliases and add corresponding tests
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / quick-import-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 22s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 21:25:48 +02:00
Nils-Johan Gynther fb6b371fb7 feat: enhance error dialogs with delete functionality and improve documentation
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / quick-import-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 26s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 21:11:54 +02:00
Nils-Johan Gynther 0784c1a032 feat: add tests for QuickImportService and ReceiptImportService parse flow
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / quick-import-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 27s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 20:56:13 +02:00
Nils-Johan Gynther 44ea3cdd7e feat: add unit tests for ReceiptImportService.saveReceipt method
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 21s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 20:01:30 +02:00
Nils-Johan Gynther 320a646950 feat: add microservice folders to workspace configuration
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 21s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 19:54:03 +02:00
Nils-Johan Gynther acb1e56506 Merge branch 'main' of ssh://gitea.gynther.se:2222/nilsjohan/recipe-app
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 22s
Test Suite / flutter-quality (push) Failing after 4s
2026-05-12 19:18:18 +02:00
Nils-Johan Gynther 2a230a6994 feat: add GitHub Actions workflow for testing backend and Flutter components 2026-05-12 19:18:10 +02:00
Nils-Johan Gynther 43c91881a7 feat: add GitHub Actions workflow for testing backend and Flutter components
Test Suite / backend-pr-quick (24.15.0) (push) Has been skipped
Test Suite / backend-full (24.15.0) (push) Failing after 1m38s
Test Suite / flutter-quality (push) Failing after 1m37s
2026-05-12 18:39:16 +02:00
Nils-Johan Gynther 98ee8a3ad6 feat: implement real-time database synchronization with SSE and update backend modules
Test Suite / backend-pr-quick (24.15.0) (push) Has been cancelled
Test Suite / backend-full (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:57:05 +02:00
Nils-Johan Gynther 2dda34d4d2 feat: update project analysis documentation to include fullstack context and backend-specific checks for NestJS and Prisma
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:17:11 +02:00
Nils-Johan Gynther d135aa643a feat: enhance pre-commit quality gate with detailed analysis and output format
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:15:37 +02:00
Nils-Johan Gynther d645d3ad9d feat: add Flutter quality checks and tests for category chips in inventory and pantry screens
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / flutter-quality (push) Has been cancelled
2026-05-12 16:13:10 +02:00
Nils-Johan Gynther 08d14bf9e6 feat: remove obsolete cache tracking file from build directory 2026-05-12 16:12:51 +02:00
Nils-Johan Gynther acca5dcbae feat: add session checkpoint for category chip enhancements and cache invalidation
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 22:12:04 +02:00
Nils-Johan Gynther cd84e25890 feat: enhance category handling with new category chip logic and user-specific product categorization
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 22:03:09 +02:00
Nils-Johan Gynther f19c157e8f feat: add updateCategoryMine endpoint to manage product category updates
Test Suite / test (24.15.0) (push) Has been cancelled
- Implemented a new PATCH endpoint in ProductsController to update the category of a user's product.
- Added corresponding service method in ProductsService to handle business logic and validation.
- Created UpdateCategoryMineDto for request validation.
- Enhanced error handling for forbidden actions and not found resources.
- Updated API error mapping in Flutter to handle specific forbidden messages.
- Modified ProductPickerField to allow product creation directly from the picker.
- Added tests for the new endpoint and service method to ensure proper functionality and error handling.
2026-05-11 21:41:42 +02:00
Nils-Johan Gynther 8e0166c68a feat: Improve category ID handling with dynamic parsing in inventory screens
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 21:18:06 +02:00
Nils-Johan Gynther 3e0af925d5 feat: Refactor inventory screens with category selection and product handling improvements
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 21:09:40 +02:00
Nils-Johan Gynther 2281df3716 feat: Add location display and category chips in pantry and inventory screens
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 20:53:11 +02:00
Nils-Johan Gynther 68476142c1 refactor: Remove PantryProduct class and simplify category resolution in PantryScreen
Test Suite / test (24.15.0) (push) Has been cancelled
2026-05-11 20:01:00 +02:00