# efekurbann/limbosecure architecture

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

- Interactive diagram: https://gitdiagram.com/efekurbann/limbosecure
- Repository: https://github.com/efekurbann/limbosecure

## Overview

##### Main Components Identification

a) Platform Implementations:
- BungeeCord Platform
- Velocity Platform
- Spigot Platform
- Discord Bot Platform

b) Shared Components:
- Backend Services
- Two-Factor Authentication System
- Logging System

**┌─────────────────────────────────────────────┐**
- Client Layer                    │
- (Minecraft Players / Discord Users)         │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Platform Layer                     │
- ┌─────────┐ ┌─────────┐ ┌─────────┐        │
- BungeeCord│ │Velocity │ │Spigot   │        │
- ┘ └─────────┘ └─────────┘        │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Integration Layer                  │
- ┌─────────────┐        ┌────────────┐      │
- Discord Bot   │←------>│LimboSecure │      │
- Platform      │        │Core        │      │
- ┘        └────────────┘      │
- ┘
- ↕
**┌─────────────────────────────────────────────┐**
- Service Layer                      │
- ┌─────────┐ ┌─────────┐ ┌─────────────┐    │
- 2FA      │ │Backend  │ │Verification │    │
- Manager  │ │Services │ │System       │    │
- ┘ └─────────┘ └─────────────┘    │
- ┘

##### Component Relationships

- Bidirectional communication between platforms and core
- Data flow from clients to verification system
- Integration between Discord bot and core system
- Service interactions with verification sessions

##### Important Details

Annotations for:
- Rate limits (5 or 25 verifications per 30 minutes)
- Supported languages (EN, ES, TR)
- Plugin message channels
- Security session handlers

##### Technical Specifications

- Configuration management
- Logging system integration
- Permission systems (LuckPerms integration)
- Message handling system

##### Implementation Notes

- The modular nature of the platform implementations
- Centralized security handling
- Discord bot integration points
- Session management flow

## Diagram (Mermaid)

```mermaid
graph TB
    %% Client Layer
    subgraph Clients
        MC[Minecraft Players]
        DC[Discord Users]
    end

    %% Platform Layer
    subgraph Platforms
        BC["BungeeCord Platform"]:::platform
        VC["Velocity Platform"]:::platform
        SP["Spigot Platform"]:::platform
    end

    %% Integration Layer
    subgraph Integration
        DBot["Discord Bot Platform"]:::integration
        Core["LimboSecure Core"]:::core
    end

    %% Service Layer
    subgraph Services
        TFA["2FA Manager"]:::service
        Backend["Backend Services"]:::service
        Logger["Logging System"]:::service
    end

    %% Session Handlers
    subgraph "Security Sessions"
        BSH["BungeeCord Session Handler"]:::handler
        VSH["Velocity Session Handler"]:::handler
    end

    %% Message System
    subgraph "Plugin Messages"
        BPM["BungeeCord Message Listener"]:::messaging
        VPM["Velocity Message Listener"]:::messaging
    end

    %% Relationships
    MC --> BC & VC & SP
    DC --> DBot
    BC & VC & SP --> Core
    DBot <--> Core
    Core --> TFA
    Core --> Backend
    Core --> Logger
    BC --> BSH
    VC --> VSH
    BC --> BPM
    VC --> VPM

    %% Click Events
    click BC "https://github.com/efekurbann/LimboSecure/blob/master/platform-bungeecord/src/main/java/com/thoxia/limbosecure/bungee/LimboSecureBungee.java"
    click VC "https://github.com/efekurbann/LimboSecure/blob/master/platform-velocity/src/main/java/com/thoxia/limbosecure/velocity/LimboSecureVelocity.java"
    click SP "https://github.com/efekurbann/LimboSecure/blob/master/platform-spigot/src/main/java/com/thoxia/limbosecure/spigot/LimboSecureSpigot.java"
    click DBot "https://github.com/efekurbann/LimboSecure/blob/master/platform-bot/src/main/java/com/thoxia/limbosecure/bot/Bot.java"
    click TFA "https://github.com/efekurbann/LimboSecure/blob/master/src/main/java/com/thoxia/limbosecure/twofa/TwoFAManager.java"
    click Backend "https://github.com/efekurbann/LimboSecure/blob/master/src/main/java/com/thoxia/limbosecure/backend/RequestHandler.java"
    click Logger "https://github.com/efekurbann/LimboSecure/blob/master/src/main/java/com/thoxia/limbosecure/logging/Logger.java"
    click BSH "https://github.com/efekurbann/LimboSecure/blob/master/platform-bungeecord/src/main/java/com/thoxia/limbosecure/bungee/session/BungeeSecureHandler.java"
    click VSH "https://github.com/efekurbann/LimboSecure/blob/master/platform-velocity/src/main/java/com/thoxia/limbosecure/velocity/session/SecureHandler.java"
    click BPM "https://github.com/efekurbann/LimboSecure/blob/master/platform-bungeecord/src/main/java/com/thoxia/limbosecure/bungee/listener/PluginMessageListener.java"
    click VPM "https://github.com/efekurbann/LimboSecure/blob/master/platform-velocity/src/main/java/com/thoxia/limbosecure/velocity/listener/PluginMessageListener.java"
    click Core "https://github.com/efekurbann/LimboSecure/blob/master/src/main/java/com/thoxia/limbosecure/SecurePlugin.java"

    %% Styles
    classDef platform fill:#3498db,stroke:#2980b9,color:white
    classDef integration fill:#2ecc71,stroke:#27ae60,color:white
    classDef service fill:#e67e22,stroke:#d35400,color:white
    classDef handler fill:#9b59b6,stroke:#8e44ad,color:white
    classDef messaging fill:#f1c40f,stroke:#f39c12,color:black
    classDef core fill:#e74c3c,stroke:#c0392b,color:white

    %% Notes
    subgraph Legend
        L1[Platform Components]:::platform
        L2[Integration Components]:::integration
        L3[Service Components]:::service
        L4[Session Handlers]:::handler
        L5[Message System]:::messaging
        L6[Core System]:::core
    end
```
