How iamhusnain-1214/codevision works
CodeVision is an algorithm visualizer and debugger. A user selects a built-in module or submits Python/C++ code; the backend traces execution, returns snapshots, and saves successful runs for replay in History. Fehm separately explains problems, diagnoses logic, and estimates complexity through an AI fallback chain. The UI renders traces with code, variables, playback, and structure-specific diagrams. The README documents six tracing modules, account features, admin capabilities, and integrations; unsampled module details are represented at subsystem level rather than inferred call-by-call.
Main entry points: client.js API client · db.py Application data · custom_routes.py Custom trace route · ai_orchestrator.py AI orchestration
Components 25
Web experience
- App routes
frontend/src/App.jsx - Module pages
frontend/src/pages/modules - History replay
frontend/src/pages/History.jsx - Trace visualizations
frontend/src/components - API client
frontend/src/api/client.js
Tracing
- Built-in trace routes
backend/routes/trace_routes.py - Built-in tracers
backend/tracer_array.py - Custom trace route
backend/routes/custom_routes.py - Python tracer
backend/tracer_custom.py - C++ tracer
backend/tracer_custom_cpp.py
Accounts and history
- Session context
frontend/src/context/AuthContext.jsx - Auth routes
backend/routes/auth_routes.py - Auth validation
backend/auth.py - Application data
backend/db.py
Fehm and analysis
- Fehm interface
frontend/src/pages/Fehm.jsx - Fehm routes
backend/routes/fehm_routes.py - AI orchestration
backend/ai_orchestrator.py - AI cache
backend/ai_cache.py - Gemini provider
backend/gemini_service.py - Groq provider
backend/grok_service.py - Complexity analyzer
backend/complexity_analyzer.py
Admin and health
- Admin features
backend/routes/admin_routes.py - Health endpoint
backend/app.py
Other components
- Learner
- Supabase
Connections 30
- Learner → App routes: uses
frontend/src/App.jsx - App routes → Module pages: routes to
frontend/src/App.jsx - Module pages → API client: requests traces
frontend/src/pages/modules/ArrayModule.jsx - API client → Built-in trace routes: calls API
README.md - Built-in trace routes → Built-in tracers: dispatches traces
backend/routes/trace_routes.py - Built-in trace routes → Application data: saves runs
backend/routes/trace_routes.py - Learner → Custom trace route: submits code
README.md - API client → Custom trace route: calls API
README.md - Custom trace route → Python tracer: runs Python
backend/routes/custom_routes.py - Custom trace route → C++ tracer: runs C++
backend/routes/custom_routes.py - Custom trace route → Application data: logs and saves
backend/routes/custom_routes.py - History replay → API client: loads history
frontend/src/pages/History.jsx - History replay → Trace visualizations: renders replay
frontend/src/pages/History.jsx - Session context → API client: requests session
frontend/src/context/AuthContext.jsx - API client → Auth routes: calls API
README.md - Auth routes → Auth validation: delegates auth
backend/routes/auth_routes.py - Auth validation → Application data: reads profile
backend/auth.py - Auth validation → Supabase: authenticates
backend/auth.py - Application data → Supabase: queries
backend/db.py - Fehm interface → API client: requests coaching
frontend/src/pages/Fehm.jsx - API client → Fehm routes: calls API
README.md - Fehm routes → AI orchestration: requests AI
backend/routes/fehm_routes.py - Fehm routes → Complexity analyzer: fallback analysis
backend/routes/fehm_routes.py - AI orchestration → AI cache: checks cache
backend/ai_orchestrator.py - AI orchestration → Gemini provider: tries primary
backend/ai_orchestrator.py - AI orchestration → Groq provider: falls back
backend/ai_orchestrator.py - Learner → Admin features: administers
README.md - Admin features → Application data: manages records
backend/routes/admin_routes.py - Learner → Health endpoint: health checks
README.md - Health endpoint → Application data: checks database
backend/app.py