# 24heuresinsa/overrun-frontend architecture

> Architecture diagram of the GitHub repository 24heuresinsa/overrun-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/24heuresinsa/overrun-frontend
- Repository: https://github.com/24heuresinsa/overrun-frontend

## Overview

##### Project Type Analysis
This is a Vue.js-based admin dashboard application with TypeScript support, featuring user management, athlete tracking, race management, and payment processing capabilities.

##### Main Components

A. Client-Side Architecture (Primary Focus):
- Vue.js Frontend Application
- Vuex Store (State Management)
- Vue Router
- Axios HTTP Client

B. Core Feature Modules:
1. Authentication Module
2. Admin Management Module
3. Athletes Management Module
4. Race Management Module
5. Payment Processing Module
6. Certificate Management Module

**┌─────────────────────────────────────────────────────────┐**
- Vue.js Frontend                      │
- ┌─────────────┐  ┌─────────────┐  ┌─────────────┐     │
- TopBar    │  │   SideBar   │  │    Router   │     │
- ┘  └─────────────┘  └─────────────┘     │

- ┌─────────────────────────────────────────────────┐   │
- Main Content                    │   │
- ┌───────────┐ ┌───────────┐ ┌───────────┐     │   │
- Dashboard │ │  Athletes │ │   Races   │     │   │
- ┘ └───────────┘ └───────────┘     │   │

- ┌───────────┐ ┌───────────┐ ┌───────────┐     │   │
- Payments  │ │ Categories│ │Disciplines│     │   │
- ┘ └───────────┘ └───────────┘     │   │
- ┘   │

- ┌─────────────────────────────────────────────────┐   │
- Vuex Store                      │   │
- ┌───────────┐ ┌───────────┐ ┌───────────┐     │   │
- Auth    │ │ Editions  │ │Certificates│     │   │
- ┘ └───────────┘ └───────────┘     │   │
- ┘   │
- ┘

##### Connection Types
- Double lines: API communications

##### Key Elements to Highlight

a. Core Infrastructure:
- Vue Router configuration (src/router/index.ts)
- Vuex Store modules (src/store/modules/*)
- Axios HTTP client setup (src/axios.ts)

b. Feature Modules:
- Authentication (Login component and auth store module)
- Admin Management (AdminInvite and Admins views)
- Athletes Management (Athletes and AthleteDetails views)
- Race Management (Races and RaceDetails views)
- Payment Processing (Payments and PaymentDetails views)

c. Shared Components:
- Modal components (src/components/modals/*)
- Chart components (src/components/charts/*)
- Certificate handling (src/components/CertificateModal/*)

##### Implementation Notes

- Maintain a clear hierarchy of components
- Notes for important configuration files (tsconfig.json, vue.config.js)
- Relationship with the backend API (indicated by the axios.ts configuration)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        App["Vue.js App"]:::app
        Router["Vue Router"]:::core
        Store["Vuex Store"]:::core
        HTTP["Axios HTTP Client"]:::core

        subgraph Layout
            TopBar["TopBar"]:::layout
            SideBar["SideBar"]:::layout
        end

        subgraph "Main Content"
            direction TB
            Dashboard["Dashboard"]:::feature
            Athletes["Athletes Management"]:::feature
            Races["Race Management"]:::feature
            Payments["Payment Processing"]:::feature
            Admins["Admin Management"]:::feature
            Certificates["Certificate Management"]:::feature
        end

        subgraph "Store Modules"
            direction TB
            AuthStore["Auth Store"]:::store
            CertStore["Certificate Store"]:::store
        end

        subgraph "Components"
            direction TB
            RaceModals["Race Modals"]:::component
            AdminModals["Admin Modals"]:::component
            CertComponents["Certificate Components"]:::component
            Charts["Charts"]:::component
        end
    end

    App --> Router
    App --> Store
    App --> HTTP
    App --> TopBar
    App --> SideBar

    Router --> Dashboard
    Router --> Athletes
    Router --> Races
    Router --> Payments
    Router --> Admins
    Router --> Certificates

    Store --> AuthStore
    Store --> CertStore

    Races --> RaceModals
    Admins --> AdminModals
    Certificates --> CertComponents
    Dashboard --> Charts
    Payments --> Charts

    %% Click Events
    click App "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/App.vue"
    click Router "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/router/index.ts"
    click Store "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/store/index.ts"
    click HTTP "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/axios.ts"
    click TopBar "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/components/TopBar/TopBar.vue"
    click SideBar "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/components/SideBar/SideBar.vue"
    click Dashboard "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/views/dashboard/Dashboard.vue"
    click Athletes "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/views/athletes/Athletes.vue"
    click Races "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/views/races/Races.vue"
    click Payments "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/views/payments/Payments.vue"
    click Admins "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/views/admins/Admins.vue"
    click AuthStore "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/store/modules/auth.ts"
    click CertStore "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/store/modules/certificates.ts"
    click RaceModals "https://github.com/24HeuresINSA/OverRun-frontend/tree/main/src/components/modals/race"
    click AdminModals "https://github.com/24HeuresINSA/OverRun-frontend/blob/main/src/components/modals/CreateAdminInvite.vue"
    click CertComponents "https://github.com/24HeuresINSA/OverRun-frontend/tree/main/src/components/CertificateModal"
    click Charts "https://github.com/24HeuresINSA/OverRun-frontend/tree/main/src/components/charts"

    %% Styles
    classDef core fill:#2196F3,color:white
    classDef app fill:#1976D2,color:white
    classDef layout fill:#9E9E9E,color:white
    classDef feature fill:#4CAF50,color:white
    classDef store fill:#FF9800,color:white
    classDef component fill:#607D8B,color:white

    %% Legend
    subgraph Legend
        L1["Core Component"]:::core
        L2["App Component"]:::app
        L3["Layout Component"]:::layout
        L4["Feature Module"]:::feature
        L5["Store Module"]:::store
        L6["UI Component"]:::component
    end
```
