Commit Graph

122 Commits

Author SHA1 Message Date
Nils-Johan Gynther ce0cc6fbf0 feat(auth): implement user authentication with JWT and NextAuth
- Added user registration and login functionality with JWT authentication.
- Created auth controller, service, and module in the backend.
- Implemented user model and user products management.
- Integrated NextAuth for session management on the frontend.
- Added middleware for protecting routes and handling public access.
- Updated frontend API routes to include authorization headers.
- Enhanced recipe and user product models to support ownership and visibility.
- Created registration and login pages in the frontend.
- Added necessary types for NextAuth session management.
2026-04-17 19:57:08 +02:00
Nils-Johan Gynther 4c0411a7f2 feat: enhance RecipeDetailClient with portion section and instructions styling 2026-04-17 19:05:09 +02:00
Nils-Johan Gynther 8d1584cdb8 feat: add API routes for GET, PATCH, and DELETE operations on recipes 2026-04-17 19:01:09 +02:00
Nils-Johan Gynther 8e0aed032c feat: add servings field to Recipe model and implement inventory comparison functionality 2026-04-17 18:48:08 +02:00
Nils-Johan Gynther 8a86b0aebd refactor: remove unused inputStyle and clean up EditProductForm component 2026-04-17 18:25:10 +02:00
Nils-Johan Gynther 11de0191be feat: add container naming conventions and usage examples to technical documentation 2026-04-17 18:20:50 +02:00
Nils-Johan Gynther a4ea9be7a1 feat: enhance product model with subcategory, brand, tags, and nutrition; update related DTOs and services 2026-04-17 18:11:06 +02:00
Nils-Johan Gynther a05d907608 feat: update NEXT_STEPS.md with status overview and prioritized improvements 2026-04-17 16:21:19 +02:00
Nils-Johan Gynther 4474c4da01 feat: implement import functionality with tab navigation for receipts and invoices 2026-04-16 21:39:23 +02:00
Nils-Johan Gynther 2a0da005ff feat: add receiptName field to InventoryItem model and update related DTOs and service 2026-04-16 21:22:34 +02:00
Nils-Johan Gynther af88a0dc81 feat: implement receipt alias functionality with CRUD operations and integrate with receipt import 2026-04-16 21:06:16 +02:00
Nils-Johan Gynther b8744f625b feat: enhance receipt import to support PDF files with updated UI and backend processing 2026-04-16 20:22:27 +02:00
Nils-Johan Gynther a12abe0402 feat: add receipt import functionality with UI and backend integration 2026-04-16 20:02:57 +02:00
Nils-Johan Gynther 88d3c4ad73 fix: correct import paths in MealPlanPage component 2026-04-16 19:38:25 +02:00
Nils-Johan Gynther 1b82b02021 feat: implement meal planning feature with CRUD operations and UI integration 2026-04-16 19:37:09 +02:00
Nils-Johan Gynther 8b12df4aa4 feat: update NEXT_STEPS.md with unit test details and add npm test to Dockerfile 2026-04-16 19:30:01 +02:00
Nils-Johan Gynther 3d610fa4ec fix: add missing newline at end of package.json 2026-04-16 19:25:33 +02:00
Nils-Johan Gynther 9292e30abc feat: add tests for normalizeName and RecipesService methods, including unit conversion and alias normalization 2026-04-16 19:22:14 +02:00
Nils-Johan Gynther 1b9df4d20d feat: add API route for serving images with path validation 2026-04-16 19:10:06 +02:00
Nils-Johan Gynther 3f4fe890df feat: update Recipe model to use TEXT type for description and add seed data for products 2026-04-16 18:53:48 +02:00
Nils-Johan Gynther 66003f2485 feat: enhance PantryList and BaslagerPage to support inventory display and improve recipe grid layout 2026-04-16 18:44:44 +02:00
Nils-Johan Gynther 1ddce5f48c feat: initialize state for image URL in WriteRecipePage component 2026-04-16 18:26:09 +02:00
Nils-Johan Gynther 195d1ddbc6 feat: add support for prefilled image URL in recipe creation and display 2026-04-16 18:24:44 +02:00
Nils-Johan Gynther d5b360fd62 Refactor logging in IcaRecipeParser and QuickImportService to use NestJS Logger
- Updated IcaRecipeParser to replace console.log statements with Logger for better logging practices.
- Enhanced QuickImportService with Logger for consistent logging and error handling.
- Changed quantity validation in CreateRecipeIngredientDto and CreateRecipeDto to allow zero.
- Removed CanonicalNameForm and NameForm components from the frontend.
- Updated EditProductForm to use a select dropdown for categories instead of a text input.
- Added validation for product name, canonical name, and category length in product update action.
- Refactored unit options into a separate file for better reusability across components.
- Removed unused API fetching functions and inventory types to clean up the codebase.
2026-04-16 18:18:27 +02:00
Nils-Johan Gynther 3f6d32ae44 docs: uppdatera README/TEKNISK_BESKRIVNING och lagg till NEXT_STEPS 2026-04-15 22:19:37 +02:00
Nils-Johan Gynther 719c291e36 fix: TS2322 null not assignable to string | undefined i products.service 2026-04-15 22:13:37 +02:00
Nils-Johan Gynther 940c8b52ee fix: saknad POST /api/recipes proxy och revalidatePath for admin/products 2026-04-15 22:11:57 +02:00
Nils-Johan Gynther 47d1aafd9e feat: PantryItem (Baslager) - tabell, backend-modul och frontend-sida 2026-04-15 22:06:40 +02:00
Nils-Johan Gynther 65ec74ac7d feat: redigeringsformulär för produkter i admin med namn, canonical name, kategori och mjukradering 2026-04-15 22:02:58 +02:00
Nils-Johan Gynther 3d279bb78c data: lägg till matvaror_sverige.csv och seed_products.sql 2026-04-15 21:46:01 +02:00
Nils-Johan Gynther 5f6b9261f2 fix: ersätt partial migration med fullständigt initial schema 2026-04-15 21:32:16 +02:00
Nils-Johan Gynther ed732ea4e6 fix: använd NEXT_PUBLIC_API_URL_INTERNAL i quick-import-proxy 2026-04-15 21:25:20 +02:00
Nils-Johan Gynther 2932e58531 fix: nedgradera Prisma till 6.12.0, Prisma 7 kräver driver adapters för MySQL 2026-04-15 21:20:35 +02:00
Nils-Johan Gynther 1844368cf8 fix: återställ url i schema.prisma, ta bort ogiltig datasourceUrl från constructor 2026-04-15 21:14:48 +02:00
Nils-Johan Gynther d5cb8d27e0 fix: add type assertion for datasourceUrl in PrismaService constructor 2026-04-15 21:10:44 +02:00
Nils-Johan Gynther 3bfd7640cb fix: remove global npm installation from Dockerfiles 2026-04-15 21:08:07 +02:00
Nils-Johan Gynther 649f76fa72 fix: update PrismaService constructor to include datasourceUrl configuration 2026-04-15 21:07:00 +02:00
Nils-Johan Gynther 67aa89ba7e chore: add npm install command in Dockerfiles for both backend and frontend 2026-04-15 21:05:22 +02:00
Nils-Johan Gynther ba6ac036b5 fix: remove datasource configuration from PrismaService constructor 2026-04-15 21:03:24 +02:00
Nils-Johan Gynther 5d80dfef6f fix: update PrismaService constructor to use correct datasource format and include prisma.config.ts in Dockerfile 2026-04-15 21:01:49 +02:00
Nils-Johan Gynther c9ef587eb1 feat: add Prisma configuration file and update Dockerfile to include it 2026-04-15 20:53:45 +02:00
Nils-Johan Gynther 944a670a84 chore: städa .env, uppdatera Prisma till 7.7.0 2026-04-15 20:46:36 +02:00
Nils-Johan Gynther 9ae263e77e chore: add .env for server bottstrap 2026-04-15 20:21:33 +02:00
Nils-Johan Gynther 2e7c849687 fix: update Dockerfile CMD to retry Prisma migration on failure 2026-04-15 20:15:08 +02:00
Nils-Johan Gynther 29d4cef688 feat: update Docker Compose configuration and add deployment script 2026-04-15 20:06:20 +02:00
Nils-Johan Gynther 8efd9f6e1e fix: update parameter type in POST function to use Promise for id 2026-04-15 19:53:15 +02:00
Nils-Johan Gynther c20391bf2a refactor: simplify EditRecipeRedirect component by removing unused code 2026-04-15 19:51:51 +02:00
Nils-Johan Gynther 73bf5193c4 feat: add image handling to recipes
- Implemented image downloading and optimization in QuickImportService.
- Added imageUrl field to CreateRecipeDto for recipe creation.
- Created an endpoint in RecipesController to update recipe images.
- Enhanced RecipesService to handle image URL updates and optimizations.
- Updated Docker Compose to mount a volume for recipe images.
- Refactored frontend to display images in recipe grids and detail views.
- Added a new utility function for downloading and optimizing images.
- Created a new API route for handling image uploads.
- Introduced RecipeGrid component for better recipe display.
- Updated RecipeDetailClient to manage image updates and display.
- Added migration for new imageUrl column in the Recipe table.
2026-04-15 19:46:50 +02:00
Nils-Johan Gynther a2038ffbec feat: Enhance recipe import functionality with support for PDF, image, and URL inputs 2026-04-14 22:48:57 +02:00
Nils-Johan Gynther ea5f97ab82 chore: Add missing image and pull_policy configurations for frontend and API services in Docker Compose 2026-04-14 22:44:25 +02:00