# aurelienverbeke/visu-mf architecture

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

- Interactive diagram: https://gitdiagram.com/aurelienverbeke/visu-mf
- Repository: https://github.com/aurelienverbeke/visu-mf

## Overview

##### Main Components

a) Data Processing Layer (C++ Backend)
- BUFR Decoder component (src/decodeur_bufr.cpp)
- Data management component (src/gestion_mf.py)
- Configuration and reference data storage (lib/ directory)

b) Web Application Layer (Node.js)
- Express.js web server
- Routes handling (www/routes/)
- View templates (www/views/)
- Static assets (www/public/)

c) Client-Side Components
- Browser-based visualization
- Mobile-specific interface
- Bundle systems for different views

##### Data Flow
- BUFR Data Input → C++ Decoder → Processed Data
- Processed Data → Node.js Server → Client Browser

##### Reference Data Flow
- BUFR Tables (lib/tables_bufr/) → Decoder
- Configuration Files → Application Components

##### Specific Elements

Use these visual elements:

- Blue: Data processing components
- Green: Web server components
- Orange: Client-side components
- Gray: Configuration and reference data

##### Architectural Patterns to Highlight

- Three-tier architecture:
- Data Processing (C++/Python)
- Application Server (Node.js)
- Client (Browser)

- MVC pattern in the web application:
- Models (data handling)
- Views (Pug templates)
- Controllers (routes)

##### Technical Details to Note

Technologies:
- C++ for BUFR decoding
- Python for data management
- Node.js/Express for web server
- Pug templating engine
- OpenCV integration (from README dependencies)

##### Security Layer

SSL/TLS implementation:
- Certificate handling (serveur.crt, serveur.key)
- HTTPS connections

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Input
        BUFR[BUFR Data Input]
    end

    subgraph "Data Processing Layer"
        Decoder["BUFR Decoder"]:::cpp
        DataMgmt["Data Management"]:::python
        RefData["Reference Data"]:::data
        BUFRTables["BUFR Tables"]:::data
        Config["Configuration Files"]:::data
    end

    subgraph "Web Application Layer"
        WebServer["Express.js Server"]:::node
        Routes["Route Handlers"]:::node
        Views["View Templates"]:::view
        Assets["Static Assets"]:::static
        Certs["SSL Certificates"]:::security
    end

    subgraph "Client Layer"
        Browser["Browser Visualization"]:::client
        Mobile["Mobile Interface"]:::client
        ClientBundles["Client Bundles"]:::client
        Styles["Stylesheets"]:::client
    end

    %% Data Flow Relationships
    BUFR --> Decoder
    BUFRTables --> Decoder
    Config --> Decoder
    Decoder --> DataMgmt
    DataMgmt --> WebServer
    WebServer --> Routes
    Routes --> Views
    Views --> Browser
    Views --> Mobile
    Assets --> Browser
    Assets --> Mobile
    Styles --> Browser
    Styles --> Mobile
    ClientBundles --> Browser
    ClientBundles --> Mobile
    Certs --> WebServer

    %% Click Events
    click Decoder "https://github.com/aurelienverbeke/visu-mf/blob/main/src/decodeur_bufr.cpp"
    click DataMgmt "https://github.com/aurelienverbeke/visu-mf/blob/main/src/gestion_mf.py"
    click BUFRTables "https://github.com/aurelienverbeke/visu-mf/tree/main/lib/tables_bufr/"
    click WebServer "https://github.com/aurelienverbeke/visu-mf/blob/main/www/app.js"
    click Routes "https://github.com/aurelienverbeke/visu-mf/tree/main/www/routes/"
    click Views "https://github.com/aurelienverbeke/visu-mf/tree/main/www/views/"
    click Assets "https://github.com/aurelienverbeke/visu-mf/tree/main/www/public/"
    click Mobile "https://github.com/aurelienverbeke/visu-mf/tree/main/www/views/mobile/"
    click ClientBundles "https://github.com/aurelienverbeke/visu-mf/blob/main/www/pour_bundle_client_mosa.js"
    click Certs "https://github.com/aurelienverbeke/visu-mf/blob/main/www/serveur.crt"
    click Config "https://github.com/aurelienverbeke/visu-mf/blob/main/lib/echelles.json"
    click Styles "https://github.com/aurelienverbeke/visu-mf/blob/main/www/public/stylesheets/style.css"

    %% Styling
    classDef cpp fill:#6699cc,stroke:#333,stroke-width:2px
    classDef python fill:#4584b6,stroke:#333,stroke-width:2px
    classDef node fill:#68a063,stroke:#333,stroke-width:2px
    classDef data fill:#cccccc,stroke:#333,stroke-width:2px
    classDef view fill:#f4bf75,stroke:#333,stroke-width:2px
    classDef static fill:#a1b56c,stroke:#333,stroke-width:2px
    classDef client fill:#f7ca88,stroke:#333,stroke-width:2px
    classDef security fill:#ab4642,stroke:#333,stroke-width:2px
```
