# vaishnavigiri1210/data-structures-hub architecture

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

- Interactive diagram: https://gitdiagram.com/vaishnavigiri1210/data-structures-hub
- Repository: https://github.com/vaishnavigiri1210/data-structures-hub

## Overview

Data Structure Hub is a browser-based learning app for exploring data structures and algorithms through interactive visualizers. Learners enter from the dashboard or sidebar, choose a visualizer, perform operations or step through an algorithm, and inspect the visualization and execution feedback. It also provides learner sign-in and sign-up, with Supabase-backed authentication when configured and local profile storage as a fallback. The source excerpts show selected visualizers and shared UI; several routes and the progress endpoint are present in the tree but their behavior is not established by the excerpts.

Main entry points: [`components/Sidebar.tsx`](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/Sidebar.tsx) (Visualizer navigation), [`lib/sound.ts`](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/lib/sound.ts) (Sound effects), [`app/visualizer/stack/page.tsx`](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/stack/page.tsx) (Stack visualizer), [`app/visualizer/queue/page.tsx`](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/queue/page.tsx) (Queue visualizer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning and navigation"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_sidebar["Visualizer navigation<br/>[Sidebar.tsx]"]
  node_progressapi["Progress endpoint<br/>[route.ts]"]
end

subgraph group_visualizers["Interactive visualizers"]
  node_stack["Stack visualizer<br/>[page.tsx]"]
  node_queue["Queue visualizer<br/>[page.tsx]"]
  node_linkedlist["Linked-list visualizer<br/>[page.tsx]"]
  node_tree["Tree visualizer<br/>[page.tsx]"]
  node_graph["Graph visualizer<br/>[page.tsx]"]
  node_sorting["Sorting visualizer<br/>[page.tsx]"]
end

subgraph group_shared["Shared UI and feedback"]
  node_executionlog["Execution log<br/>[ExecutionLog.tsx]"]
  node_sound["Sound effects<br/>[sound.ts]"]
  node_header["Header<br/>[Header.tsx]"]
end

subgraph group_identity["Learner identity"]
  node_login["Sign-in page<br/>[page.tsx]"]
  node_signup["Sign-up page<br/>[page.tsx]"]
  node_passwordrecovery["Password recovery<br/>[page.tsx]"]
  node_passwordupdate["Password update<br/>[page.tsx]"]
  node_profiles["Profile utilities<br/>[supabaseClient.ts]"]
end

node_learner(("Learner"))
node_supabase[("Supabase")]

node_learner -->|"opens"| node_dashboard
node_learner -->|"chooses visualizer"| node_sidebar
node_sidebar -->|"links to"| node_stack
node_sidebar -->|"links to"| node_queue
node_sidebar -->|"links to"| node_linkedlist
node_sidebar -->|"links to"| node_tree
node_sidebar -->|"links to"| node_graph
node_sidebar -->|"links to"| node_sorting
node_stack -->|"renders"| node_executionlog
node_queue -->|"renders"| node_executionlog
node_linkedlist -->|"renders"| node_executionlog
node_stack -->|"plays effects"| node_sound
node_queue -->|"plays effects"| node_sound
node_linkedlist -->|"plays effects"| node_sound
node_tree -->|"plays effects"| node_sound
node_graph -->|"plays effects"| node_sound
node_learner -->|"signs in"| node_login
node_learner -->|"registers"| node_signup
node_login -->|"stores profile"| node_profiles
node_signup -->|"stores profile"| node_profiles
node_login -.->|"authenticates"| node_supabase
node_signup -.->|"registers account"| node_supabase
node_sidebar -->|"reads profile"| node_profiles
node_sidebar -.->|"signs out"| node_supabase
node_learner -.->|"requests recovery"| node_passwordrecovery
node_learner -.->|"updates password"| node_passwordupdate

click node_dashboard "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/page.tsx"
click node_sidebar "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/Sidebar.tsx"
click node_stack "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/stack/page.tsx"
click node_queue "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/queue/page.tsx"
click node_linkedlist "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/linked-list/page.tsx"
click node_tree "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/tree/page.tsx"
click node_graph "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/graph/page.tsx"
click node_sorting "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/sorting/page.tsx"
click node_executionlog "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/ExecutionLog.tsx"
click node_sound "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/lib/sound.ts"
click node_header "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/Header.tsx"
click node_login "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/login/page.tsx"
click node_signup "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/signup/page.tsx"
click node_passwordrecovery "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/forgot-password/page.tsx"
click node_passwordupdate "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/update-password/page.tsx"
click node_profiles "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/lib/supabaseClient.ts"
click node_progressapi "https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/api/progress/route.ts"

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_dashboard,node_sidebar,node_progressapi toneBlue
class node_stack,node_queue,node_linkedlist,node_tree,node_graph,node_sorting,node_supabase toneAmber
class node_executionlog,node_sound,node_header toneMint
class node_login,node_signup,node_passwordrecovery,node_passwordupdate,node_profiles toneRose
class node_learner toneIndigo
```

## Components

### Learning and navigation

- [Dashboard](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/page.tsx): `app/page.tsx`
- [Visualizer navigation](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/Sidebar.tsx): `components/Sidebar.tsx`
- [Progress endpoint](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/api/progress/route.ts): `app/api/progress/route.ts`

### Interactive visualizers

- [Stack visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/stack/page.tsx): `app/visualizer/stack/page.tsx`
- [Queue visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/queue/page.tsx): `app/visualizer/queue/page.tsx`
- [Linked-list visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/linked-list/page.tsx): `app/visualizer/linked-list/page.tsx`
- [Tree visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/tree/page.tsx): `app/visualizer/tree/page.tsx`
- [Graph visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/graph/page.tsx): `app/visualizer/graph/page.tsx`
- [Sorting visualizer](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/visualizer/sorting/page.tsx): `app/visualizer/sorting/page.tsx`

### Shared UI and feedback

- [Execution log](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/ExecutionLog.tsx): `components/ExecutionLog.tsx`
- [Sound effects](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/lib/sound.ts): `lib/sound.ts`
- [Header](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/components/Header.tsx): `components/Header.tsx`

### Learner identity

- [Sign-in page](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/login/page.tsx): `app/auth/login/page.tsx`
- [Sign-up page](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/signup/page.tsx): `app/auth/signup/page.tsx`
- [Password recovery](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/forgot-password/page.tsx): `app/auth/forgot-password/page.tsx`
- [Password update](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/app/auth/update-password/page.tsx): `app/auth/update-password/page.tsx`
- [Profile utilities](https://github.com/vaishnavigiri1210/data-structures-hub/blob/main/lib/supabaseClient.ts): `lib/supabaseClient.ts`

### Other components

- **Learner**
- **Supabase**

## Connections

- Learner → Dashboard: opens
- Learner → Visualizer navigation: chooses visualizer (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Stack visualizer: links to (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Queue visualizer: links to (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Linked-list visualizer: links to (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Tree visualizer: links to (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Graph visualizer: links to (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Sorting visualizer: links to (evidence: `components/Sidebar.tsx`)
- Stack visualizer → Execution log: renders (evidence: `app/visualizer/stack/page.tsx`)
- Queue visualizer → Execution log: renders (evidence: `app/visualizer/queue/page.tsx`)
- Linked-list visualizer → Execution log: renders (evidence: `app/visualizer/linked-list/page.tsx`)
- Stack visualizer → Sound effects: plays effects (evidence: `app/visualizer/stack/page.tsx`)
- Queue visualizer → Sound effects: plays effects (evidence: `app/visualizer/queue/page.tsx`)
- Linked-list visualizer → Sound effects: plays effects (evidence: `app/visualizer/linked-list/page.tsx`)
- Tree visualizer → Sound effects: plays effects (evidence: `app/visualizer/tree/page.tsx`)
- Graph visualizer → Sound effects: plays effects (evidence: `app/visualizer/graph/page.tsx`)
- Learner → Sign-in page: signs in (evidence: `app/auth/login/page.tsx`)
- Learner → Sign-up page: registers (evidence: `app/auth/signup/page.tsx`)
- Sign-in page → Profile utilities: stores profile (evidence: `app/auth/login/page.tsx`)
- Sign-up page → Profile utilities: stores profile (evidence: `app/auth/signup/page.tsx`)
- Sign-in page → Supabase: authenticates (evidence: `app/auth/login/page.tsx`)
- Sign-up page → Supabase: registers account (evidence: `app/auth/signup/page.tsx`)
- Visualizer navigation → Profile utilities: reads profile (evidence: `components/Sidebar.tsx`)
- Visualizer navigation → Supabase: signs out (evidence: `components/Sidebar.tsx`)
- Learner → Password recovery: requests recovery
- Learner → Password update: updates password
