<<<<<<< HEAD
This project is an AI-powered meal recommendation system that suggests budget-friendly, healthy meals based on user inputs such as BMI, dietary preferences, and monthly budget. The system leverages the MERN stack (MongoDB, Express.js, React.js, Node.js) and integrates Retrieval-Augmented Generation (RAG) with Generative AI (Gemini API) for personalized recommendations.
- Frontend: React.js (Tailwind CSS for styling)
- Backend: Node.js, Express.js
- Database: MongoDB
- AI Integration: Gemini API (Generative AI), RAG-based Retrieval System
- Deployment: Vercel (Frontend), Render/Heroku (Backend), MongoDB Atlas
β
User Input Form (BMI, allergies, budget, meal preferences)
β
Budget-Friendly Meal Suggestions (AI-powered recommendations)
β
Personalized Diet Planning (Based on health metrics)
β
Smart Data Retrieval (MongoDB stores food data & pricing)
β
AI Chatbot for Meal Queries (Real-time food recommendations)
β
Email-Based Weekly Progress Reports
β
Wearable Device Syncing (Smartwatch integration for health tracking)
π¦ Budget-Meal-Recommendation
βββ π backend # Node.js + Express.js Backend
β βββ π models # MongoDB Schemas
β βββ π routes # API Endpoints
β βββ π controllers # Business Logic
β βββ server.js # Main Server File
β
βββ π frontend # React.js Frontend
β βββ π src
β β βββ π components # UI Components
β β βββ π pages # Pages (Home, Dashboard, etc.)
β β βββ App.js # Main App Component
β
βββ π data # Food Dataset (MongoDB JSON Import)
β
βββ .env # API Keys & Configuration
βββ package.json # Dependencies
βββ README.md # Documentation
git clone https://github.com/yourusername/Budget-Meal-Recommendation.git
cd Budget-Meal-Recommendation
cd backend
npm install
Create a .env file in the backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
GEMINI_API_KEY=your_gemini_api_key
Start the server:
npm run dev
cd frontend
npm install
npm start
Endpoint: /api/generate-meal
Method: POST
Description: Suggests a budget-friendly meal based on user input.
{
"budget": 400,
"taste": "Spicy",
"allergies": ["Peanuts"],
"bmi": 22
}
{
"mealPlan": "Grilled Chicken Salad with Brown Rice and Vegetables under 400 BDT"
}
Endpoint: /api/meals
Method: GET
Description: Retrieves all meals stored in MongoDB.
[
{
"name": "Vegetable Khichuri",
"price": 150,
"calories": 400,
"type": "Vegetarian"
},
{
"name": "Grilled Chicken Salad",
"price": 350,
"calories": 500,
"type": "Protein-Rich"
}
]
1οΈβ£ User inputs budget, taste preference, and dietary needs.
2οΈβ£ MongoDB retrieves meals within the budget.
3οΈβ£ Backend augments meal data and sends it to Gemini API.
4οΈβ£ Gemini generates a personalized meal plan.
5οΈβ£ Frontend displays AI-powered meal suggestions.
1οΈβ£ Fork the repository.
2οΈβ£ Create a new branch: git checkout -b feature-branch
.
3οΈβ£ Commit changes: git commit -m "Added new feature"
.
4οΈβ£ Push to GitHub: git push origin feature-branch
.
5οΈβ£ Submit a Pull Request.
- β AI-powered grocery list generation based on meals.
- β Voice command support for chatbot.
- β Smartwatch calorie tracking integration.
This project is licensed under the MIT License.
=======
This is a MERN stack application that calculates BMI and provides personalized meal suggestions using Google's Generative AI. The application takes user inputs such as name, age, gender, height, weight, and budget to calculate BMI and generate customized meal suggestions for Bengali and English cuisine.
- BMI calculation based on height and weight
- Personalized meal suggestions based on BMI, gender, and budget
- Responsive design for both desktop and mobile devices
- Integration with Google's Generative AI for intelligent meal recommendations
- MongoDB: Database for storing user information (optional)
- Express: Backend server framework
- React: Frontend library with Vite for fast development
- Node.js: JavaScript runtime for the backend
- Google Generative AI: For generating personalized meal suggestions
- Node.js (v14 or higher)
- npm (v6 or higher)
- MongoDB (local or Atlas connection)
- Clone the repository
git clone <repository-url>
cd bmi-meal-app
- Install backend dependencies
cd backend
npm install
- Configure environment variables
Create a
.env
file in the backend directory with the following variables:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/bmi-meal-app
GOOGLE_API_KEY=your_google_api_key
- Install frontend dependencies
cd ../frontend
npm install
- Start the application
Backend:
cd backend
npm run dev
Frontend:
cd frontend
npm run dev
- Access the application
Open your browser and navigate to
http://localhost:5173
- Fill in your personal details in the form
- Click "Get Meal Suggestions"
- View your BMI results and personalized meal suggestions
- POST
/api/bmi/calculate
- Request body:
{ heightFeet, heightInches, weightKg }
- Response:
{ bmi, category }
- Request body:
- POST
/api/meal/suggestions
- Request body:
{ name, age, gender, heightFeet, heightInches, weightKg, budget }
- Response:
{ bmi, bmiCategory, mealSuggestions }
- Request body:
bmi-meal-app/
βββ backend/
β βββ node_modules/
β βββ routes/
β β βββ bmi.js
β β βββ meal.js
β βββ .env
β βββ package.json
β βββ server.js
βββ frontend/
βββ node_modules/
βββ public/
βββ src/
β βββ components/
β β βββ BMIResult.jsx
β β βββ MealSuggestions.jsx
β β βββ UserForm.jsx
β βββ services/
β β βββ api.js
β βββ App.css
β βββ App.jsx
β βββ main.jsx
βββ index.html
βββ package.json
βββ vite.config.js
- The Google API key included in the code is for demonstration purposes only. Replace it with your own API key for production use.
- The application uses the Gemini AI model for generating meal suggestions.
5b113d4 (Initial commit)