# paddockbux/novacolumn-webui architecture

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

## Overview

##### Main Components

a) Frontend Layer:
- Static Web Interface (HTML/CSS)
- Assets (styles and media)
- Client-side JavaScript

b) Backend Layer:
- Python API Server
- Database Connection Handler

c) External Components:
- NovaColumn Database (MySQL/MariaDB based on the port)
- Web Server (Apache/Nginx as mentioned in prerequisites)

**[Client Layer]**
- Web Browser
- Static Assets (CSS/Audio)

**[Web Server Layer (Apache/Nginx)]**
- Static File Serving
- Proxy to API

**[Application Layer]**
- Python API Server (api.py)
- Database Connection Manager

**[Data Layer]**
- NovaColumn Database

##### Key Relationships to Highlight

- API calls from frontend to Python backend (especially the fetch URL mentioned in setup)
- Database connections from Python API to NovaColumn database
- Port configurations (default 8080 for API, 3306 for database)

##### Important Details

- Port configurations
- Database credentials flow
- API endpoints
- Static asset serving paths

##### Specific Implementation Notes

- The separation between static content and API server
- The database connection configuration
- The role of the web server in serving static content and proxying API requests

##### Technical Stack Indicators

- Python 3.8+
- MySQL/MariaDB
- HTML/CSS/JavaScript
- Apache/Nginx

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client["Client Layer"]
        Browser["Web Browser"]
        StaticAssets["Static Assets"]:::frontend
    end

    subgraph WebServer["Web Server Layer"]
        Nginx["Apache/Nginx Proxy"]
        StaticServe["Static File Server"]:::frontend
    end

    subgraph AppLayer["Application Layer"]
        API["Python API Server"]:::backend
        DBManager["Database Connection Manager"]:::backend
    end

    subgraph DataLayer["Data Layer"]
        NovaDB["NovaColumn Database"]:::database
    end

    %% Relationships
    Browser --> Nginx
    Nginx --> StaticServe
    Nginx --> API
    API --> DBManager
    DBManager --> NovaDB

    %% Static Asset Details
    StaticAssets --> |"HTML"| MainPage["Main Page"]:::frontend
    StaticAssets --> |"HTML"| AboutPage["About Page"]:::frontend
    StaticAssets --> |"HTML"| BlogPage["Blog Page"]:::frontend
    StaticAssets --> |"CSS"| Styles["Style Sheets"]:::frontend
    StaticAssets --> |"Media"| Media["Audio Files"]:::frontend

    %% Port Configurations
    API -.- APIPort["Port: 8080"]
    NovaDB -.- DBPort["Port: 3306"]

    %% Click Events
    click MainPage "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/index.html"
    click AboutPage "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/about/index.html"
    click BlogPage "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/brog.html"
    click Styles "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/assets/style.css"
    click Media "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/assets/click.ogg"
    click API "https://github.com/PaddockBux/NovaColumn-WebUI/blob/main/api.py"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#f1c40f,stroke:#f39c12,color:black
    
    %% Legend
    subgraph Legend
        Frontend["Frontend Component"]:::frontend
        Backend["Backend Component"]:::backend
        Database["Database Component"]:::database
    end
```
