A comprehensive meal planning system that allows users to:
- Create and manage weekly meal plans
- Add specific recipes to planned meals with serving sizes
- Auto-generate shopping lists from meal plans
- Track nutritional information for planned meals
- Share meal plans with others
- MealPlan: Core meal plan with name, description, date range, and public/private settings
- PlannedMeal: Individual meals in a plan (breakfast, lunch, dinner, snack) with recipe links
- ShoppingList: Auto-generated shopping lists from meal plans
- ShoppingListItem: Individual items in shopping lists with purchase tracking
- Pydantic models for request/response validation
- Support for CRUD operations on meal plans and planned meals
- Shopping list and nutrition summary schemas
- Business logic for meal plan management
- Shopping list generation with ingredient aggregation
- Nutrition calculation (mock implementation ready for real data)
- Permission-based access control
POST /meal-plans- Create new meal planGET /meal-plans- List user's meal plansGET /meal-plans/{id}- Get specific meal planPUT /meal-plans/{id}- Update meal planDELETE /meal-plans/{id}- Delete meal planPOST /meal-plans/{id}/meals- Add meal to planPOST /meal-plans/{id}/shopping-list- Generate shopping listGET /meal-plans/{id}/nutrition- Get nutrition summary
- Complete meal planning interface
- Calendar-based meal scheduling
- Shopping list management with purchase tracking
- Nutrition summary display
- Responsive design with Tailwind CSS
- TypeScript API client for all meal planning endpoints
- Type-safe request/response handling
- Authentication support
- Added navigation to meal planner
- Feature showcase on home page
- Create weekly/custom date range meal plans
- Add recipes to specific days and meal types
- Specify serving sizes for accurate shopping lists
- Add notes for meal customizations
- Automatically aggregate ingredients from all planned meals
- Group items by category (Produce, Dairy, Meat, etc.)
- Track purchase status
- Prevent duplicate ingredients
- Calculate total calories, protein, carbs, and fat
- Per-meal and total plan summaries
- Visual nutrition dashboard
- Make meal plans public to share with community
- Private meal plans for personal use
-- Core tables for meal planning
meal_plans (id, name, description, user_id, start_date, end_date, is_public, created_at, updated_at)
planned_meals (id, meal_plan_id, recipe_id, meal_date, meal_type, servings, notes, created_at)
shopping_lists (id, meal_plan_id, name, created_at, updated_at)
shopping_list_items (id, shopping_list_id, ingredient_name, quantity, unit, category, is_purchased, notes)- RESTful API design
- JWT authentication
- Input validation with Pydantic
- Error handling and proper HTTP status codes
- React with TypeScript
- Component-based architecture
- State management with React hooks
- Responsive design with Tailwind CSS
- Recipe Integration: Connect with actual recipe database for ingredient extraction
- Grocery Store Integration: Map ingredients to store locations/prices
- Meal Plan Templates: Pre-made meal plans for different dietary preferences
- Collaborative Planning: Family/household meal planning features
- Mobile App: React Native implementation
- AI Suggestions: ML-powered meal recommendations based on preferences
The feature requires:
- Backend: FastAPI, SQLAlchemy, Pydantic
- Frontend: React, TypeScript, Tailwind CSS, Lucide React icons
- Database: PostgreSQL or SQLite
This feature significantly enhances the Recipe Hub platform by adding practical meal planning functionality that goes beyond simple recipe sharing, making it a comprehensive cooking and meal management solution.