# aekasu/goldberg-tarjan architecture

> Architecture diagram of the GitHub repository aekasu/goldberg-tarjan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aekasu/goldberg-tarjan
- Repository: https://github.com/aekasu/goldberg-tarjan

## Overview

This React application lets users generate a flow network and inspect Goldberg–Tarjan Push–Relabel execution, either automatically or one step at a time. Its main runtime is concentrated in `src/PushRelabelViz.jsx`, which contains graph generation, algorithm state and logic, playback controls, visualization, and operation logs. The excerpts establish the app entry-point wiring; README statements support the product capabilities. Some internal connections are not visible in the excerpts, so they are marked unverified rather than presented as confirmed calls.

Main entry points: [`src/PushRelabelViz.jsx`](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx) (Visualizer), [`src/main.jsx`](https://github.com/aekasu/goldberg-tarjan/blob/master/src/main.jsx) (React Entry), [`src/App.jsx`](https://github.com/aekasu/goldberg-tarjan/blob/master/src/App.jsx) (App Shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application Entry"]
  node_main["React Entry<br/>[main.jsx]"]
  node_app["App Shell<br/>[App.jsx]"]
end

subgraph group_algorithm["Flow Algorithm"]
  node_generator["Network Generator<br/>[PushRelabelViz.jsx]"]
  node_engine["Push–Relabel Engine<br/>[PushRelabelViz.jsx]"]
end

subgraph group_experience["Visualization Experience"]
  node_viz["Visualizer<br/>[PushRelabelViz.jsx]"]
  node_playback["Step Playback<br/>[PushRelabelViz.jsx]"]
  node_graphview["Graph View<br/>[PushRelabelViz.jsx]"]
  node_operationlog["Operation Log<br/>[PushRelabelViz.jsx]"]
end

node_user(("User"))

node_user -->|"opens app"| node_main
node_main -->|"renders"| node_app
node_app -->|"renders"| node_viz
node_viz -.->|"requests network"| node_generator
node_generator -.->|"provides graph"| node_engine
node_viz -->|"controls steps"| node_playback
node_playback -->|"shows current step"| node_graphview
node_playback -->|"shows operations"| node_operationlog
node_engine -->|"produces operation details"| node_operationlog

click node_main "https://github.com/aekasu/goldberg-tarjan/blob/master/src/main.jsx"
click node_app "https://github.com/aekasu/goldberg-tarjan/blob/master/src/App.jsx"
click node_viz "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"
click node_generator "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"
click node_engine "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"
click node_playback "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"
click node_graphview "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"
click node_operationlog "https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_app,node_user toneBlue
class node_generator,node_engine toneAmber
class node_viz,node_playback,node_graphview,node_operationlog toneMint
```

## Components

### Application Entry

- [React Entry](https://github.com/aekasu/goldberg-tarjan/blob/master/src/main.jsx): `src/main.jsx`
- [App Shell](https://github.com/aekasu/goldberg-tarjan/blob/master/src/App.jsx): `src/App.jsx`

### Flow Algorithm

- [Network Generator](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`
- [Push–Relabel Engine](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`

### Visualization Experience

- [Visualizer](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`
- [Step Playback](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`
- [Graph View](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`
- [Operation Log](https://github.com/aekasu/goldberg-tarjan/blob/master/src/PushRelabelViz.jsx): `src/PushRelabelViz.jsx`

### Other components

- **User**

## Connections

- User → React Entry: opens app (evidence: `README.md`)
- React Entry → App Shell: renders (evidence: `src/main.jsx`)
- App Shell → Visualizer: renders (evidence: `src/App.jsx`)
- Visualizer → Network Generator: requests network (evidence: `src/PushRelabelViz.jsx`)
- Network Generator → Push–Relabel Engine: provides graph (evidence: `src/PushRelabelViz.jsx`)
- Visualizer → Step Playback: controls steps (evidence: `README.md`)
- Step Playback → Graph View: shows current step (evidence: `README.md`)
- Step Playback → Operation Log: shows operations (evidence: `README.md`)
- Push–Relabel Engine → Operation Log: produces operation details (evidence: `README.md`)
