# menchelab/datadivr_webapp architecture

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

- Interactive diagram: https://gitdiagram.com/menchelab/datadivr_webapp
- Repository: https://github.com/menchelab/datadivr_webapp

## Overview

- Client → Flask Server → Data Processing → Storage
- Storage → Flask Server → WebSocket → VR Clients
- Upload Interface → Data Processing → Project Storage

- WebSocket Server ⟷ VR Clients
- Event Handler ⟷ Client Interfaces

##### Key Integration Points

- Socket.IO integration with Flask
- Extension system hookpoints
- Event handler system connections
- Data format conversion pipeline

##### Technical Details

- Python 3.9 requirement
- Port configurations (5000/3000)
- SteamVR integration point
- Browser compatibility (Chrome/Firefox)
- WebGL preview capability

##### Important Notes

- Texture-based data storage system
- Multiplayer game server aspect
- Relationship between the web interface and VR clients
- Where performance optimizations occur

- Server-side components
- Client interfaces
- Data processing pipeline
- Storage systems
- Extension framework
- Real-time communication layer

This structure will effectively communicate the complex architecture while maintaining clarity about how the different components interact to deliver the core functionality of serving network data to VR clients.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Server Layer"]
        FS["Flask Server"]:::server
        WS["WebSocket Server"]:::server
        EH["Event Handler System"]:::server
        SFS["Static File Server"]:::server
    end

    subgraph Processing["Data Processing Layer"]
        PM["Project Manager"]:::processing
        UH["Upload Handlers"]:::processing
        DC["Data Converters"]:::processing
        AM["Analytics Module"]:::processing
        LM["Layout Module"]:::processing
    end

    subgraph Extensions["Extension System"]
        EL["Extension Loader"]:::extension
        DE["Documentation Extension"]:::extension
        SR["Whisper Speech Recognition"]:::extension
    end

    subgraph Clients["Client Interfaces"]
        WUI["Web UI"]:::client
        VRC["VR Client Interface"]:::client
        WGL["WebGL Preview"]:::client
        SIC["Socket.IO Client"]:::client
    end

    subgraph Storage["Storage Layer"]
        PFS["Project Files Storage"]:::storage
        SA["Static Assets"]:::storage
        CF["Configuration Files"]:::storage
        EF["Example Files"]:::storage
    end

    subgraph EventHandlers["Event Handler Components"]
        AE["Analytics Events"]:::event
        ANE["Annotation Events"]:::event
        LE["Layout Events"]:::event
    end

    subgraph ClientUI["Client UI Components"]
        MCU["MC UI Elements"]:::ui
        UUI["Upload UI"]:::ui
        CWU["Connect WebUI"]:::ui
    end

    %% Core Connections
    FS --> WS
    FS --> EH
    FS --> SFS
    WS <-.-> VRC
    EH --> EventHandlers

    %% Processing Connections
    PM --> PFS
    UH --> PM
    DC --> PM
    AM --> PM
    LM --> PM

    %% Extension Connections
    EL --> DE
    EL --> SR
    EL --> FS

    %% Client Connections
    WUI --> FS
    WGL --> SIC
    SIC --> WS

    %% Storage Connections
    PFS --> SFS
    SA --> SFS
    CF --> FS
    EF --> WUI

    %% Event Handler Connections
    AE --> AM
    ANE --> PM
    LE --> LM

    %% Client UI Connections
    MCU --> WUI
    UUI --> UH
    CWU --> WS

    %% Styles
    classDef server fill:#2374ab
    classDef processing fill:#57b894
    classDef extension fill:#9b5de5
    classDef client fill:#f15bb5
    classDef storage fill:#808080
    classDef event fill:#fee440
    classDef ui fill:#00bbf9

    %% Click Events
    click FS "https://github.com/menchelab/datadivr_webapp/blob/developer/app.py"
    click WS "https://github.com/menchelab/datadivr_webapp/blob/developer/websocket_functions.py"
    click EH "https://github.com/menchelab/datadivr_webapp/tree/developer/event_handler/"
    click SFS "https://github.com/menchelab/datadivr_webapp/tree/developer/static/"
    click PM "https://github.com/menchelab/datadivr_webapp/blob/developer/project.py"
    click UH "https://github.com/menchelab/datadivr_webapp/blob/developer/uploader.py"
    click DC "https://github.com/menchelab/datadivr_webapp/tree/developer/python_tools/"
    click AM "https://github.com/menchelab/datadivr_webapp/blob/developer/analytics.py"
    click DE "https://github.com/menchelab/datadivr_webapp/tree/developer/extensions/documentation/"
    click SR "https://github.com/menchelab/datadivr_webapp/tree/developer/extensions/whisperSpeechRecognition/"
    click EL "https://github.com/menchelab/datadivr_webapp/blob/developer/extensions/load_extensions.py"
    click WUI "https://github.com/menchelab/datadivr_webapp/tree/developer/templates/"
    click WGL "https://github.com/menchelab/datadivr_webapp/blob/developer/static/js/webGL_preview.js"
    click SIC "https://github.com/menchelab/datadivr_webapp/tree/developer/static/socket.io/"
    click PFS "https://github.com/menchelab/datadivr_webapp/tree/developer/static/demo_project/"
    click EF "https://github.com/menchelab/datadivr_webapp/tree/developer/static/examplefiles/"
    click LM "https://github.com/menchelab/datadivr_webapp/blob/developer/layout_module.py"
    click AE "https://github.com/menchelab/datadivr_webapp/blob/developer/event_handler/execute_events/analytics_events.py"
    click ANE "https://github.com/menchelab/datadivr_webapp/blob/developer/event_handler/execute_events/annotation_events.py"
    click LE "https://github.com/menchelab/datadivr_webapp/blob/developer/event_handler/execute_events/layout_events.py"
    click MCU "https://github.com/menchelab/datadivr_webapp/blob/developer/static/js/mc_UI_Elements.js"
    click UUI "https://github.com/menchelab/datadivr_webapp/blob/developer/static/js/upload_UI.js"
    click CWU "https://github.com/menchelab/datadivr_webapp/blob/developer/static/js/connect_WebUI.js"
```
