# alexcroox/battlebit-stats architecture

> Architecture diagram of the GitHub repository alexcroox/battlebit-stats, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexcroox/battlebit-stats
- Repository: https://github.com/alexcroox/battlebit-stats

## Overview

##### Main Components Identification

The system should be represented with these primary components:

a) Frontend Application (Nuxt.js Based)
- Static Content Management
- Interactive Features
- 3D Model Visualization
- Rendering System

b) Asset Processing Pipeline
- Tiling System
- 3D Model Processing
- Image Assets Management

**┌─ Frontend Layer ─────────────────────┐**
- ┌─ Pages ─────┐ ┌─ Components ────┐ │
- Maps      │ │ - ModelViewer   │ │
- Weapons   │ │ - Map           │ │
- Stats     │ │ - Navigation    │ │
- ┘ │ - Stats         │ │
- ┘ │
- Asset Processing Layer ───────────┤
- ┌─ Map Tiler ─┐ ┌─ Asset Store ─┐ │
- Raw Maps    │ │ - Weapons     │ │
- Processed   │ │ - Vehicles    │ │
- Maps        │ │ - Maps        │ │
- ┘ └──────────────┘ │
- ┘

##### Specific Implementation Details

- The Nuxt.js architecture (pages, components, layouts)
- The map tiling system's workflow
- The 3D model viewer's integration
- The relationship between configuration files (mapConfig.ts, weaponConfig.ts, vehicleConfig.ts) and their corresponding features

##### Data Flow Indicators

- How raw maps flow through the tiling system to the frontend
- How weapon models are loaded into the 3D viewer
- How configuration data is used throughout the application

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        Pages["Pages"]
        Components["Components"]
        Layout["Main Layout"]:::layout
        
        subgraph Pages
            Maps["Maps Page"]:::page
            Weapons["Weapons Page"]:::page
            Stats["Stats Page"]:::page
        end
        
        subgraph Components
            ModelViewer["3D Model Viewer"]:::component
            MapRenderer["Map Renderer"]:::component
            Navigation["Navigation"]:::component
            StatsViz["Stats Visualization"]:::component
            BaseUI["Base UI Components"]:::component
        end
    end
    
    subgraph "Asset Processing"
        MapTiler["Map Tiling System"]:::processing
        AssetStore["Asset Store"]:::storage
        
        subgraph "Configuration"
            MapConfig["Map Config"]:::config
            WeaponConfig["Weapon Config"]:::config
            VehicleConfig["Vehicle Config"]:::config
        end
        
        subgraph "Assets"
            WeaponModels["Weapon Models"]:::asset
            VehicleAssets["Vehicle Assets"]:::asset
            ClassAssets["Class Assets"]:::asset
            RankAssets["Rank Assets"]:::asset
        end
    end
    
    subgraph "Support Systems"
        Localization["Localization"]:::support
        Deployment["Deployment Pipeline"]:::support
    end
    
    MapTiler --> MapRenderer
    WeaponModels --> ModelViewer
    MapConfig --> MapRenderer
    WeaponConfig --> ModelViewer
    VehicleConfig --> Components
    AssetStore --> Components
    Components --> Pages
    Layout --> Pages
    
    %% Click Events
    click Pages "https://github.com/alexcroox/battlebit-stats/tree/main/src/pages"
    click MapRenderer "https://github.com/alexcroox/battlebit-stats/blob/main/src/components/mapping/map/Map.vue"
    click ModelViewer "https://github.com/alexcroox/battlebit-stats/blob/main/src/components/model-viewer/ModelViewer.vue"
    click Navigation "https://github.com/alexcroox/battlebit-stats/tree/main/src/components/navigation"
    click StatsViz "https://github.com/alexcroox/battlebit-stats/tree/main/src/components/stats"
    click MapTiler "https://github.com/alexcroox/battlebit-stats/tree/main/map-tiler/maps"
    click WeaponModels "https://github.com/alexcroox/battlebit-stats/tree/main/src/assets/images/weapons"
    click MapConfig "https://github.com/alexcroox/battlebit-stats/blob/main/src/lib/mapConfig.ts"
    click WeaponConfig "https://github.com/alexcroox/battlebit-stats/blob/main/src/lib/weaponConfig.ts"
    click VehicleConfig "https://github.com/alexcroox/battlebit-stats/blob/main/src/lib/vehicleConfig.ts"
    click Localization "https://github.com/alexcroox/battlebit-stats/tree/main/src/locales"
    click BaseUI "https://github.com/alexcroox/battlebit-stats/tree/main/src/components/base"
    click Layout "https://github.com/alexcroox/battlebit-stats/blob/main/src/layouts/default.vue"
    click VehicleAssets "https://github.com/alexcroox/battlebit-stats/tree/main/src/assets/images/vehicles"
    click ClassAssets "https://github.com/alexcroox/battlebit-stats/tree/main/src/assets/images/classes"
    click RankAssets "https://github.com/alexcroox/battlebit-stats/tree/main/src/assets/images/ranks"
    click Deployment "https://github.com/alexcroox/battlebit-stats/blob/main/.github/workflows/deploy.yml"
    
    %% Styling
    classDef page fill:#6495ED,stroke:#333,stroke-width:2px
    classDef component fill:#4169E1,stroke:#333,stroke-width:2px
    classDef processing fill:#32CD32,stroke:#333,stroke-width:2px
    classDef storage fill:#DEB887,stroke:#333,stroke-width:2px
    classDef config fill:#9370DB,stroke:#333,stroke-width:2px
    classDef asset fill:#F4A460,stroke:#333,stroke-width:2px
    classDef support fill:#20B2AA,stroke:#333,stroke-width:2px
    classDef layout fill:#4682B4,stroke:#333,stroke-width:2px
```
