NutriLog Calorie Tracker
A daily calorie and macronutrient tracker with meal logging, daily targets, and visual progress bars.
Overview
NutriLog is a browser-based calorie tracker that helps users monitor daily food intake and macronutrient distribution. Unlike commercial nutrition apps that require accounts and monetize user data, NutriLog stores everything locally.
Users can log meals with estimated calories and macros, set daily targets, and view progress through visual progress bars and a rolling history.
Features
- Meal Logging: Add food items with calories, protein, carbs, fat
- Daily Targets: Set custom calorie and macro goals
- Progress Bars: Visual indicators for daily targets
- Meal Categories: Breakfast, lunch, dinner, snacks
- History: Review past days' intake
- Dashboard: Today's summary with remaining calories
- Custom Foods: Save frequently eaten items for quick add
Architecture
calorie-tracker.html
├── <style> → Progress bars, meal cards, dashboard layout
├── <main> → Dashboard, meal log form, history, targets panel
└── <script> → CRUD operations, macro calculations, localStorage
Tech Decisions
| Decision | Choice | Why |
|---|---|---|
| Storage | localStorage | Privacy-first, no accounts |
| UI | Dashboard pattern | At-a-glance nutrition overview |
| Macros | Per-food breakdown | Detailed nutritional insight |
Real-World Impact
MyFitnessPal requires an account and tracks user behavior. NutriLog provides the core calorie tracking loop without data collection. Users can monitor their nutrition without their eating habits being analyzed by third parties.
Measured Results
- Zero network requests
- < 5KB total page weight
- History retained across sessions
- Works offline
Conclusion
NutriLog demonstrates that nutrition tracking doesn't require surrendering eating data. Local storage provides the persistence needed for daily tracking without the privacy overhead.