Meal Planner is a full-stack web application that allows users to search for recipes, plan their meals, and manage their dietary preferences efficiently.
- π Search Recipes: Find recipes based on ingredients, cuisine, and dietary restrictions.
- π Meal Planning: Add recipes to meal plans for different days of the week.
- β Authentication: Secure login and registration system.
- π Protected Routes: Certain features require authentication.
- π Swagger API Documentation: Easily explore API endpoints.
- π Winston Logging: Centralized logging for debugging and monitoring.
- React (TypeScript) β Component-based UI development
- React Router β Navigation and protected routes
- CSS β Styling and responsive design
- Node.js & Express β Server-side logic
- MongoDB & Mongoose β Database and ORM
- JWT (JSON Web Tokens) β Secure authentication
- Bcrypt.js β Password hashing
- Swagger β API documentation
- Winston β Logging middleware
- Node.js (>=16)
- MongoDB (local or cloud-based)
git clone https://github.com/ramzibouzaiene/meal-planner.git
cd meal-plannercd Back
npm installcd ../Front
npm installCreate a .env file in the backend folder and add:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretnpm run devnpm run devPOST /api/auth/login- User loginPOST /api/auth/register- User registration
POST /api/favorites- Create a favorite mealGET /api/favorites- Get all favoritesPUT /api/favorites/:id- Update favoriteDELETE /api/favorites/:id- Delete favorite
POST /api/mealPlans- Create a meal planGET /api/mealPlans- Get all meal plansPUT /api/mealPlans/:id- Update meal planDELETE /api/mealPlans/:id- Delete meal plan
The API documentation is available via Swagger. To access it, start the backend and visit:
http://localhost:5000/api-docsSome routes require authentication using JWT tokens. The frontend handles this with a protected route component.