How deepukishore/deeplyfit_test works
Deeply Fit is a fitness and nutrition platform with web and mobile clients backed by a shared FastAPI service. Users create an account and complete goal-based onboarding, then track meals and health activity, review progress, and optionally use coaching, community, and subscription features. Both clients call the backend; the web diary additionally supports cached and queued offline changes. The graph preserves README-documented product areas, while some internal links are limited to explicit imports in the supplied source index or excerpts.
Main entry points: main.py FastAPI application · food_logs.py Food logging and search · App.js Web application · index.js Mobile application
Components 30
Web and mobile clients
- Web application
frontend/src/App.js - Mobile application
mobile/index.js - Web authentication
frontend/src/context/AuthContext.js - Web food diary
frontend/src/pages/Diary.js - Offline diary cache
frontend/src/utils/diaryStorage.js - Mobile navigation
mobile/src/navigation/AppNavigator.js - Mobile authentication
mobile/src/context/AuthContext.js - Mobile food diary
mobile/src/pages/Diary.js - Mobile local storage
mobile/src/utils/storage.js - Device step tracking
mobile/src/hooks/useStepCounter.js
Backend API domains
- FastAPI application
backend/main.py - Accounts and sessions
backend/routes/auth.py - Profiles and goals
backend/routes/users.py - Food logging and search
backend/routes/food_logs.py - Activity and steps
backend/routes/activity.py - Workouts and progress
backend/routes/workouts.py - Water and weight
backend/routes/water_logs.py - Meal plans and templates
backend/routes/meal_plans.py - Community and challenges
backend/routes/community.py - AI coaching
backend/routes/ai_chat.py - Subscriptions and payments
backend/routes/payments.py
Backend core and data
- SQL database
backend/database.py - Domain data models
backend/models.py - JWT and password helpers
backend/auth/jwt.py - Food analysis and suggestions
backend/ai/gemini_food.py - Food data lookup
backend/utils/open_food_facts.py
External services
- Google Gemini
- Open Food Facts
- Razorpay
Other components
- Fitness user
Connections 38
- Fitness user → Web application: uses
- Fitness user → Mobile application: uses
- Web application → Web authentication: provides context
frontend/src/App.js - Web application → Web food diary: routes to
frontend/src/App.js - Mobile application → Mobile authentication: provides context
mobile/index.js - Mobile application → Mobile navigation: starts navigation
mobile/index.js - Mobile navigation → Mobile food diary: routes to
mobile/src/navigation/AppNavigator.js - Web authentication → Offline diary cache: sets account
frontend/src/context/AuthContext.js - Web food diary → Offline diary cache: reads and queues
frontend/src/pages/Diary.js - Mobile authentication → Mobile local storage: stores account
mobile/src/context/AuthContext.js - Mobile food diary → Mobile local storage: uses storage
- Web application → FastAPI application: calls API
- Mobile application → FastAPI application: calls API
- FastAPI application → Accounts and sessions: registers
backend/main.py - FastAPI application → Profiles and goals: registers
backend/main.py - FastAPI application → Food logging and search: registers
backend/main.py - FastAPI application → Activity and steps: registers
backend/main.py - FastAPI application → Workouts and progress: registers
backend/main.py - FastAPI application → Water and weight: registers
backend/main.py - FastAPI application → Meal plans and templates: registers
backend/main.py - FastAPI application → Community and challenges: registers
backend/main.py - FastAPI application → AI coaching: registers
backend/main.py - FastAPI application → Subscriptions and payments: registers
backend/main.py - Accounts and sessions → JWT and password helpers: creates tokens
backend/routes/auth.py - Accounts and sessions → SQL database: queries accounts
backend/routes/auth.py - Accounts and sessions → Domain data models: uses entities
backend/routes/auth.py - Profiles and goals → SQL database: queries user data
backend/routes/users.py - Profiles and goals → Domain data models: uses entities
backend/routes/users.py - Food logging and search → SQL database: queries food logs
backend/routes/food_logs.py - Food logging and search → Domain data models: uses entities
backend/routes/food_logs.py - Food logging and search → Food data lookup: looks up foods
backend/routes/food_logs.py - Food logging and search → Food analysis and suggestions: requests suggestions
backend/routes/food_logs.py - Domain data models → SQL database: uses base
backend/models.py - Food analysis and suggestions → Google Gemini: analyzes with
- Food data lookup → Open Food Facts: queries food data
- AI coaching → Google Gemini: coaches with
- Subscriptions and payments → Razorpay: processes payments
- Device step tracking → Activity and steps: syncs steps