A simple, reliable nutrition tracking application built with Django REST Framework and React. No AI gimmicks, no subscription fees - just straightforward meal tracking that actually works.
After a year of going to the gym, I wanted to start tracking my meals properly. The market is flooded with expensive "AI-powered calorie tracking apps" that promise to identify food from photos, but having worked with vision models myself, I know how unreliable they can be:( I didn't want to pay $10-15/month for features that don't work consistently. Since I had a PC at home, I figured why not build something simple and host it myself? Something I could also share with friends who were in the same boat.
This app focuses on what actually matters: accurate nutrition tracking through a comprehensive ingredient database, not fancy AI that gets your apple confused with an orange.
- Daily Nutrition Tracking: Log meals across breakfast, lunch, dinner, and snacks
- Comprehensive Ingredient Database: Pre-loaded with detailed nutritional information
- Recipe Management: Create and save custom recipes
- Weight Tracking: Monitor weight changes with visual charts
- Nutrition Goals: Set and track daily macro targets
- Historical Analysis: View your nutrition trends over time
- Responsive Design: Works on desktop and mobile
Backend
- Django 4.x with Django REST Framework
- SQLite (dev) / PostgreSQL (production)
- Token-based authentication
Frontend
- React 18 with Hooks
- Chart.js for visualizations
- Axios for API calls
# Clone and navigate
git clone https://github.com/brij0/calorietracker.git
cd nutrition-tracker/backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies and setup database
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
# Start server
python manage.py runserver# Navigate and install
cd ../frontend
npm install
# Create environment file
echo "REACT_APP_API_BASE=http://localhost:8000/api" > .env
# Start development server
npm startVisit http://localhost:3000 and start tracking!
- Real-time nutrition summary with progress bars
- Meal breakdown with macro information
- Quick access to logging and recipes
- Search comprehensive ingredient database
- Custom portion sizes with automatic conversion
- Recipe integration for quick logging
- Meal categorization
- Nutrition trends over time
- Weight tracking with charts
- Goal progress visualization
- Historical comparisons
# Authentication
POST /api/auth/login/
POST /api/auth/register/
# Nutrition Tracking
GET/POST /api/daily-intake/
GET /api/nutrition-history/
DELETE /api/daily-intake/clear-meal/
# Recipe Management
GET/POST /api/recipes/
POST /api/recipes/create/
# Data Management
GET/POST /api/ingredients/
GET/POST /api/user-weight/
GET/POST /api/nutrition-goals/
User ──→ DailyIntake ──→ IntakeItem ──→ Ingredient
│ │
├──→ Recipe ──→ RecipeIngredient ──→ Ingredient
│
├──→ UserWeight
└──→ NutritionGoals
- Barcode scanning for packaged foods
- Meal planning features
- Friends/sharing functionality
- Export data to CSV
- Mobile app version
This started as a personal project, but I'm happy to accept contributions! Feel free to:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this for your own nutrition tracking needs!
Built with ❤️ for people who want simple, reliable nutrition tracking without the monthly subscription fees and unreliable AI features.