How achintxv/nutrisculpt works
NutriSculpt is a full-stack fitness and nutrition planner. The principal workflow is user registration and login, profile setup, AI generation of workout and meal plans, persistence, then dashboard selection and editing. The graph preserves authentication, profile, plan-generation, saved-plan management, and dashboard capabilities documented in the README. Source excerpts show key backend services and API wiring; some route and frontend request details are represented only by README statements, so those edges cite the README.
Main entry points: database.py Database sessions · main.py FastAPI application · api.js HTTP API client · auth.py Authentication routes
Components 24
Web application
- Login and registration
frontend/src/app/login/page.jsx - Profile editor
frontend/src/app/profile/page.jsx - Fitness dashboard
frontend/src/app/dashboard/page.jsx - Workout section
frontend/src/app/dashboard/WorkoutSection.jsx - Meal section
frontend/src/app/dashboard/MealSection.jsx - HTTP API client
frontend/src/lib/api.js
Backend API
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/api/auth.py - User routes
backend/app/api/users.py - Profile routes
backend/app/api/profiles.py - Workout routes
backend/app/api/workouts.py - Meal routes
backend/app/api/meals.py
Plan generation
- Plan generation route
backend/app/api/plans.py - AI plan generator
backend/app/services/ai_service.py - Plan persistence
backend/app/services/plan_service.py
Fitness data
- Fitness profile
backend/app/models/profile.py - Workout plans
backend/app/models/workout.py - Meal plans
backend/app/models/meal.py - User accounts
backend/app/models/user.py
Runtime infrastructure
- Database sessions
backend/app/core/database.py - JWT security
backend/app/core/security.py
Other components
- Fitness user
- PostgreSQL
- Google Gemini
Connections 38
- Fitness user → Login and registration: registers or logs in
README.md - Login and registration → HTTP API client: sends credentials
frontend/src/app/login/page.jsx - Profile editor → HTTP API client: updates profile
README.md - Fitness dashboard → HTTP API client: loads dashboard
README.md - Fitness dashboard → Workout section: renders
frontend/src/app/dashboard/page.jsx - Fitness dashboard → Meal section: renders
frontend/src/app/dashboard/page.jsx - Workout section → HTTP API client: manages workouts
frontend/src/app/dashboard/WorkoutSection.jsx - Meal section → HTTP API client: manages meals
frontend/src/app/dashboard/MealSection.jsx - HTTP API client → FastAPI application: HTTP JSON
README.md - FastAPI application → Authentication routes: registers router
backend/app/main.py - FastAPI application → User routes: registers router
backend/app/main.py - FastAPI application → Profile routes: registers router
backend/app/main.py - FastAPI application → Plan generation route: registers router
backend/app/main.py - FastAPI application → Workout routes: registers router
backend/app/main.py - FastAPI application → Meal routes: registers router
backend/app/main.py - Authentication routes → JWT security: verifies and issues JWT
backend/app/api/auth.py - Authentication routes → User accounts: queries account
backend/app/api/auth.py - Profile routes → Fitness profile: reads and updates
backend/app/api/profiles.py - User routes → User accounts: manages accounts
backend/app/api/users.py - Plan generation route → AI plan generator: requests recommendations
backend/app/api/plans.py - AI plan generator → Google Gemini: generates structured plan
backend/app/services/ai_service.py - Plan generation route → Plan persistence: saves generated plans
backend/app/api/plans.py - Plan persistence → Workout plans: creates workout records
backend/app/services/plan_service.py - Plan persistence → Meal plans: creates meal records
backend/app/services/plan_service.py - AI plan generator → Fitness profile: uses profile details
backend/app/services/ai_service.py - Workout routes → Workout plans: manages saved plans
backend/app/api/workouts.py - Meal routes → Meal plans: manages saved plans
backend/app/api/meals.py - Profile routes → Database sessions: uses session
backend/app/api/profiles.py - Plan generation route → Database sessions: uses session
backend/app/api/plans.py - Workout routes → Database sessions: uses session
backend/app/api/workouts.py - Meal routes → Database sessions: uses session
backend/app/api/meals.py - User routes → Database sessions: uses session
backend/app/api/users.py - Authentication routes → Database sessions: uses session
backend/app/api/auth.py - Database sessions → PostgreSQL: queries and commits
backend/app/core/database.py - User accounts → Database sessions: maps account table
backend/app/models/user.py - Fitness profile → Database sessions: maps profile table
backend/app/models/profile.py - Workout plans → Database sessions: maps workout tables
backend/app/models/workout.py - Meal plans → Database sessions: maps meal tables
backend/app/models/meal.py