How mynameisyera/ustaz-phy works
Ustaz is an educational platform combining subject labs and interactive simulations with a game studio for generating, refining, launching, and exporting games. The sampled frontend shows route selection, service setup, and the studio’s use of game operations; the sampled server shows API dispatch to material-extraction and game-generation handlers. The tree also documents templates, subject-specific labs, and simulator implementations, but their internal wiring was not sampled, so those branches are represented without speculative connections.
Main entry points: useGameStudio.ts Game studio UI · App.tsx Route entry · app.ts API application · ServicesContext.tsx Service context
Components 25
App and studio
- Route entry
src/App.tsx - Ustaz interface
src/presentation/components/ustaz/UstazApp.tsx - Game studio UI
src/presentation/hooks/useGameStudio.ts - Service context
src/presentation/context/ServicesContext.tsx
Game lifecycle
- Game creation
src/domain/usecases/CreateGame.ts - Game fixes
src/domain/usecases/ApplyFix.ts - Game launch
src/domain/usecases/LaunchGame.ts - Game export
src/domain/usecases/ExportGame.ts - Game records
src/infrastructure/repositories/InMemoryGameRepository.ts - HTTP generator
src/infrastructure/generators/HttpGameGenerator.ts - Blob launcher
src/infrastructure/launchers/BlobGameLauncher.ts - ZIP exporter
src/infrastructure/exporters/ZipGameExporter.ts
Subject labs
- Subject lab pages
src/presentation/components/ustaz/LabsPage.tsx - Lab game loading
src/presentation/hooks/useLabGames.tsx - Labs API client
src/infrastructure/labs/LabsApi.ts - Physics simulators
src/presentation/components/simulators - GeoGebra activities
src/infrastructure/geogebra - Geography maps
src/infrastructure/geography/MapEngine.tsx - Game templates
src/infrastructure/templates
AI API
- API application
server/app.ts - Material extraction
server/handleExtractMaterial.ts - Game generation
server/handleGenerate.ts - PDF extraction
src/infrastructure/pdf/extractPdfMaterial.ts - AI provider
server/ai.ts
Other components
- Learner
Connections 12
- Learner → Route entry: opens
- Route entry → Ustaz interface: routes default
- Route entry → Service context: provides services
- Service context → Game studio UI: supplies operations
- Game studio UI → Game creation: creates game
- Game studio UI → Game fixes: submits fix
- Game studio UI → Game launch: launches game
- Game studio UI → Game export: exports game
- Game studio UI → Game records: loads game
- Lab game loading → Labs API client: fetches labs
- API application → Material extraction: dispatches extraction
- API application → Game generation: dispatches generation