The AI-Powered Calorie Tracking App That Makes Logging Effortless
📸 Snap a photo → Get nutrition instantly. No more manual typing.
| Feature | Description |
|---|---|
| 📸 Photo Scanning | AI recognizes food from photos using multiple ML models |
| 📋 Label OCR | Point camera at nutrition labels for instant scanning |
| 🎤 Voice Logging | "I had 2 eggs and toast" - natural language input |
| 📊 Smart Analytics | Trends, insights, and AI-powered recommendations |
| 🔥 Gamification | Streaks, XP, levels, achievements to keep you motivated |
| 🆓 100% Free | No premium tier, no ads, just results |
- Python 3.11+
- Node.js 20+
- (Optional) Docker
# Clone the repository
git clone https://github.com/yourusername/NutriScan-ai.git
cd NutriScan-ai
# Backend setup
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
python seed_foods.py # Seed with 150+ foods
uvicorn main:app --reload
# Frontend setup (new terminal)
cd frontend
npm install
npm run devVisit:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
docker-compose up -dThis starts:
- PostgreSQL database
- Redis cache
- FastAPI backend
- Next.js frontend
User uploads photo → Multiple AI models analyze → Food detected → Nutrition from database
Models used:
nateraw/food(Food-101 trained)Kaludi/food-category-classification-v2.0- Fallback to common foods database
"I had a chicken sandwich and a banana"
→ NLP parses entities
→ Matches to database
→ Logged with nutrition
| Action | XP |
|---|---|
| Log meal | +10 |
| Photo/Voice log | +15 |
| Hit calorie target | +25 |
| Hit protein target | +20 |
| 7-day streak | +100 |
| 30-day streak | +500 |
- Framework: FastAPI (Python 3.11)
- Database: SQLite (dev) / PostgreSQL (prod)
- AI APIs: Hugging Face (free tier)
- Food Data: USDA + OpenFoodFacts
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Language: TypeScript
NutriScan-ai/
├── backend/
│ ├── api/ # API routes
│ │ ├── auth.py # Authentication
│ │ ├── meals.py # Meal logging
│ │ ├── foods.py # Food search
│ │ ├── scan.py # AI scanning
│ │ └── analytics.py
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ ├── main.py # FastAPI app
│ └── seed_foods.py # Database seeder
│
├── frontend/
│ ├── src/app/ # Next.js pages
│ ├── src/lib/ # API client, auth
│ └── src/components/
│
└── docker-compose.yml # Production deploy
| Endpoint | Method | Description |
|---|---|---|
/auth/register |
POST | Create account |
/auth/login |
POST | Get JWT token |
/meals/ |
GET/POST | List/create meals |
/foods/search |
GET | Search food database |
/scan/photo |
POST | AI photo recognition |
/scan/voice |
POST | Natural language log |
/analytics/daily |
GET | Daily summary |
/analytics/trends |
GET | Nutrition trends |
Full docs: http://localhost:8000/docs
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing - Open a Pull Request
MIT License - see LICENSE for details.
- Food data from USDA FoodData Central
- OpenFoodFacts community
- AI models from Hugging Face
Built with ❤️ for healthier eating