How markaniban10/calorie-tracker works
Calorie Tracker is an offline-first nutrition and weight-tracking app. Users set a profile to calculate a calorie target, log foods and daily meals, and record weight; optional account features provide sign-in and cloud backup/restore. The graph reflects documented screen navigation and sampled module references. Some screen and storage implementations were not excerpted, so their internal calls are shown only where the source index or README supports them.
Main entry points: App.js App shell · storage.js Offline storage · TodayScreen.js Daily food log · AuthContext.js Auth and backup
Components 21
App navigation
- App shell
App.js - Navigation drawer
src/components/Drawer.js - About
src/screens/AboutScreen.js - Contacts
src/screens/ContactsScreen.js - Shared UI
src/components/ui.js - Toast notifications
src/components/Toast.js
Nutrition and weight tracking
- Profile setup
src/screens/ProfileScreen.js - Daily food log
src/screens/TodayScreen.js - Food picker
src/components/FoodPicker.js - Food form
src/components/FoodForm.js - Custom foods
src/screens/MyFoodsScreen.js - Weight history
src/screens/WeightScreen.js
Local data and calculations
- Offline storage
src/storage/storage.js - Seed foods
src/data/foods.js - Target calculations
src/utils/calc.js
Accounts and cloud
- Account settings
src/screens/AccountScreen.js - Sign in
src/screens/LoginScreen.js - Auth and backup
src/cloud/AuthContext.js - Firebase client
src/cloud/firebase.js
Other components
- App user
- Firebase services
Connections 27
- App user → App shell: uses
App.js - App shell → Daily food log: shows
App.js - App shell → Profile setup: shows
App.js - App shell → Weight history: shows
App.js - App shell → About: routes to
App.js - App shell → Contacts: routes to
App.js - App shell → Account settings: routes to
App.js - App shell → Sign in: routes to
App.js - App shell → Navigation drawer: renders
App.js - Daily food log → Food picker: renders
src/screens/TodayScreen.js - Food picker → Food form: renders
src/components/FoodPicker.js - Daily food log → Offline storage: reads and writes
src/screens/TodayScreen.js - Food picker → Offline storage: manages foods
src/components/FoodPicker.js - Custom foods → Offline storage: manages foods
src/screens/MyFoodsScreen.js - Custom foods → Food form: renders
src/screens/MyFoodsScreen.js - Weight history → Offline storage: records weights
src/screens/WeightScreen.js - Profile setup → Target calculations: calculates targets
src/screens/ProfileScreen.js - Daily food log → Target calculations: uses date key
src/screens/TodayScreen.js - Weight history → Target calculations: uses date key
src/screens/WeightScreen.js - Offline storage → Seed foods: seeds from
src/storage/storage.js - Sign in → Auth and backup: requests account actions
src/screens/LoginScreen.js - Account settings → Auth and backup: uses account state
src/screens/AccountScreen.js - Auth and backup → Offline storage: backs up local data
src/cloud/AuthContext.js - Auth and backup → Firebase client: uses client
src/cloud/AuthContext.js - Firebase client → Firebase services: connects to
src/cloud/firebase.js - App shell → Shared UI: uses
App.js - App shell → Toast notifications: provides
App.js