How ayushdixit1-av/ar-project works
Purpose and Module Boundaries
This repository is a collection of digital-electronics AR/3D lab prototypes. Its primary runnable implementation is Ayush’s browser-based breadboard simulator with WebXR AR support. A separate, more application-structured trainer prototype exists under Shivam/source/; other contributor folders mostly hold 3D assets or placeholders.
Primary Entry Points
• Ayush simulator: Ayush/index.html loads Ayush/main.js; local static serving is provided by Ayush/serve.js.
• AR-specific view: Ayush/ar.html and Ayush/ARMode.js.
• Shivam trainer source: Shivam/source/index.html → Shivam/source/src/main.tsx → Shivam/source/src/App.tsx.
• A prebuilt Shivam deployment is represented by Shivam/index.html and Shivam/assets/index-ZWi_3kXW.js.
Breadboard Scene and Physical Layout
Ayush’s simulator constructs a visual and logical solderless breadboard, including holes, labels, and power rails.
• Board geometry/configuration: Ayush/BreadboardConfig.js, Ayush/BreadboardBody.js
• Hole and rail generation: Ayush/HoleGenerator.js, Ayush/Hole.js, Ayush/PowerRailGenerator.js
• Display/feature composition: Ayush/BreadboardShowcase.js, Ayush/EquipmentShowcase.js
This layer is the coordinate-system boundary: placement tools and renderers target its hole/rail locations.
Interaction and Component Placement
Tool modules translate user actions into placed circuit entities, while managers own the resulting collections and lifecycle.
• IC workflow: Ayush/ICPlacementTool.js, Ayush/ICManager.js, Ayush/IC.js
• Wires: Ayush/WirePlacementTool.js, Ayush/WireManager.js, Ayush/WireRenderer.js
• LEDs and switches: Ayush/LEDPlacementTool.js, Ayush/LEDManager.js, Ayush/SwitchPlacementTool.js
• Power and probing: Ayush/PowerSupplyTool.js, Ayush/PowerSupplyManager.js, Ayush/ProbeManager.js
Renderers are separated from interaction/management for wires, LEDs, switches, probes, and power supplies.
Circuit Logic, Validation, and Learning Feedback
The simulation boundary consumes placed components and connectivity to evaluate circuit behavior and guide users.
• Simulation and broad validation: Ayush/Simulator.js, Ayush/Validator.js
• IC-specific validation and labels/previews: Ayush/ICValidator.js, Ayush/ICLabel.js, Ayush/ICPreview.js
• Educational/status panels: Ayush/TruthTablePanel.js, Ayush/ExperimentGuide.js, Ayush/ProbePanel.js
• Gate definitions/catalog: Ayush/GateCatalog.js
AR and Runtime Infrastructure
Ayush is plain browser JavaScript packaged as a static site, with Node used only to host it locally (Ayush/package.json, Ayush/serve.js). WebXR is exposed as a separate AR mode rather than a server-side service. The repository contains Blender source assets such as Aadvik/bread.blend, Amar/SecondBlend.blend, and Shreya/trainer kit.glb.
Shivam Trainer Prototype
Shivam/source/ is a TypeScript/Vite application with a trainer-oriented UI shell around a 3D viewport and electronics instruction flows.
• Main composition and viewport: Shivam/source/src/App.tsx, Shivam/source/src/components/Trainer3DViewport.tsx
• Library/inspector controls: Shivam/source/src/components/LeftSidebarLibrary.tsx, Shivam/source/src/components/RightSidebarInspector.tsx
• Logic and 3D utilities: Shivam/source/src/utils/logicEngine.ts, Shivam/source/src/utils/threeHelpers.ts
• AR, verification, and instructional overlays: Shivam/source/src/components/ARModeView.tsx, Shivam/source/src/components/TruthTableVerificationView.tsx, Shivam/source/src/components/AITeacherDrawer.tsx
Main entry points: main.js Main composition · App.tsx Trainer UI shell · ICPlacementTool.js Placement tools · ICManager.js Component managers
Components 22
Ayush simulator
Browser-based breadboard and WebXR prototype.
- Simulator entry
Ayush/index.html - Main composition
Ayush/main.js - Local static server · Hosts the static simulator locally.
Ayush/serve.js - Breadboard layout · Coordinate-system boundary for holes and power rails.
Ayush/BreadboardConfig.js - Holes and power rails
Ayush/HoleGenerator.js - Board and equipment view
Ayush/BreadboardShowcase.js - Placement tools · Places ICs, wires, LEDs, switches, and power supplies.
Ayush/ICPlacementTool.js - Component managers · Own placed IC, wire, LED, switch, power, and probe collections.
Ayush/ICManager.js - Component renderers · Renders wires, LEDs, switches, probes, and power supplies.
Ayush/WireRenderer.js - Circuit simulation
Ayush/Simulator.js - Circuit validation · Combines broad and IC-specific circuit checks.
Ayush/Validator.js - Gate catalog
Ayush/GateCatalog.js - Learning feedback · Truth tables, experiment guidance, and probe status.
Ayush/TruthTablePanel.js - AR mode · Separate browser AR experience.
Ayush/ar.html - AR runtime
Ayush/ARMode.js
Shivam trainer
Separate TypeScript/Vite trainer prototype.
- Trainer entry
Shivam/source/index.html - React bootstrap
Shivam/source/src/main.tsx - Trainer UI shell
Shivam/source/src/App.tsx - 3D trainer viewport
Shivam/source/src/components/Trainer3DViewport.tsx - Trainer controls
Shivam/source/src/components/LeftSidebarLibrary.tsx - Trainer logic engine
Shivam/source/src/utils/logicEngine.ts - Trainer overlays · Provides AR, truth-table verification, and AI teacher views.
Shivam/source/src/components/ARModeView.tsx
Connections 22
- Simulator entry → Main composition: loads
- Local static server → Simulator entry: serves
- Main composition → Breadboard layout: builds
- Breadboard layout → Holes and power rails: generates
- Holes and power rails → Board and equipment view: provides locations
- Main composition → Board and equipment view: composes
- Main composition → Placement tools: activates
- Placement tools → Breadboard layout: targets coordinates
- Placement tools → Component managers: creates entities
- Component managers → Component renderers: supplies components
- Component managers → Circuit simulation: supplies connectivity
- Gate catalog → Circuit simulation: defines gates
- Circuit simulation → Circuit validation: evaluates
- Circuit validation → Learning feedback: guides user
- AR mode → AR runtime: loads
- Trainer entry → React bootstrap: loads
- React bootstrap → Trainer UI shell: mounts
- Trainer UI shell → 3D trainer viewport: composes
- Trainer UI shell → Trainer controls: composes
- Trainer UI shell → Trainer overlays: composes
- 3D trainer viewport → Trainer logic engine: uses
- Trainer controls → 3D trainer viewport: configures