# thesarthakshinde/dsa-visualizer architecture

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

- Interactive diagram: https://gitdiagram.com/thesarthakshinde/dsa-visualizer
- Repository: https://github.com/thesarthakshinde/dsa-visualizer

## Overview

DSA Visualizer is a Django site for browsing algorithm problems, each represented by an HTML template with solution content and a JavaScript visualization. The main workflow is a visitor request, URL dispatch, then either a dynamically built homepage listing or a slug-based problem page. The README also documents adding problems by creating templates without changing routes or views. The sampled code establishes routing and template scanning; individual problem-template behavior is not inspected. There is no database or persistent application state.

Main entry points: [`problems/views.py`](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/views.py) (Problem views), [`dsa_visualizer/settings.py`](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/settings.py) (Django settings), [`dsa_visualizer/urls.py`](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/urls.py) (Root URL routing), [`problems/urls.py`](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/urls.py) (Problem routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Django routing"]
  node_root_urls["Root URL routing<br/>[urls.py]"]
  node_problem_urls["Problem routes<br/>[urls.py]"]
  node_views["Problem views<br/>[views.py]"]
end

subgraph group_content["Problem content"]
  node_catalog["Problem catalog<br/>[views.py]"]
  node_home_template["Homepage template<br/>[home.html]"]
  node_problem_templates["Problem templates"]
  node_static_styles["Site stylesheet<br/>[style.css]"]
end

subgraph group_runtime["Web runtime"]
  node_api_wsgi["API WSGI entry<br/>[index.py]"]
  node_wsgi["Django WSGI app<br/>[wsgi.py]"]
  node_settings["Django settings<br/>[settings.py]"]
end

node_visitor(("Visitor"))
node_browser(("Browser"))

node_visitor -->|"requests pages"| node_api_wsgi
node_visitor -->|"requests pages"| node_wsgi
node_api_wsgi -->|"initializes Django"| node_settings
node_wsgi -->|"selects settings"| node_settings
node_settings -->|"sets URL config"| node_root_urls
node_root_urls -->|"includes routes"| node_problem_urls
node_problem_urls -->|"dispatches requests"| node_views
node_views -->|"builds listing"| node_catalog
node_catalog -->|"scans templates"| node_problem_templates
node_views -->|"renders homepage"| node_home_template
node_views -->|"renders problem page"| node_problem_templates
node_settings -->|"configures static files"| node_static_styles
node_views -->|"returns rendered page"| node_browser
node_static_styles -.->|"styles pages"| node_browser

click node_api_wsgi "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/api/index.py"
click node_wsgi "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/wsgi.py"
click node_settings "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/settings.py"
click node_root_urls "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/urls.py"
click node_problem_urls "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/urls.py"
click node_views "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/views.py"
click node_catalog "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/views.py"
click node_home_template "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/templates/problems/home.html"
click node_problem_templates "https://github.com/thesarthakshinde/dsa-visualizer/tree/main/problems/templates/problems"
click node_static_styles "https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/static/problems/css/style.css"

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_root_urls,node_problem_urls,node_views,node_browser toneBlue
class node_catalog,node_home_template,node_problem_templates,node_static_styles toneAmber
class node_api_wsgi,node_wsgi,node_settings toneMint
class node_visitor toneIndigo
```

## Components

### Django routing

- [Root URL routing](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/urls.py): `dsa_visualizer/urls.py`
- [Problem routes](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/urls.py): `problems/urls.py`
- [Problem views](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/views.py): `problems/views.py`

### Problem content

- [Problem catalog](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/views.py): `problems/views.py`
- [Homepage template](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/templates/problems/home.html): `problems/templates/problems/home.html`
- [Problem templates](https://github.com/thesarthakshinde/dsa-visualizer/tree/main/problems/templates/problems): `problems/templates/problems`
- [Site stylesheet](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/problems/static/problems/css/style.css): `problems/static/problems/css/style.css`

### Web runtime

- [API WSGI entry](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/api/index.py): `api/index.py`
- [Django WSGI app](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/wsgi.py): `dsa_visualizer/wsgi.py`
- [Django settings](https://github.com/thesarthakshinde/dsa-visualizer/blob/main/dsa_visualizer/settings.py): `dsa_visualizer/settings.py`

### Other components

- **Visitor**
- **Browser**

## Connections

- Visitor → API WSGI entry: requests pages
- Visitor → Django WSGI app: requests pages
- API WSGI entry → Django settings: initializes Django (evidence: `api/index.py`)
- Django WSGI app → Django settings: selects settings (evidence: `dsa_visualizer/wsgi.py`)
- Django settings → Root URL routing: sets URL config (evidence: `dsa_visualizer/settings.py`)
- Root URL routing → Problem routes: includes routes (evidence: `dsa_visualizer/urls.py`)
- Problem routes → Problem views: dispatches requests (evidence: `problems/urls.py`)
- Problem views → Problem catalog: builds listing (evidence: `problems/views.py`)
- Problem catalog → Problem templates: scans templates (evidence: `problems/views.py`)
- Problem views → Homepage template: renders homepage (evidence: `problems/views.py`)
- Problem views → Problem templates: renders problem page (evidence: `problems/views.py`)
- Django settings → Site stylesheet: configures static files (evidence: `dsa_visualizer/settings.py`)
- Problem views → Browser: returns rendered page (evidence: `problems/views.py`)
- Site stylesheet → Browser: styles pages
