A modern web application for meal planning, recipe management, and shopping list creation. Built with the MERN stack and integrated with the Spoonacular API for access to thousands of recipes and nutritional information.
Foodiary is a full-stack web application that helps users plan their meals, discover new recipes, and organize their shopping. The project was built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and demonstrates modern web development practices including React Hooks, RESTful APIs, and responsive design.
The application integrates with the Spoonacular API to provide users with personalized meal plans based on their dietary preferences, calorie goals, and ingredient restrictions. Users can save their favorite recipes, create custom meal plans, and manage interactive shopping lists.
🥗 Smart Meal Planning
- Search meal plans by dietary preferences (vegetarian, vegan, keto, etc.)
- Filter by calories and excluded ingredients
- Generate personalized daily meal plans with nutritional information
❤️ Favorite Management
- Save meal plans to favorites with one click
- Organize your collection of favorite recipes
- Quick access to saved meal plans
🛒 Interactive Shopping Lists
- Add items to shopping list with quantities
- Mark items as purchased with progress tracking
- Remove purchased items in bulk
👤 User Management
- Secure user registration and authentication
- Create and edit custom meal plans
- Personal profile management with JWT tokens
|
Frontend
|
Backend
|
External Services
- Spoonacular API for recipe data and meal planning
- Node.js
- MongoDB
- Spoonacular API key (Get it here)
-
Clone and navigate:
git clone https://github.com/yourusername/foodiary.git cd foodiary -
Set up environment variables:
Create
frontend/.env:VITE_SPOONACULAR_API_KEY=your_api_key_here
Create
backend/.env:MONGODB_URI=mongodb://mongodb:27017/foodiary JWT_SECRET=your_jwt_secret_here PORT=3000
-
Launch application:
docker compose up --build
🎉 Application ready at: http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| Authentication | ||
POST |
/api/register |
Register new user |
POST |
/api/login |
User login |
POST |
/api/logout |
User logout |
| Meal Plans | ||
GET |
/api/user/my-plans |
Get user's plans |
POST |
/api/user/my-plans |
Create new plan |
PUT |
/api/user/my-plans/:id |
Update plan |
DELETE |
/api/user/my-plans/:id |
Delete plan |
| Favorites | ||
GET |
/api/user/favorite-meal-plans |
Get favorites |
POST |
/api/user/favorite-meal-plans |
Add to favorites |
DELETE |
/api/user/favorite-meal-plans/:id |
Remove favorite |
| Shopping | ||
GET |
/api/user/shopping |
Get shopping list |
POST |
/api/user/shopping |
Add item |
PATCH |
/api/user/shopping/:id/toggle |
Toggle purchased |
DELETE |
/api/user/shopping/:id |
Delete item |
















