Skip to content
Kabir Mahmud

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

DecisionChoiceWhy
StoragelocalStoragePrivacy-first, no accounts
UIDashboard patternAt-a-glance nutrition overview
MacrosPer-food breakdownDetailed 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.