# matifl3/lfmn architecture

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

- Interactive diagram: https://gitdiagram.com/matifl3/lfmn
- Repository: https://github.com/matifl3/lfmn

## Overview

LFM Nacional is a sim-racing league platform; this repository tree covers its Angular frontend, not the Spring backend. The user-facing workflow starts at the SPA routes, where drivers browse races and championships, manage profiles, participate in incidents, setups, achievements, and notifications, while moderators and administrators access dedicated panels. Feature components use a shared API client to communicate with the backend. The README documents additional business capabilities, including session-result ingestion and rating, but their backend implementation is outside this tree; unsampled feature internals are represented only where routes or documentation establish them.

Main entry points: [`frontend/src/app/app.routes.ts`](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/app.routes.ts) (App routes), [`frontend/src/app/core/services/api.service.ts`](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/core/services/api.service.ts) (API client), [`frontend/src/app/features/incidents/incidents.component.ts`](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/incidents/incidents.component.ts) (Incidents and appeals), [`frontend/src/app/features/achievements/achievements.component.ts`](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/achievements/achievements.component.ts) (Achievements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_app["SPA shell<br/>[app.ts]"]
  node_auth["Authentication<br/>[auth.component.ts]"]
  node_api["API client<br/>[api.service.ts]"]
end

subgraph group_league["League participation"]
  node_home["Home<br/>[home.component.ts]"]
  node_races["Race browsing"]
  node_race_detail["Race detail"]
  node_championship["Championship standings"]
  node_my_championships["My championships"]
  node_categories["Categories"]
end

subgraph group_community["Community features"]
  node_profiles["Driver profiles"]
  node_my_profile["My profile"]
  node_incidents["Incidents and appeals"]
  node_setups["Setups"]
  node_achievements["Achievements"]
  node_notifications["Notifications"]
end

subgraph group_operations["League operations"]
  node_admin["Admin panel<br/>[admin.component.ts]"]
  node_data_models["Domain models<br/>[models.ts]"]
end

node_driver(("Driver"))
node_backend["League API"]

node_driver -->|"opens"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_races
node_routes -->|"routes to"| node_race_detail
node_routes -->|"routes to"| node_championship
node_routes -->|"routes to"| node_categories
node_routes -->|"routes to"| node_setups
node_routes -->|"routes to"| node_profiles
node_routes -->|"routes to"| node_my_profile
node_routes -->|"routes to"| node_notifications
node_routes -->|"routes to"| node_achievements
node_routes -->|"routes to"| node_incidents
node_routes -->|"routes to"| node_admin
node_routes -->|"routes to"| node_my_championships
node_app -->|"hosts"| node_routes
node_auth -->|"requests login"| node_api
node_api -->|"sends HTTP"| node_backend
node_incidents -->|"requests incident data"| node_api
node_my_championships -->|"requests championship data"| node_api
node_achievements -->|"uses API"| node_api
node_admin -->|"uses API"| node_api
node_races -.->|"supports race enrollment"| node_backend
node_race_detail -.->|"presents race results"| node_backend
node_backend -.->|"provides standings"| node_championship
node_backend -.->|"supports stewarding"| node_incidents
node_backend -.->|"supports setup sharing"| node_setups
node_backend -.->|"awards achievements"| node_achievements
node_backend -.->|"provides notifications"| node_notifications

click node_routes "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/app.routes.ts"
click node_app "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/app.ts"
click node_auth "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/auth/auth.component.ts"
click node_api "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/core/services/api.service.ts"
click node_home "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/home/home.component.ts"
click node_races "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/races/races-list/races-list.component.ts"
click node_race_detail "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/races/race-detail/race-detail.component.ts"
click node_championship "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/championship/championship.component.ts"
click node_my_championships "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/my-championships/my-championships.component.ts"
click node_categories "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/categories/categories.component.ts"
click node_profiles "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/profile/driver-profile/driver-profile.component.ts"
click node_my_profile "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/profile/my-profile/my-profile.component.ts"
click node_incidents "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/incidents/incidents.component.ts"
click node_setups "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/setups/setups.component.ts"
click node_achievements "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/achievements/achievements.component.ts"
click node_notifications "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/notifications/notifications.component.ts"
click node_admin "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/admin/admin.component.ts"
click node_data_models "https://github.com/matifl3/lfmn/blob/main/frontend/src/app/core/models/models.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_routes,node_app,node_auth,node_api toneBlue
class node_home,node_races,node_race_detail,node_championship,node_my_championships,node_categories toneAmber
class node_profiles,node_my_profile,node_incidents,node_setups,node_achievements,node_notifications,node_backend toneMint
class node_admin,node_data_models toneRose
class node_driver toneIndigo
```

## Components

### App shell

- [App routes](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [SPA shell](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/app.ts): `frontend/src/app/app.ts`
- [Authentication](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/auth/auth.component.ts): `frontend/src/app/features/auth/auth.component.ts`
- [API client](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/core/services/api.service.ts): `frontend/src/app/core/services/api.service.ts`

### League participation

- [Home](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/home/home.component.ts): `frontend/src/app/features/home/home.component.ts`
- [Race browsing](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/races/races-list/races-list.component.ts): `frontend/src/app/features/races/races-list/races-list.component.ts`
- [Race detail](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/races/race-detail/race-detail.component.ts): `frontend/src/app/features/races/race-detail/race-detail.component.ts`
- [Championship standings](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/championship/championship.component.ts): `frontend/src/app/features/championship/championship.component.ts`
- [My championships](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/my-championships/my-championships.component.ts): `frontend/src/app/features/my-championships/my-championships.component.ts`
- [Categories](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/categories/categories.component.ts): `frontend/src/app/features/categories/categories.component.ts`

### Community features

- [Driver profiles](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/profile/driver-profile/driver-profile.component.ts): `frontend/src/app/features/profile/driver-profile/driver-profile.component.ts`
- [My profile](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/profile/my-profile/my-profile.component.ts): `frontend/src/app/features/profile/my-profile/my-profile.component.ts`
- [Incidents and appeals](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/incidents/incidents.component.ts): `frontend/src/app/features/incidents/incidents.component.ts`
- [Setups](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/setups/setups.component.ts): `frontend/src/app/features/setups/setups.component.ts`
- [Achievements](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/achievements/achievements.component.ts): `frontend/src/app/features/achievements/achievements.component.ts`
- [Notifications](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/notifications/notifications.component.ts): `frontend/src/app/features/notifications/notifications.component.ts`

### League operations

- [Admin panel](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/features/admin/admin.component.ts): `frontend/src/app/features/admin/admin.component.ts`
- [Domain models](https://github.com/matifl3/lfmn/blob/main/frontend/src/app/core/models/models.ts): `frontend/src/app/core/models/models.ts`

### Other components

- **Driver**
- **League API**

## Connections

- Driver → App routes: opens (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Home: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Authentication: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Race browsing: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Race detail: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Championship standings: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Categories: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Setups: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Driver profiles: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → My profile: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Notifications: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Achievements: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Incidents and appeals: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → Admin panel: routes to (evidence: `frontend/src/app/app.routes.ts`)
- App routes → My championships: routes to (evidence: `frontend/src/app/app.routes.ts`)
- SPA shell → App routes: hosts (evidence: `frontend/src/app/app.ts`)
- Authentication → API client: requests login (evidence: `frontend/src/app/features/auth/auth.component.ts`)
- API client → League API: sends HTTP (evidence: `frontend/src/app/core/services/api.service.ts`)
- Incidents and appeals → API client: requests incident data (evidence: `frontend/src/app/features/incidents/incidents.component.ts`)
- My championships → API client: requests championship data (evidence: `frontend/src/app/features/my-championships/my-championships.component.ts`)
- Achievements → API client: uses API (evidence: `frontend/src/app/features/achievements/achievements.component.ts`)
- Admin panel → API client: uses API (evidence: `frontend/src/app/features/admin/admin.component.ts`)
- Race browsing → League API: supports race enrollment
- Race detail → League API: presents race results
- League API → Championship standings: provides standings
- League API → Incidents and appeals: supports stewarding
- League API → Setups: supports setup sharing
- League API → Achievements: awards achievements
- League API → Notifications: provides notifications
