How shreyask95/simulator works
Simulator is a browser-based robotics simulator with a built-in programming IDE, scene editor, challenge experience, and learning-management views. The main user flow enters through the routed application, selects a scene or challenge, edits/programs a robot, then runs it in the simulator; challenge execution also supports compiled programs and worker-based runtime. The graph preserves documented AI, asset, feedback, account, and curriculum capabilities. Relationships involving unsampled implementations are omitted or marked unverified; source-index references and README statements provide the remaining evidence.
Main entry points: App.tsx Application router · ChallengeRoot.tsx Challenge experience · Root.tsx Scene editor · Scene Scene geometry and nodes
Components 34
Application experience
- Application router
src/App.tsx - Dashboard
src/pages/Dashboard.tsx - Scene editor
src/pages/Root.tsx - Challenge experience
src/pages/ChallengeRoot.tsx - Curriculum views
src/lms/CurriculumPage.tsx - Assignments and LMS
src/lms - AI assistant
src/components/Ai - Asset viewer
src/asset-viewer/AssetViewerPage.tsx - Feedback
src/components/Feedback
Scene and simulation
- Challenge definitions
src/simulator/definitions/challenges - Scene definitions
src/simulator/definitions/scenes - Scene model
src/state/State/Scene/index.ts - Scene geometry and nodes
src/state/State/Scene - Simulation manager
src/simulator/ScriptManager.ts - 3D simulator bindings
src/simulator/babylonBindings - Challenge interface
src/components/Challenge
Programming runtime
- Code editor
src/components/Editor - Program compiler
src/programming/compiler/compile.ts - Worker controller
src/programming/WorkerInstance.ts - Program worker
src/programming/worker/worker.ts - Robot registers
src/programming/SharedRegistersRobot.ts
Data and services
- Application state
src/state/index.ts - State reducers
src/state/reducer/index.ts - Database client
src/db/Selector.ts - Firebase authentication
src/firebase/firebase.ts - Theme and UI primitives
src/components/constants/theme.ts - Scroll area
src/components/interface/ScrollArea.tsx - Localized strings
src/util/LocalizedString.ts - Unit math
src/util/math/unitMath.ts - Vector math
src/util/math/math.ts - Dictionary utilities
src/util/objectOps/Dict.ts - State patching
src/util/redux/Patch.ts
Other components
- Learner / user
- KIPR database service
Connections 39
- Learner / user → Application router: opens
src/App.tsx - Application router → Dashboard: routes
src/App.tsx - Application router → Scene editor: routes
src/App.tsx - Application router → Challenge experience: routes
src/App.tsx - Application router → Curriculum views: routes
src/App.tsx - Application router → Application state: reads state
src/App.tsx - Application router → Firebase authentication: checks auth
src/App.tsx - Application router → Database client: checks consent
src/App.tsx - Curriculum views → Assignments and LMS: shows learning
- Challenge experience → Program compiler: compiles programs
src/pages/ChallengeRoot.tsx - Challenge experience → Worker controller: starts runtime
src/pages/ChallengeRoot.tsx - Challenge experience → Challenge interface: renders
src/pages/ChallengeRoot.tsx - Challenge experience → Scene editor: uses simulator
- Challenge experience → Challenge definitions: loads challenge
- Scene editor → Scene model: edits scene
- Scene model → Scene geometry and nodes: models nodes
src/state/State/Scene/index.ts - Scene model → Simulation manager: provides scene data
src/simulator/ScriptManager.ts - Simulation manager → Scene geometry and nodes: reads and updates
src/simulator/ScriptManager.ts - Simulation manager → 3D simulator bindings: drives rendering
- Scene editor → Scene definitions: offers scenes
- Worker controller → Robot registers: connects registers
src/programming/WorkerInstance.ts - Worker controller → Program worker: starts worker
- Program compiler → Program worker: supplies program
- Application state → State reducers: combines reducers
src/state/index.ts - Application state → Database client: uses selectors
src/state/index.ts - Database client → KIPR database service: requests records
- AI assistant → Application state: uses app state
- Asset viewer → Application state: reads state
src/asset-viewer/index.tsx - Scene geometry and nodes → State patching: diffs changes
src/state/State/Scene/Geometry.ts - Scene geometry and nodes → Unit math: uses units
src/state/State/Scene/index.ts - Unit math → Vector math: converts vectors
src/util/math/unitMath.ts - Scene geometry and nodes → Dictionary utilities: uses dictionaries
src/state/State/Scene/index.ts - Scene editor → Theme and UI primitives: uses styling
- Scene editor → Scroll area: uses controls
- Application router → Localized strings: localizes interface
src/App.tsx - Learner / user → AI assistant: asks questions
- Learner / user → Asset viewer: views assets
- Learner / user → Feedback: sends feedback
- Learner / user → Assignments and LMS: opens coursework