Backend:
- Add Tag type definitions (Tag, CreateTagInput, UpdateTagInput)
- Implement TagRepository with CRUD and recipe assignment methods
- Implement TagService with business logic and validation
- Create tag API routes (GET, POST, PUT, DELETE /api/tags)
- Add recipe-tag assignment endpoints (POST/DELETE /api/tags/recipes/:id/tags)
- Write 18 integration tests for tag functionality (all passing)
- Mount tag routes in main Express app
Frontend:
- Extend API client with tag CRUD and assignment methods
- Create useTags hook for tag state management
- Create TagSelector component for tag selection with inline tag creation
- Update RecipeForm to accept initialTags and pass selected tags to onSubmit
- Update RecipeDetailPage to fetch, display, and manage recipe tags
- Update RecipeCard to display tags with custom colors
- Add tag filter UI to RecipeListPage (note: backend filtering pending)
- Display tags in recipe detail view with color styling
Testing:
- All 34 backend tests passing (16 recipe + 18 tag tests)
- Frontend builds successfully with TypeScript strict mode
- Tag assignment and removal working end-to-end
Note: Tag filtering in recipe list shows UI but doesn't filter results yet.
Backend support for tag-based filtering can be added in future iteration.
- Created useRecipe hook for fetching single recipe with loading/error states
- Created RecipeForm component with comprehensive validation
- Title, ingredients, and instructions marked as required fields
- One ingredient/instruction per line with textarea inputs
- Optional metadata: servings, prep time, cook time, source URL, notes
- Real-time form validation with error messaging
- Implemented RecipeDetailPage with three modes:
- Create mode: /recipe/new route for adding new recipes
- View mode: Display recipe with formatted ingredients and instructions
- Edit mode: Toggle to edit existing recipe with pre-populated form
- Added delete functionality with two-step confirmation
- Included metadata cards for servings, prep time, and cook time
- Added navigation: Cook Mode button, back to list link
- Styled with Tailwind CSS for consistent UI/UX
- Verified TypeScript compilation and Vite build succeed
- Updated TODO.md to mark task complete