# windowsplus79/25vibecoding0 architecture

> Architecture diagram of the GitHub repository windowsplus79/25vibecoding0, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/windowsplus79/25vibecoding0
- Repository: https://github.com/windowsplus79/25vibecoding0

## Overview

##### File structure
- Top level:
- main.py – the single entry point combining UI (Streamlit) and algorithm logic
- requirements.txt – lists Streamlit and any other Python dependencies
- README.md/.gitignore – documentation and VCS ignores
- No separate “frontend” and “backend” folders: the UI and business logic live in the same script. There is no persistent database or external microservice.

##### Read key README insights
- Streamlit handles the HTTP/WebSocket server and UI rendering
- Users choose parameters in a sidebar, click “sort” or “new array,” and see an animated bar chart
- Core functional modules: array generator, algorithm implementations, visualization/animation controller, speed/timer logic

##### Final advice
- Be exhaustive in splitting main.py into logical sub-components, even though it’s one file
- Real-time, event-driven nature of Streamlit (i.e., widget change → rerun → UI update)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Browser (Client)"]:::external

    subgraph "Streamlit App"
        SSR["Streamlit Server"]:::module
        UI["UI Layer (sidebar & chart)"]:::module
        Ctrl["Controller / Event Loop"]:::module
        Engine["Algorithm Engine"]:::module
        Scheduler["Animation Scheduler / Timer"]:::module
        Generator["Array Generator"]:::module
        Tracker["Performance Tracker"]:::module
    end

    Browser <--->|"HTTP/WebSocket"| UI
    SSR -->|"serves UI"| UI
    UI -->|"widget_event"| Ctrl
    Ctrl -->|"sort_parameters"| Engine
    Engine -->|"next_state"| Scheduler
    Scheduler -->|"update_chart"| UI
    Engine -->|"execution_timing"| Tracker
    Tracker -->|"display_time"| UI

    Deps["requirements.txt"]:::module
    Docs["README.md"]:::external
    GI[".gitignore"]:::external

    SSR -->|"loads dependencies"| Deps
    SSR -->|"refs documentation"| Docs
    SSR -->|"uses ignore rules"| GI

    click SSR "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click UI "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Ctrl "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Engine "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Scheduler "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Generator "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Tracker "https://github.com/windowsplus79/25vibecoding0/blob/main/main.py"
    click Deps "https://github.com/windowsplus79/25vibecoding0/blob/main/requirements.txt"
    click Docs "https://github.com/windowsplus79/25vibecoding0/blob/main/README.md"
    click GI "https://github.com/windowsplus79/25vibecoding0/blob/main/.gitignore"

    classDef external fill:#BBDEFB,stroke:#000,stroke-width:1px
    classDef module fill:#C8E6C9,stroke:#000,stroke-width:1px

    linkStyle 0,1,2,3,4,5,6,7,8,9,10 stroke:#FFA500,stroke-width:2px
```
