How thesarthakshinde/dsa-visualizer works
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: views.py Problem views · settings.py Django settings · dsa_visualizer/urls.py Root URL routing · problems/urls.py Problem routes
Components 12
Django routing
- Root URL routing
dsa_visualizer/urls.py - Problem routes
problems/urls.py - Problem views
problems/views.py
Problem content
- Problem catalog
problems/views.py - Homepage template
problems/templates/problems/home.html - Problem templates
problems/templates/problems - Site stylesheet
problems/static/problems/css/style.css
Web runtime
- API WSGI entry
api/index.py - Django WSGI app
dsa_visualizer/wsgi.py - Django settings
dsa_visualizer/settings.py
Other components
- Visitor
- Browser
Connections 14
- Visitor → API WSGI entry: requests pages
- Visitor → Django WSGI app: requests pages
- API WSGI entry → Django settings: initializes Django
api/index.py - Django WSGI app → Django settings: selects settings
dsa_visualizer/wsgi.py - Django settings → Root URL routing: sets URL config
dsa_visualizer/settings.py - Root URL routing → Problem routes: includes routes
dsa_visualizer/urls.py - Problem routes → Problem views: dispatches requests
problems/urls.py - Problem views → Problem catalog: builds listing
problems/views.py - Problem catalog → Problem templates: scans templates
problems/views.py - Problem views → Homepage template: renders homepage
problems/views.py - Problem views → Problem templates: renders problem page
problems/views.py - Django settings → Site stylesheet: configures static files
dsa_visualizer/settings.py - Problem views → Browser: returns rendered page
problems/views.py - Site stylesheet → Browser: styles pages