# rovercode/rovercode-ui architecture

> Architecture diagram of the GitHub repository rovercode/rovercode-ui, 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/rovercode/rovercode-ui
- Repository: https://github.com/rovercode/rovercode-ui

## Overview

##### Main Architecture Components

a) Frontend Application Layer
- React Components (src/components)
- Containers (src/containers)
- State Management (Redux structure)
- UI/UX Elements

b) Integration Layer
- API Integration (utils/auth-api.js)
- Blockly Integration (utils/blockly-api.js)
- External Services Connection

c) Core Feature Modules
- Authentication System
- Rover Control System
- Course Management
- Program Management
- Subscription/Payment System

##### Component Organization

Create distinct sections showing:

a) User Interface Components
- Mission Control
- Course Management
- Program Management
- User Settings
- Authentication Views

b) State Management Flow
- Redux Store (from reducers/)
- Actions (from actions/)
- Reducers (from reducers/)

c) Block Programming System
- Blockly Integration
- Custom Blocks (from src/blocks/)
- Programming Interface

##### Specific Implementation Details

- Blue Rectangles: React Components
- Green Diamonds: Redux Actions/Reducers
- Yellow Hexagons: External API Connections
- Purple Circles: Rover Communication Points
- Orange Rectangles: Authentication Components

##### Data Flow Representation

**React App**
- Components Layer
- Presentation Components
- Container Components
- State Management Layer
- Redux Store
- Actions
- Reducers
- Integration Layer
- API Services
- Blockly Integration

##### Integration Points

Integration points with:
- Backend API (rovercode-web)
- Blockly Programming Interface
- Rover Hardware Communication
- Authentication Services

##### Development Tools Integration

Development support systems:
- Testing Framework (Jest)
- CI/CD Pipeline (.github/workflows)
- Build System (webpack)
- Internationalization (translations/)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Application"
        UI[React Application]
        
        subgraph "Core Components"
            RC["React Components"]:::component
            CC["Container Components"]:::container
            click RC "https://github.com/rovercode/rovercode-ui/tree/alpha/src/components/"
            click CC "https://github.com/rovercode/rovercode-ui/tree/alpha/src/containers/"
        end

        subgraph "State Management"
            RD["Redux Store"]:::redux
            ACT["Actions"]:::redux
            RED["Reducers"]:::redux
            click ACT "https://github.com/rovercode/rovercode-ui/tree/alpha/src/actions/"
            click RED "https://github.com/rovercode/rovercode-ui/tree/alpha/src/reducers/"
        end

        subgraph "Feature Modules"
            direction TB
            MC["Mission Control"]:::feature
            CM["Course Management"]:::feature
            PM["Program Management"]:::feature
            RC_SYS["Rover Control"]:::feature
            
            click MC "https://github.com/rovercode/rovercode-ui/blob/alpha/src/containers/MissionControl.js"
            click CM "https://github.com/rovercode/rovercode-ui/blob/alpha/src/components/Course.js"
            click PM "https://github.com/rovercode/rovercode-ui/blob/alpha/src/components/ProgramList.js"
            click RC_SYS "https://github.com/rovercode/rovercode-ui/blob/alpha/src/components/RoverConnection.js"
        end

        subgraph "Authentication"
            AUTH["Authentication System"]:::auth
            click AUTH "https://github.com/rovercode/rovercode-ui/tree/alpha/src/containers/Accounts/"
        end

        subgraph "Programming Interface"
            BLK["Block Definitions"]:::blockly
            BAPI["Blockly Integration"]:::blockly
            click BLK "https://github.com/rovercode/rovercode-ui/tree/alpha/src/blocks/"
            click BAPI "https://github.com/rovercode/rovercode-ui/blob/alpha/src/utils/blockly-api.js"
        end

        subgraph "Support Systems"
            I18N["Internationalization"]:::support
            THEME["Theme System"]:::support
            BUILD["Build System"]:::support
            CICD["CI/CD Pipeline"]:::support
            
            click I18N "https://github.com/rovercode/rovercode-ui/tree/alpha/src/translations/"
            click THEME "https://github.com/rovercode/rovercode-ui/tree/alpha/src/themes/"
            click BUILD "https://github.com/rovercode/rovercode-ui/blob/alpha/webpack.common.js"
            click CICD "https://github.com/rovercode/rovercode-ui/tree/alpha/.github/workflows/"
        end
    end

    %% Connections
    UI --> RC
    UI --> CC
    RC --> RD
    CC --> RD
    RD --> ACT
    ACT --> RED
    RED --> RD

    RC --> MC
    RC --> CM
    RC --> PM
    RC --> RC_SYS
    
    AUTH --> RD
    BLK --> BAPI
    BAPI --> RC_SYS

    %% Styles
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef container fill:#2ecc71,stroke:#27ae60,color:white
    classDef redux fill:#9b59b6,stroke:#8e44ad,color:white
    classDef feature fill:#e67e22,stroke:#d35400,color:white
    classDef auth fill:#e74c3c,stroke:#c0392b,color:white
    classDef blockly fill:#f1c40f,stroke:#f39c12,color:black
    classDef support fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        L1["React Components"]:::component
        L2["Containers"]:::container
        L3["Redux"]:::redux
        L4["Features"]:::feature
        L5["Authentication"]:::auth
        L6["Blockly"]:::blockly
        L7["Support Systems"]:::support
    end
```
