How carlcaraan/angular-fitnance works
FitNance is an Angular personal fitness and finance application. Users enter through login or registration, then use profile setup to provide health, fitness, and finance details; profile management loads and updates their profile and computes targets. The app also exposes food tracking, workout, dashboard, settings, and user-theme capabilities. Pages call domain services, which make HTTP requests to a configured backend; authentication state is kept in browser local storage. Several routes and modules are documented in the tree/index but their implementation was not sampled, so those connections are omitted where call evidence is unavailable.
Main entry points: app.routes.ts Route dispatch · profile-setup.ts Profile setup · profile.ts Profile management · auth.service.ts Auth state
Components 25
App shell
- Route dispatch
src/app/app.routes.ts - Main layout
src/app/layouts/main-layout/main-layout.ts
Authentication
- Login page
src/app/pages/auth/login/login.ts - Registration page
src/app/pages/auth/register/register.ts - Login service
src/app/services/authentication/login.service.ts - Registration service
src/app/services/authentication/register.service.ts - Auth state
src/app/services/authentication/auth.service.ts - Browser local storage
Profile and setup
- Profile setup
src/app/pages/profile-setup/profile-setup.ts - Setup catalogs
src/app/services/setup - Setup submission
src/app/services/profile-setup/profile-setup.service.ts - Profile completion
src/app/services/profile-setup/complete-profile.service.ts - Profile management
src/app/pages/profile/profile.ts - Profile service
src/app/services/profile/profile.service.ts - Loading state
src/app/services/loading/loading.service.ts
Fitness features
- Food tracking
src/app/pages/food/food.ts - Food service
src/app/services/food/food.service.ts - Food dialog
src/app/components/dialogs/food-dialog/food-dialog.ts - Dashboard
src/app/pages/dashboard/dashboard.ts - Workout
src/app/pages/workout/workout.ts - Settings
src/app/pages/settings/settings.ts - Settings service
src/app/services/settings/settings.service.ts - Theme service
src/app/services/theme/user-theme.service.ts
Other components
- User
- FitNance API
Connections 36
- User → Route dispatch: opens routes
src/app/app.routes.ts - Route dispatch → Login page: routes to
src/app/app.routes.ts - Route dispatch → Registration page: routes to
src/app/app.routes.ts - Route dispatch → Main layout: renders shell
src/app/app.routes.ts - Route dispatch → Profile setup: routes to
src/app/app.routes.ts - Route dispatch → Profile management: routes to
src/app/app.routes.ts - Route dispatch → Food tracking: routes to
src/app/app.routes.ts - Route dispatch → Dashboard: routes to
src/app/app.routes.ts - Route dispatch → Workout: routes to
src/app/app.routes.ts - Route dispatch → Settings: routes to
src/app/app.routes.ts - Login page → Login service: submits credentials
src/app/pages/auth/login/login.ts - Login page → Auth state: sets session
src/app/pages/auth/login/login.ts - Registration page → Registration service: submits registration
src/app/pages/auth/register/register.ts - Registration page → Auth state: uses session
src/app/pages/auth/register/register.ts - Login service → FitNance API: sends request
src/app/services/authentication/login.service.ts - Registration service → FitNance API: sends request
src/app/services/authentication/register.service.ts - Auth state → Browser local storage: reads and writes
src/app/services/authentication/auth.service.ts - Main layout → Theme service: applies theme
src/app/layouts/main-layout/main-layout.ts - Main layout → Auth state: checks session
src/app/layouts/main-layout/main-layout.ts - Profile setup → Setup catalogs: loads catalogs
src/app/pages/profile-setup/profile-setup.ts - Profile setup → Setup submission: computes setup
src/app/pages/profile-setup/profile-setup.ts - Profile setup → Profile completion: submits profile
src/app/pages/profile-setup/profile-setup.ts - Setup submission → FitNance API: sends request
src/app/services/profile-setup/profile-setup.service.ts - Profile completion → FitNance API: sends request
src/app/services/profile-setup/complete-profile.service.ts - Setup catalogs → FitNance API: loads options
src/app/services/setup/nutrition-goals.service.ts - Profile management → Setup catalogs: loads catalogs
src/app/pages/profile/profile.ts - Profile management → Profile service: loads and updates
src/app/pages/profile/profile.ts - Profile management → Loading state: toggles loading
src/app/pages/profile/profile.ts - Profile service → FitNance API: reads and writes
src/app/services/profile/profile.service.ts - Food tracking → Food service: manages foods
src/app/pages/food/food.ts - Food tracking → Food dialog: opens dialog
src/app/pages/food/food.ts - Food service → FitNance API: reads and writes
src/app/services/food/food.service.ts - Settings → Settings service: changes password
src/app/pages/settings/settings.ts - Settings → Theme service: manages theme
src/app/pages/settings/settings.ts - Settings service → FitNance API: sends request
src/app/services/settings/settings.service.ts - Theme service → FitNance API: loads and updates
src/app/services/theme/user-theme.service.ts