How simonriley-141/drishti works
Drishti Labs is an accessible browser-based STEM learning workspace. Learners enter through the public site, choose a simulation, and explore circuits, forces, or matter; global controls support voice, gesture, and other accessibility preferences. Separate role-based portals support teacher, student, and parent progress workflows. The map follows the router and sampled voice/API paths; dashboard data wiring and several lab internals are not shown because their source was not sampled.
Main entry points: App.jsx App router · LabViewer.jsx Lab viewer · VoiceCommandController.jsx Voice controller · TeacherDashboard.jsx Teacher dashboard
Components 24
Learning experience
- App router
src/App.jsx - Welcome page
src/pages/LandingPage.jsx - Lab directory
src/pages/SimulationDirectory.jsx - Lab viewer
src/pages/LabViewer.jsx
Science simulations
- Circuit playground
src/labs/electrical-circuit/FreeformCircuitCanvas.jsx - Circuit solver
src/labs/electrical-circuit/circuitWorker.js - Forces lab
src/labs/forces-tug-of-war/TugOfWarCanvas.jsx - Matter lab
src/labs/states-of-matter/StatesOfMatterLab.jsx
Accessible interaction
- App preferences
src/context/AppContext.jsx - Accessibility controls
src/components/AccessibilityToolbar.jsx - Voice controller
src/components/VoiceCommandController.jsx - Gesture controller
src/components/GestureMouseController.jsx - Offline speech recognition
src/workers/offlineAsrWorker.js
Role dashboards
- Authentication context
src/context/AuthContext.jsx - Teacher dashboard
src/pages/TeacherDashboard.jsx - Student dashboard
src/pages/StudentDashboard.jsx - Parent dashboard
src/pages/ParentDashboard.jsx - Lab telemetry
src/hooks/useLabTelemetry.js
AI and platform services
- Firebase services
src/lib/firebase.js - AI client workflows
src/utils/openaiClient.js - API client
src/lib/api.js - Voice and AI API
server.mjs
Other components
- Learner
- OpenAI service
Connections 26
- Learner → App router: opens
- App router → Welcome page: routes to
- App router → Lab directory: routes to
- App router → Lab viewer: routes to
- App router → Matter lab: routes to
- Lab directory → Lab viewer: selects lab
- Lab viewer → Circuit playground: renders lab
- Lab viewer → Forces lab: renders lab
- Learner → Accessibility controls: adjusts controls
- Accessibility controls → App preferences: updates preferences
- Voice controller → App preferences: dispatches commands
- Gesture controller → App preferences: reads preferences
- Voice controller → Offline speech recognition: transcribes offline
- Voice controller → API client: sends voice requests
- AI client workflows → API client: requests AI tasks
- API client → Voice and AI API: calls endpoints
- Voice and AI API → OpenAI service: requests model work
- App router → Authentication context: provides auth context
- App router → Teacher dashboard: routes to
- App router → Student dashboard: routes to
- App router → Parent dashboard: routes to
- Teacher dashboard → Lab telemetry: inspects progress
- Teacher dashboard → Firebase services: manages accounts
- Student dashboard → Firebase services: reads progress
- Parent dashboard → Firebase services: reads progress
- Circuit playground → Circuit solver: solves circuit