AI Meal Planner is a MERN stack application that generates personalized meal plans based on user preferences, dietary restrictions, and available pantry items using AI technology.
- 🧠 AI-powered meal plan generation using meta-llama/Meta-Llama-3.1-70B-Instruct by Nebius AI Studio
- 👤 User account creation and authentication
- 🤖 ai-powered chat assistant – provides dietary advice and personalized meal suggestions.
- 🥗 Personalized meal recommendations based on dietary preferences
- 🧪 Allergy and dietary restriction filtering
- 🥫 Pantry-based recipe suggestions to reduce food waste
- 📝 Custom instructions for meal plan generation
- 📊 Nutritional information for each meal
- 📜 Meal planning history tracking
- Frontend: React, React Router, Bootstrap
- Backend: Node.js, Express.js
- Database: MongoDB
- AI Integration: Nebius AI Studio (Meta-Llama-3.1-8B-Instruct)
- Node.js (v14+)
- MongoDB (local or Atlas)
- Nebius AI Studio API key
-
Clone the repository
git clone https://github.com/yourusername/ai-meal-planner.git cd ai-meal-planner -
Install backend dependencies
cd server npm install -
Configure environment variables Create a
.envfile in the server directory:PORT=5000 MONGODB_URI=your_mongodb_connection_string NEBIUS_API_KEY=your_nebius_api_key -
Install frontend dependencies
cd ../client npm install -
Start the development servers
Backend:
cd ../server node server.jsFrontend:
cd ../client npm start -
Access the application Open your browser and navigate to
http://localhost:3000
ai-meal-planner/
├── client/ # React frontend
│ ├── public/ # Static files
│ └── src/
│ ├── components/ # UI components
│ ├── contexts/ # React contexts
│ ├── pages/ # Page components
│ └── utils/ # Utility functions
│
└── server/ # Node.js backend
├── config/ # Configuration files
├── controllers/ # Route controllers
├── models/ # MongoDB models
├── routes/ # API routes
└── services/ # Business logic
POST /api/users/login- User loginPOST /api/users- Create new userPUT /api/users/:userId- Update user preferencesGET /api/users/:userId- Get user details
POST /api/meals/generate- Generate new meal planGET /api/meals/user/:userId- Get user's meal plansGET /api/meals/history/:userId- Get meal planning historyDELETE /api/meals/plan/:id- Delete a meal plan
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Nebius AI Studio for providing the AI model
- MongoDB Atlas for database hosting
- Bootstrap for UI components
- React for the frontend framework