feat: add cookbooks, multiple categories, and image management
Some checks failed
CI Pipeline / Lint Code (push) Has been cancelled
CI Pipeline / Test API Package (push) Has been cancelled
CI Pipeline / Test Web Package (push) Has been cancelled
CI Pipeline / Test Shared Package (push) Has been cancelled
CI Pipeline / Build All Packages (push) Has been cancelled
CI Pipeline / Generate Coverage Report (push) Has been cancelled
Docker Build & Deploy / Build Docker Images (push) Has been cancelled
Docker Build & Deploy / Push Docker Images (push) Has been cancelled
Docker Build & Deploy / Deploy to Staging (push) Has been cancelled
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
E2E Tests / End-to-End Tests (push) Has been cancelled
E2E Tests / E2E Tests (Mobile) (push) Has been cancelled
Security Scanning / NPM Audit (push) Has been cancelled
Security Scanning / Dependency License Check (push) Has been cancelled
Security Scanning / Code Quality Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
Some checks failed
CI Pipeline / Lint Code (push) Has been cancelled
CI Pipeline / Test API Package (push) Has been cancelled
CI Pipeline / Test Web Package (push) Has been cancelled
CI Pipeline / Test Shared Package (push) Has been cancelled
CI Pipeline / Build All Packages (push) Has been cancelled
CI Pipeline / Generate Coverage Report (push) Has been cancelled
Docker Build & Deploy / Build Docker Images (push) Has been cancelled
Docker Build & Deploy / Push Docker Images (push) Has been cancelled
Docker Build & Deploy / Deploy to Staging (push) Has been cancelled
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
E2E Tests / End-to-End Tests (push) Has been cancelled
E2E Tests / E2E Tests (Mobile) (push) Has been cancelled
Security Scanning / NPM Audit (push) Has been cancelled
Security Scanning / Dependency License Check (push) Has been cancelled
Security Scanning / Code Quality Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
Major features added: - Cookbook management with CRUD operations - Auto-filter cookbooks by categories and tags - Multiple categories per recipe (changed from single category) - Image upload and URL download for cookbooks - Improved image management UI Database changes: - Changed Recipe.category (string) to Recipe.categories (string array) - Added Cookbook and CookbookRecipe models - Added Tag and RecipeTag models for recipe tagging Backend changes: - Added cookbooks API routes with image upload - Added tags API routes - Added auto-filter functionality to add recipes to cookbooks automatically - Added downloadAndSaveImage() to StorageService for URL downloads - Updated recipes routes to support multiple categories Frontend changes: - Added Cookbooks page with grid view - Added CookbookDetail page with filtering - Added EditCookbook page with image upload/download - Updated recipe forms to use chip-based UI for multiple categories - Improved image upload UX with separate file upload and URL download - Added remove image functionality with immediate save 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ model Recipe {
|
||||
sourceUrl String? // For imported recipes
|
||||
author String?
|
||||
cuisine String?
|
||||
category String?
|
||||
categories String[] @default([]) // Changed from single category to array
|
||||
rating Float?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -30,10 +30,10 @@ model Recipe {
|
||||
instructions Instruction[]
|
||||
images RecipeImage[]
|
||||
tags RecipeTag[]
|
||||
cookbooks CookbookRecipe[]
|
||||
|
||||
@@index([title])
|
||||
@@index([cuisine])
|
||||
@@index([category])
|
||||
}
|
||||
|
||||
model RecipeSection {
|
||||
@@ -127,3 +127,32 @@ model RecipeTag {
|
||||
@@index([recipeId])
|
||||
@@index([tagId])
|
||||
}
|
||||
|
||||
model Cookbook {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
description String?
|
||||
coverImageUrl String?
|
||||
autoFilterCategories String[] @default([]) // Auto-add recipes matching these categories
|
||||
autoFilterTags String[] @default([]) // Auto-add recipes matching these tags
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
recipes CookbookRecipe[]
|
||||
|
||||
@@index([name])
|
||||
}
|
||||
|
||||
model CookbookRecipe {
|
||||
id String @id @default(cuid())
|
||||
cookbookId String
|
||||
recipeId String
|
||||
addedAt DateTime @default(now())
|
||||
|
||||
cookbook Cookbook @relation(fields: [cookbookId], references: [id], onDelete: Cascade)
|
||||
recipe Recipe @relation(fields: [recipeId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([cookbookId, recipeId])
|
||||
@@index([cookbookId])
|
||||
@@index([recipeId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user