# aurorateam/auroralauncher architecture

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

- Interactive diagram: https://gitdiagram.com/aurorateam/auroralauncher
- Repository: https://github.com/aurorateam/auroralauncher

## Overview

##### Main Components Identification
The system consists of five main packages:
- API Package (Client-Server Communication)
- Core Package (Shared Code)
- ESBuild Decorators (Build Tool Plugin)
- Launcher (Client Application)
- Server (Backend Service)

**Client Layer**
- ↓
**API Layer**
- ↓
**Server Layer**
- ↓
**Core Services Layer**

##### Component Relationships

- Launcher ←→ API (WebSocket & HTTP communication)
- API ←→ Server (Request handling)
- Server → Core (Utility functions)
- Server Components (Internal connections):
- WebServer ←→ Auth Manager
- WebSocket ←→ Clients Manager
- Auth Manager ←→ Profile Manager
- Download Manager ←→ Update Manager

##### Specific Implementation Details

- Blue rectangles: Core components
- Green hexagons: API endpoints
- Yellow diamonds: Managers
- Red circles: Authentication components
- Purple rectangles: External services

##### Important Subsystems to Highlight

Authentication System:
- Multiple auth providers (Accept, Database, JSON, etc.)
- Session management
- Profile handling

API Layer:
- WebServer endpoints
- WebSocket connections
- Request/Response handling

Download System:
- Multiple download managers (Fabric, Mojang, Quilt)
- Update management
- Profile synchronization

##### Technical Details

Annotations for:
- TypeScript usage throughout the project
- ESBuild integration
- Configuration file formats
- Storage mechanisms
- Authentication flows

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        LI[Launcher Interface]
        AC["API Client"]:::api
        CU["Core Utilities"]:::core
    end

    subgraph API
        WS["WebSocket Server"]:::api
        WEB["Web Server"]:::api
        EP["API Endpoints"]:::api
    end

    subgraph Server
        MS["Main Server"]:::server
        CM["Clients Manager"]:::manager
        AM["Auth Manager"]:::auth
        PM["Profile Manager"]:::manager
        DM["Download Manager"]:::manager
        UM["Update Manager"]:::manager
        CoM["Command Manager"]:::manager
        LM["Language Manager"]:::manager
        CFM["Config Manager"]:::manager
    end

    subgraph Auth_Providers
        AP["Auth Providers"]:::auth
        direction TB
        AP1["Accept"]:::auth
        AP2["Database"]:::auth
        AP3["JSON"]:::auth
        AP --> AP1 & AP2 & AP3
    end

    subgraph Download_System
        DMS["Download Managers"]:::manager
        direction TB
        DM1["Fabric"]:::manager
        DM2["Mojang"]:::manager
        DM3["Quilt"]:::manager
        DMS --> DM1 & DM2 & DM3
    end

    %% Connections
    LI <--> AC
    AC <--> WS & WEB
    WS & WEB --> MS
    MS --> CM & AM & PM & DM & UM & CoM & LM & CFM
    AM <--> AP
    DM <--> DMS
    PM <--> AM
    UM <--> DM

    %% Click Events
    click AC "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/api/src/classes/AuroraAPI.ts"
    click CU "https://github.com/AuroraTeam/AuroraLauncher/tree/master/packages/core/src"
    click WEB "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/api/webserver/WebServerManager.ts"
    click WS "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/api/websocket/WebManager.ts"
    click AM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/auth/AuthManager.ts"
    click PM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/profiles/ProfilesManager.ts"
    click DM "https://github.com/AuroraTeam/AuroraLauncher/tree/master/packages/server/src/components/download/DownloadManagers"
    click UM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/update/UpdateManager.ts"
    click CoM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/commands/CommandsManager.ts"
    click LM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/langs/LangManager.ts"
    click CFM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/config/ConfigManager.ts"
    click CM "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/components/clients/ClientsManager.ts"
    click MS "https://github.com/AuroraTeam/AuroraLauncher/blob/master/packages/server/src/LauncherServer.ts"
    click AP "https://github.com/AuroraTeam/AuroraLauncher/tree/master/packages/server/src/components/auth/providers"
    click DMS "https://github.com/AuroraTeam/AuroraLauncher/tree/master/packages/server/src/components/download/DownloadManagers"

    %% Styles
    classDef default fill:#fff,stroke:#333,stroke-width:2px
    classDef api fill:#90EE90,stroke:#333
    classDef core fill:#ADD8E6,stroke:#333
    classDef server fill:#FFB6C1,stroke:#333
    classDef manager fill:#FFD700,stroke:#333
    classDef auth fill:#FF6B6B,stroke:#333

    %% Legend
    subgraph Legend
        L1[API Component]:::api
        L2[Core Component]:::core
        L3[Server Component]:::server
        L4[Manager Component]:::manager
        L5[Auth Component]:::auth
    end
```
