How rocksonjerom/simlight_prototype works
SimLight is a multi-tenant simulation authoring and learning platform. Faculty register or sign in, create simulations through manual, AI, or document-based workflows, then publish or assign them; learners access public play routes, make decisions, and receive reports. A second, round-based V2 experience has its own builder and decision engine. The server provides authentication, generation, session and scoring APIs, backed by SQLite by default or optional PostgreSQL. The README documents tenancy and role-based access; some UI-to-API links are inferred from API capabilities rather than inspected call sites.
Main entry points: App.tsx Application routes · client.ts API client · routes.ts Simulation API · index.ts Store dispatcher
Components 23
Access and catalog
- Application routes
src/App.tsx - Auth context
src/context/AuthContext.tsx - Simulation catalog
src/pages/BrowsePage.tsx
Simulation authoring
- Creator workflow
src/pages/CreatorPage.tsx - Simulation state
src/context/SimulationContext.tsx - Content editor
src/components/content/ContentBlockEditor.tsx - V2 builder
src/components/v2/builder/V2SimulationBuilder.tsx
Play and reporting
- Learner player
src/pages/LearnerPlayerPage.tsx - V2 player
src/pages/v2/V2PlayPage.tsx - V2 decision engine
src/engine/v2Engine.ts - Performance reports
src/pages/PerformanceReportPage.tsx
Server services
- API client
src/api/client.ts - Simulation API
server/routes.ts - Authentication API
server/auth/routes.ts - Auth middleware
server/auth/middleware.ts - LLM providers
server/llm/providers.ts - Scoring service
server/services/scoring.ts - Platform management
server/platform/routes.ts
Persistence
- Store dispatcher
server/store/index.ts - SQLite database
server/database.ts - PostgreSQL store
server/pg/store.ts
Other components
- Faculty
- Learner
Connections 25
- Faculty → Application routes: opens
README.md - Learner → Application routes: opens public play
README.md - Application routes → Auth context: wraps routes
src/App.tsx - Application routes → Simulation catalog: routes to
src/App.tsx - Application routes → Creator workflow: routes to
src/App.tsx - Application routes → Learner player: routes to
src/App.tsx - Application routes → V2 player: routes to
src/App.tsx - Application routes → Performance reports: routes to
src/App.tsx - Creator workflow → Simulation state: edits state
- Simulation state → API client: requests generation
src/context/SimulationContext.tsx - Content editor → API client: saves content
src/components/content/ContentBlockEditor.tsx - V2 builder → API client: saves simulation
- V2 player → V2 decision engine: applies decisions
- Performance reports → API client: requests report
src/pages/PerformanceReportPage.tsx - Auth context → API client: uses API
src/context/AuthContext.tsx - API client → Authentication API: HTTP requests
src/api/client.ts - API client → Simulation API: HTTP requests
src/api/client.ts - Simulation API → LLM providers: generates content
server/routes.ts - Simulation API → Scoring service: scores decisions
server/routes.ts - Simulation API → Store dispatcher: reads and writes
server/routes.ts - Authentication API → Store dispatcher: manages accounts
server/auth/routes.ts - Simulation API → Auth middleware: protects routes
server/routes.ts - Store dispatcher → SQLite database: dispatches SQLite
server/store/index.ts - Store dispatcher → PostgreSQL store: dispatches PostgreSQL
server/store/index.ts - Platform management → Store dispatcher: uses store
server/platform/routes.ts