# captainmarraqueta/fitstart architecture

> Architecture diagram of the GitHub repository captainmarraqueta/fitstart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/captainmarraqueta/fitstart
- Repository: https://github.com/captainmarraqueta/fitstart

## Overview

FitStart is an Ionic/Angular fitness app with account access, session checking, home and profile screens, plus biometric and pedometer services. The visible entry workflow redirects to session checking; application routes then expose login or registration, and guard home/profile routes. AuthService implements Firebase email authentication, Firestore user records, and local token/user caching. The README gives setup instructions but no further product workflow. Several feature implementations were not sampled, so their runtime connections are omitted rather than inferred.

Main entry points: [`src/app/app-routing.module.ts`](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app-routing.module.ts) (Route table), [`src/app/services/auth.service.ts`](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/auth.service.ts) (Auth service), [`src/app/app.module.ts`](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app.module.ts) (App configuration), [`src/app/guards/login.guard.ts`](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/guards/login.guard.ts) (Login guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_router["Route table"]
  node_tabs["Tab navigation<br/>[tabs.component.ts]"]
  node_appmodule["App configuration<br/>[app.module.ts]"]
end

subgraph group_identity["Identity and access"]
  node_session["Session check"]
  node_login["Login screen<br/>[login.page.ts]"]
  node_register["Registration screen<br/>[register.page.ts]"]
  node_forgot["Password recovery<br/>[forgotpas.page.ts]"]
  node_authguard["Auth guard<br/>[auth.guard.ts]"]
  node_loginguard["Login guard<br/>[login.guard.ts]"]
  node_authservice["Auth service<br/>[auth.service.ts]"]
  node_userrecord["User model<br/>[usuario.ts]"]
end

subgraph group_fitness["Fitness experience"]
  node_home["Home screen<br/>[home.page.ts]"]
  node_profile["Profile screen<br/>[profile.page.ts]"]
  node_pedometer["Pedometer service"]
  node_podometerui["Pedometer display"]
end

subgraph group_platform["Platform services"]
  node_firebaseauth["Firebase Auth"]
  node_firestore[("Cloud Firestore")]
  node_localcache[("Browser local storage")]
  node_biometric["Biometric service"]
  node_environment["Firebase settings<br/>[environment.ts]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_router
node_router -->|"redirects to"| node_session
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_register
node_router -->|"routes to"| node_forgot
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_profile
node_router -->|"guards route"| node_authguard
node_router -->|"guards route"| node_loginguard
node_loginguard -->|"checks session"| node_authservice
node_authservice -->|"authenticates users"| node_firebaseauth
node_authservice -->|"reads and writes"| node_firestore
node_authservice -->|"stores session"| node_localcache
node_authservice -->|"uses model"| node_userrecord
node_appmodule -->|"loads routes"| node_router
node_appmodule -->|"configures Firebase"| node_environment

click node_router "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app-routing.module.ts"
click node_session "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/check-session/check-session.page.ts"
click node_login "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/login/login.page.ts"
click node_register "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/register/register.page.ts"
click node_forgot "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/forgotpas/forgotpas.page.ts"
click node_authguard "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/guards/auth.guard.ts"
click node_loginguard "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/guards/login.guard.ts"
click node_authservice "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/auth.service.ts"
click node_userrecord "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/models/usuario.ts"
click node_home "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/body/home/home.page.ts"
click node_tabs "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/components/tabs/tabs.component.ts"
click node_profile "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/body/profile/profile.page.ts"
click node_pedometer "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/podometer.service.ts"
click node_podometerui "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/components/podometer/podometer.component.ts"
click node_biometric "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/biometric.service.ts"
click node_appmodule "https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app.module.ts"
click node_environment "https://github.com/captainmarraqueta/fitstart/blob/main/src/environments/environment.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_router,node_tabs,node_appmodule,node_user toneBlue
class node_session,node_login,node_register,node_forgot,node_authguard,node_loginguard,node_authservice,node_userrecord toneAmber
class node_home,node_profile,node_pedometer,node_podometerui toneMint
class node_firebaseauth,node_firestore,node_localcache,node_biometric,node_environment toneRose
```

## Components

### App navigation

- [Route table](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`
- [Tab navigation](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/components/tabs/tabs.component.ts): `src/app/components/tabs/tabs.component.ts`
- [App configuration](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/app.module.ts): `src/app/app.module.ts`

### Identity and access

- [Session check](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/check-session/check-session.page.ts): `src/app/auth/check-session/check-session.page.ts`
- [Login screen](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/login/login.page.ts): `src/app/auth/login/login.page.ts`
- [Registration screen](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/register/register.page.ts): `src/app/auth/register/register.page.ts`
- [Password recovery](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/auth/forgotpas/forgotpas.page.ts): `src/app/auth/forgotpas/forgotpas.page.ts`
- [Auth guard](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/guards/auth.guard.ts): `src/app/guards/auth.guard.ts`
- [Login guard](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/guards/login.guard.ts): `src/app/guards/login.guard.ts`
- [Auth service](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/auth.service.ts): `src/app/services/auth.service.ts`
- [User model](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/models/usuario.ts): `src/app/models/usuario.ts`

### Fitness experience

- [Home screen](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/body/home/home.page.ts): `src/app/body/home/home.page.ts`
- [Profile screen](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/body/profile/profile.page.ts): `src/app/body/profile/profile.page.ts`
- [Pedometer service](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/podometer.service.ts): `src/app/services/podometer.service.ts`
- [Pedometer display](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/components/podometer/podometer.component.ts): `src/app/components/podometer/podometer.component.ts`

### Platform services

- **Firebase Auth**
- **Cloud Firestore**
- **Browser local storage**
- [Biometric service](https://github.com/captainmarraqueta/fitstart/blob/main/src/app/services/biometric.service.ts): `src/app/services/biometric.service.ts`
- [Firebase settings](https://github.com/captainmarraqueta/fitstart/blob/main/src/environments/environment.ts): `src/environments/environment.ts`

### Other components

- **App user**

## Connections

- App user → Route table: opens app (evidence: `src/app/app-routing.module.ts`)
- Route table → Session check: redirects to (evidence: `src/app/app-routing.module.ts`)
- Route table → Login screen: routes to (evidence: `src/app/app-routing.module.ts`)
- Route table → Registration screen: routes to (evidence: `src/app/app-routing.module.ts`)
- Route table → Password recovery: routes to (evidence: `src/app/app-routing.module.ts`)
- Route table → Home screen: routes to (evidence: `src/app/app-routing.module.ts`)
- Route table → Profile screen: routes to (evidence: `src/app/app-routing.module.ts`)
- Route table → Auth guard: guards route (evidence: `src/app/app-routing.module.ts`)
- Route table → Login guard: guards route (evidence: `src/app/app-routing.module.ts`)
- Login guard → Auth service: checks session (evidence: `src/app/guards/login.guard.ts`)
- Auth service → Firebase Auth: authenticates users (evidence: `src/app/services/auth.service.ts`)
- Auth service → Cloud Firestore: reads and writes (evidence: `src/app/services/auth.service.ts`)
- Auth service → Browser local storage: stores session (evidence: `src/app/services/auth.service.ts`)
- Auth service → User model: uses model (evidence: `src/app/services/auth.service.ts`)
- App configuration → Route table: loads routes (evidence: `src/app/app.module.ts`)
- App configuration → Firebase settings: configures Firebase (evidence: `src/app/app.module.ts`)
