A Flask-based web application that analyzes food nutrition using the USDA FoodData Central API. Users can search for food items, view detailed nutritional information, save meals to a daily tracker, monitor nutrition intake, and receive AI-inspired dietary recommendations.
- 🔍 Search food items using the USDA FoodData Central API
- 🔥 View calories and nutritional information
- 💪 Display protein, fat, carbohydrates, fiber, and sugar
- 🍽️ Add meals to a daily nutrition tracker
- 📊 Dashboard with nutrition summary and charts
- 🤖 AI-inspired health recommendations based on daily intake
- 💾 SQLite database for storing meal history
- 🌐 Responsive web interface built with Flask
- HTML5
- CSS3
- JavaScript
- Chart.js
- Python
- Flask
- SQLite
- USDA FoodData Central API
- Flask
- Requests
- python-dotenv
Nutrition-Analyzer/
│
├── app.py
├── config.py
├── requirements.txt
├── README.md
├── .env
├── database.db
│
├── models/
│ └── database.py
│
├── services/
│ └── usda_api.py
│
├── utils/
│ └── recommendation.py
│
├── templates/
│ ├── index.html
│ ├── tracker.html
│ └── dashboard.html
│
└── static/
├── style.css
├── script.js
└── images/
git clone https://github.com/your-username/Nutrition-Analyzer.gitcd Nutrition-Analyzerpython -m venv venvWindows
venv\Scripts\activatepip install -r requirements.txtUSDA_API_KEY=YOUR_API_KEY
python app.pyOpen your browser and visit:
http://127.0.0.1:5000
- Home Page
- Food Search
- Nutrition Analysis
- Daily Meal Tracker
- Nutrition Dashboard
- AI Health Recommendations
The application automatically creates an SQLite database (database.db) to store:
- Food Name
- Meal Type
- Calories
- Protein
- Fat
- Carbohydrates
- Fiber
- Sugar
- Quantity
- Date & Time
The application analyzes the user's daily nutritional intake and provides health recommendations such as:
- High calorie alerts
- Low protein suggestions
- High fat warnings
- High carbohydrate alerts
- Fiber improvement tips
- Sugar intake warnings
- User authentication
- Weekly and monthly nutrition reports
- PDF report generation
- Food image integration
- BMI calculator
- Water intake tracker
- Personalized nutrition goals
Samriddhi Gupta
AI/ML Internship Final Project
This project is developed for educational and internship purposes.