# quarbby/london-git architecture

> Architecture diagram of the GitHub repository quarbby/london-git, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/quarbby/london-git
- Repository: https://github.com/quarbby/london-git

## Overview

##### Project Type and Purpose
- This is an open-source “visualization tool” that encodes the London Tube map as a Git commit/branch/merge graph.
- The core purpose is to run a shell script (london.sh) that emits Git commits in such a way that GitHub’s network view renders a stylized tube map.

##### File Structure Analysis
- Top level:
- README.md – project description and usage instructions
- london.sh – the only executable generator
- There is no separate frontend/backend directory structure. The entire logic lives in a single script.
- There are no build scripts, dependency files, or configuration beyond what’s in london.sh and Git itself.

##### README Insights
- The script generates commits and branches to represent individual lines and stations.
- Users run “./london.sh” locally, which creates commits in the local Git repo, and then they can view it in GitHub’s network graph.
- The project is inspired by similar “MetroGit” efforts.

a. Main Components
- Generator Script (london.sh)
- Local Git Repository (data store of commits/branches)
- Git Remote (GitHub)
- Visualizer (GitHub Network View UI)
- (Optional) Static assets folder (e.g., img/ for reference images)
b. Relationships & Interactions
1. Developer runs london.sh
2. Script writes commits and branches into the local Git repo
3. User pushes to GitHub remote
4. GitHub processes repository metadata and exposes the network graph
5. User opens GitHub Network View to see tube-map representation
c. Architectural Patterns and Principles
– Single-responsibility: The script solely handles mapping geometry → Git operations.
– Infrastructure-as-data: Using Git itself as the visualization medium.
– Minimal external dependencies: relies only on a POSIX shell and git CLI.
d. Key Technologies
– Bash (or sh) scripting
– Git CLI (commit, branch, push)
– GitHub Network Graph visualizer (web UI)
– (Optional) static image assets in img/ if expanded

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer"]:::external
    Doc["README.md"]:::assets
    subgraph "Generator Script" 
        Script["london.sh"]:::script
        subgraph "Internal Modules"
            DataDef["Data Definition"]:::script
            GitOps["Git Operations"]:::script
        end
    end
    Repo[(Local Git Repository)]:::repo
    Cloud((GitHub Remote)):::external
    UI[[GitHub Network View UI]]:::ui
    Assets["img/ (Static Assets)"]:::assets

    Developer -->|"reads"| Doc
    Developer -->|"run ./london.sh"| Script
    Script -->|"commit & branch"| Repo
    Repo -->|"push"| Cloud
    Cloud -->|"render graph"| UI
    Developer -->|"view UI"| UI
    Script -->|"optional reference"| Assets

    click Script "https://github.com/quarbby/london-git/blob/master/london.sh"
    click Doc "https://github.com/quarbby/london-git/blob/master/README.md"

    classDef script fill:#f9f,stroke:#333,stroke-width:2px
    classDef repo fill:#ccf,stroke:#333,stroke-width:2px
    classDef external fill:#cfc,stroke:#333,stroke-width:2px
    classDef ui fill:#fcf,stroke:#333,stroke-width:2px
    classDef assets fill:#ffc,stroke:#333,stroke-width:2px
```
