# angelkaranwal-eng/algo_lab architecture

> Architecture diagram of the GitHub repository angelkaranwal-eng/algo_lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/angelkaranwal-eng/algo_lab
- Repository: https://github.com/angelkaranwal-eng/algo_lab

## Overview

This is a desktop educational visualizer for algorithms and data structures. Users choose a lesson, configure or manipulate input, run or step through operations, and inspect the resulting state and telemetry in a custom canvas. The graph preserves the documented UI-to-algorithm/data-structure-to-visualization branches, including graph traversal and maze pathfinding. Relationships are based on the SOURCE INDEX or excerpts; the README is empty, and unsampled implementation details are not assumed.

Main entry points: [`ui/main_window.py`](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/main_window.py) (Main Window), [`ui/queue_page.py`](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/queue_page.py) (Queue Page), [`ui/graph_page.py`](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/graph_page.py) (Graph Page), [`ui/sorting_page.py`](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/sorting_page.py) (Sorting Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Lesson Interface"]
  node_window["Main Window<br/>[main_window.py]"]
  node_home["Home Page<br/>[home_page.py]"]
  node_about["About Page<br/>[about_page.py]"]
  node_sorting_page["Sorting Page<br/>[sorting_page.py]"]
  node_search_page["Searching Page<br/>[searching_page.py]"]
  node_comparison["Comparison Page<br/>[comparison_page.py]"]
  node_stack_page["Stack Page<br/>[stack_page.py]"]
  node_queue_page["Queue Page<br/>[queue_page.py]"]
  node_list_page["Linked List Page"]
  node_tree_page["Tree Page<br/>[tree_page.py]"]
  node_graph_page["Graph Page<br/>[graph_page.py]"]
  node_maze_page["Maze Page<br/>[maze_page.py]"]
end

subgraph group_algorithms["Algorithms"]
  node_sorting_algo["Sorting Algorithms<br/>[sorting.py]"]
  node_search_algo["Search Algorithms<br/>[searching.py]"]
  node_graph_algo["Graph Algorithms"]
  node_pathfinding["Pathfinding<br/>[pathfinding.py]"]
end

subgraph group_structures["Data Structures"]
  node_stack["Stack<br/>[stack.py]"]
  node_queue["Queue<br/>[queue.py]"]
  node_circular_queue["Circular Queue<br/>[circular_queue.py]"]
  node_linked_list["Linked List<br/>[linked_list.py]"]
  node_bst["Binary Search Tree"]
  node_graph["Graph Model<br/>[graph.py]"]
end

subgraph group_visualization["Visualization"]
  node_sort_canvas["Sorting Canvas<br/>[sorting_canvas.py]"]
  node_search_canvas["Searching Canvas"]
  node_linear_canvas["Linear Structure Canvas"]
  node_bst_canvas["Tree Canvas<br/>[bst_canvas.py]"]
  node_graph_canvas["Graph Canvas<br/>[graph_canvas.py]"]
  node_maze_canvas["Maze Canvas<br/>[maze_canvas.py]"]
  node_styles["Visual Theme<br/>[styles.py]"]
end

node_user(("Learner"))

node_user -->|"uses"| node_window
node_window -->|"routes to"| node_home
node_window -->|"routes to"| node_about
node_window -->|"routes to"| node_sorting_page
node_window -->|"routes to"| node_search_page
node_window -->|"routes to"| node_comparison
node_window -->|"routes to"| node_stack_page
node_window -->|"routes to"| node_queue_page
node_window -->|"routes to"| node_list_page
node_window -->|"routes to"| node_tree_page
node_window -->|"routes to"| node_graph_page
node_window -->|"routes to"| node_maze_page
node_sorting_page -->|"steps through"| node_sorting_algo
node_sorting_page -->|"updates state"| node_sort_canvas
node_search_page -->|"steps through"| node_search_algo
node_search_page -->|"updates state"| node_search_canvas
node_comparison -->|"compares sorts"| node_sorting_algo
node_stack_page -->|"operates on"| node_stack
node_stack_page -->|"updates state"| node_linear_canvas
node_queue_page -->|"operates on"| node_queue
node_queue_page -->|"operates on"| node_circular_queue
node_queue_page -->|"updates state"| node_linear_canvas
node_list_page -->|"operates on"| node_linked_list
node_list_page -->|"updates state"| node_linear_canvas
node_tree_page -->|"operates on"| node_bst
node_tree_page -->|"updates tree"| node_bst_canvas
node_graph_page -->|"edits graph"| node_graph
node_graph_page -->|"runs traversal"| node_graph_algo
node_graph_page -->|"updates display"| node_graph_canvas
node_maze_page -->|"runs search"| node_pathfinding
node_maze_page -->|"updates display"| node_maze_canvas
node_graph_algo -->|"uses"| node_queue
node_graph_algo -->|"uses"| node_stack

click node_window "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/main_window.py"
click node_home "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/home_page.py"
click node_about "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/about_page.py"
click node_sorting_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/sorting_page.py"
click node_search_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/searching_page.py"
click node_comparison "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/comparison_page.py"
click node_stack_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/stack_page.py"
click node_queue_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/queue_page.py"
click node_list_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/linked_list_page.py"
click node_tree_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/tree_page.py"
click node_graph_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/graph_page.py"
click node_maze_page "https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/maze_page.py"
click node_sorting_algo "https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/sorting.py"
click node_search_algo "https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/searching.py"
click node_graph_algo "https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/graph_algorithms.py"
click node_pathfinding "https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/pathfinding.py"
click node_stack "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/stack.py"
click node_queue "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/queue.py"
click node_circular_queue "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/circular_queue.py"
click node_linked_list "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/linked_list.py"
click node_bst "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/binary_search_tree.py"
click node_graph "https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/graph.py"
click node_sort_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/sorting_canvas.py"
click node_search_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/searching_canvas.py"
click node_linear_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/linear_ds_canvas.py"
click node_bst_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/bst_canvas.py"
click node_graph_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/graph_canvas.py"
click node_maze_canvas "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/maze_canvas.py"
click node_styles "https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/styles.py"

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_window,node_home,node_about,node_sorting_page,node_search_page,node_comparison,node_stack_page,node_queue_page,node_list_page,node_tree_page,node_graph_page,node_maze_page toneBlue
class node_sorting_algo,node_search_algo,node_graph_algo,node_pathfinding toneAmber
class node_stack,node_queue,node_circular_queue,node_linked_list,node_bst,node_graph toneMint
class node_sort_canvas,node_search_canvas,node_linear_canvas,node_bst_canvas,node_graph_canvas,node_maze_canvas,node_styles toneRose
class node_user toneIndigo
```

## Components

### Lesson Interface

- [Main Window](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/main_window.py): `ui/main_window.py`
- [Home Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/home_page.py): `ui/home_page.py`
- [About Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/about_page.py): `ui/about_page.py`
- [Sorting Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/sorting_page.py): `ui/sorting_page.py`
- [Searching Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/searching_page.py): `ui/searching_page.py`
- [Comparison Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/comparison_page.py): `ui/comparison_page.py`
- [Stack Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/stack_page.py): `ui/stack_page.py`
- [Queue Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/queue_page.py): `ui/queue_page.py`
- [Linked List Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/linked_list_page.py): `ui/linked_list_page.py`
- [Tree Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/tree_page.py): `ui/tree_page.py`
- [Graph Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/graph_page.py): `ui/graph_page.py`
- [Maze Page](https://github.com/angelkaranwal-eng/algo_lab/blob/main/ui/maze_page.py): `ui/maze_page.py`

### Algorithms

- [Sorting Algorithms](https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/sorting.py): `algorithms/sorting.py`
- [Search Algorithms](https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/searching.py): `algorithms/searching.py`
- [Graph Algorithms](https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/graph_algorithms.py): `algorithms/graph_algorithms.py`
- [Pathfinding](https://github.com/angelkaranwal-eng/algo_lab/blob/main/algorithms/pathfinding.py): `algorithms/pathfinding.py`

### Data Structures

- [Stack](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/stack.py): `data_structures/stack.py`
- [Queue](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/queue.py): `data_structures/queue.py`
- [Circular Queue](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/circular_queue.py): `data_structures/circular_queue.py`
- [Linked List](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/linked_list.py): `data_structures/linked_list.py`
- [Binary Search Tree](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/binary_search_tree.py): `data_structures/binary_search_tree.py`
- [Graph Model](https://github.com/angelkaranwal-eng/algo_lab/blob/main/data_structures/graph.py): `data_structures/graph.py`

### Visualization

- [Sorting Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/sorting_canvas.py): `visualization/sorting_canvas.py`
- [Searching Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/searching_canvas.py): `visualization/searching_canvas.py`
- [Linear Structure Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/linear_ds_canvas.py): `visualization/linear_ds_canvas.py`
- [Tree Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/bst_canvas.py): `visualization/bst_canvas.py`
- [Graph Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/graph_canvas.py): `visualization/graph_canvas.py`
- [Maze Canvas](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/maze_canvas.py): `visualization/maze_canvas.py`
- [Visual Theme](https://github.com/angelkaranwal-eng/algo_lab/blob/main/visualization/styles.py): `visualization/styles.py`

### Other components

- **Learner**

## Connections

- Learner → Main Window: uses
- Main Window → Home Page: routes to (evidence: `ui/main_window.py`)
- Main Window → About Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Sorting Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Searching Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Comparison Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Stack Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Queue Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Linked List Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Tree Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Graph Page: routes to (evidence: `ui/main_window.py`)
- Main Window → Maze Page: routes to (evidence: `ui/main_window.py`)
- Sorting Page → Sorting Algorithms: steps through (evidence: `ui/sorting_page.py`)
- Sorting Page → Sorting Canvas: updates state (evidence: `ui/sorting_page.py`)
- Searching Page → Search Algorithms: steps through (evidence: `ui/searching_page.py`)
- Searching Page → Searching Canvas: updates state (evidence: `ui/searching_page.py`)
- Comparison Page → Sorting Algorithms: compares sorts (evidence: `ui/comparison_page.py`)
- Stack Page → Stack: operates on (evidence: `ui/stack_page.py`)
- Stack Page → Linear Structure Canvas: updates state (evidence: `ui/stack_page.py`)
- Queue Page → Queue: operates on (evidence: `ui/queue_page.py`)
- Queue Page → Circular Queue: operates on (evidence: `ui/queue_page.py`)
- Queue Page → Linear Structure Canvas: updates state (evidence: `ui/queue_page.py`)
- Linked List Page → Linked List: operates on (evidence: `ui/linked_list_page.py`)
- Linked List Page → Linear Structure Canvas: updates state (evidence: `ui/linked_list_page.py`)
- Tree Page → Binary Search Tree: operates on (evidence: `ui/tree_page.py`)
- Tree Page → Tree Canvas: updates tree (evidence: `ui/tree_page.py`)
- Graph Page → Graph Model: edits graph (evidence: `ui/graph_page.py`)
- Graph Page → Graph Algorithms: runs traversal (evidence: `ui/graph_page.py`)
- Graph Page → Graph Canvas: updates display (evidence: `ui/graph_page.py`)
- Maze Page → Pathfinding: runs search (evidence: `ui/maze_page.py`)
- Maze Page → Maze Canvas: updates display (evidence: `ui/maze_page.py`)
- Graph Algorithms → Queue: uses (evidence: `algorithms/graph_algorithms.py`)
- Graph Algorithms → Stack: uses (evidence: `algorithms/graph_algorithms.py`)
