Nutrition Advisor is an AI-powered web application that provides personalized dietary recommendations based on user input such as BMI, age, gender, health conditions, and eating habits. The system leverages Google Gemini AI to generate expert-driven nutrition advice to help users maintain a healthy lifestyle.
- 📊 BMI Calculation - Calculates BMI based on user-provided weight and height.
- 🏥 Nutrition Problem Detection - Identifies potential nutrition-related issues.
- 🍎 Dietary Habit Analysis - Evaluates user eating habits for deficiencies.
- 🤖 AI-Powered Advice - Generates personalized nutrition recommendations.
- 🌍 Cross-Origin Support - CORS enabled for seamless frontend-backend communication.
- React.js
- Axios
- HTML, CSS, JavaScript
- Node.js
- Express.js
- Google Generative AI (Gemini Pro)
- Body-parser
- CORS
- Users enter their age, gender, weight, height, and dietary habits.
- The system calculates BMI and evaluates nutrition-related issues.
- AI-generated personalized nutrition advice is provided based on user data.
- Clone the repository:
git clone https://github.com/your-username/nutrition-advisor.git cd nutrition-advisor/backend
- Install dependencies:
npm install
- Create a
.env
file and add your Google Gemini API Key:GOOGLE_API_KEY=your_google_api_key
- Start the server:
npm start
- Navigate to the frontend directory:
cd ../frontend
- Install dependencies:
npm install
- Start the frontend:
npm start
The application will be available at http://localhost:3000 (frontend) and http://localhost:5000 (backend).
{
"age": 25,
"gender": "Male",
"weight": 70,
"heightInFeet": 5.9,
"healthIssues": "Diabetes",
"dietaryHabits": {
"fruits": 3,
"vegetables": 2,
"proteinSources": 2,
"wholeGrains": 1,
"micronutrientDeficiency": "Iron"
}
}
{
"bmi": 23.5,
"nutritionProblem": "Healthy weight",
"advice": "Maintain a balanced diet with sufficient iron intake..."
}
This project is licensed under the MIT License.
For any queries, reach out to Shiva Ganesh Talikota via LinkedIn or email at shivaganesh9108@gmail.com.
Contributions are welcome! Feel free to open an issue or submit a pull request. 🚀