# linehaul-ai/streamlit-network architecture

> Architecture diagram of the GitHub repository linehaul-ai/streamlit-network, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/linehaul-ai/streamlit-network
- Repository: https://github.com/linehaul-ai/streamlit-network

## Overview

##### Project type and purpose
- This is a single‐page, data‐visualization dashboard built with Streamlit (a Python framework).
- Its purpose is to render an interactive map of freight lanes and drop trailer markets, powered by Pandas‐processed data and Plotly visuals, optionally fetching network data from the Linehaul.ai API.

##### File structure
- Top‐level files:
- Dockerfile & .dockerignore – containerization setup
- requirements.txt – Python dependencies (Streamlit, Pandas, Plotly…)
- app.py (here named app1.py) – the main Streamlit application entry point
- README.md – project overview and run instructions
- No dedicated “backend” or “database” folders: the app is monolithic.
- __pycache__ indicates compiled Python modules; .vscode holds IDE settings.

##### README for additional insights
- Confirms use of Python 3.8+, Streamlit as server & UI, Pandas for data manipulation, Plotly for rendering.
- Describes key features: interactive map, city‐based lane highlighting, dark‐mode styling.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Actor
    Browser["Client Browser (HTTP :8501)"]:::external

    %% Infrastructure Layer
    subgraph "Container Host"
        direction TB
        Dockerfile["Dockerfile"]:::infra
        Dockerignore[".dockerignore"]:::infra
        Requirements["requirements.txt"]:::infra
        README["README.md"]:::infra
        VSCode[".vscode"]:::infra
    end

    %% Application Container
    subgraph "Docker Container" 
        direction TB
        StreamlitServer["Streamlit Web Server"]:::compute
        subgraph "Streamlit Application"
            direction TB
            DataIngestion["Data Ingestion Module"]:::compute
            APIIntegration["External Data Integration"]:::compute
            DataTransformation["Data Processing Module"]:::compute
            DataPresentation["Visualization Layer (Plotly)"]:::viz
        end
    end

    %% External Data Sources
    ExternalAPI["Linehaul.ai API"]:::external
    LocalFiles["Local CSV/JSON Files"]:::external

    %% Connections
    Browser -->|"HTTP Request"| StreamlitServer
    StreamlitServer --> DataIngestion
    DataIngestion --> DataTransformation
    DataTransformation --> DataPresentation
    DataPresentation -->|"Rendered UI (HTML/CSS/JS)"| Browser
    DataIngestion --> APIIntegration
    APIIntegration --> ExternalAPI
    DataIngestion --> LocalFiles

    %% Click Events
    click StreamlitServer "https://github.com/linehaul-ai/streamlit-network/blob/master/app1.py"
    click DataIngestion "https://github.com/linehaul-ai/streamlit-network/blob/master/app1.py"
    click DataTransformation "https://github.com/linehaul-ai/streamlit-network/blob/master/app1.py"
    click DataPresentation "https://github.com/linehaul-ai/streamlit-network/blob/master/app1.py"
    click APIIntegration "https://github.com/linehaul-ai/streamlit-network/blob/master/app1.py"
    click Dockerfile "https://github.com/linehaul-ai/streamlit-network/tree/master/Dockerfile"
    click Dockerignore "https://github.com/linehaul-ai/streamlit-network/blob/master/.dockerignore"
    click Requirements "https://github.com/linehaul-ai/streamlit-network/blob/master/requirements.txt"
    click README "https://github.com/linehaul-ai/streamlit-network/blob/master/README.md"
    click VSCode "https://github.com/linehaul-ai/streamlit-network/blob/master/.vscode"

    %% Styles
    classDef compute fill:#add8e6,stroke:#333,stroke-width:1px
    classDef viz fill:#90ee90,stroke:#333,stroke-width:1px
    classDef infra fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef external fill:#ffa500,stroke:#333,stroke-width:1px
```
