How ajlrza/immersia works
Immersia is a web application for creating and interacting with persistent, generative simulated worlds. The visible client workflow presents a landing page and an interactive world interface; its request service validates structured state and prompt payloads before sending them over a WebSocket. The engine entry point chooses a router and returns world, avatar, position, and metadata. The README also describes LLM-generated narrative/context and persistence. Several storage, state-management, transport, and server modules are present, but their runtime connections are not established by the sampled excerpts, so those links are omitted or marked unverified.
Main entry points: main.py Engine entry · router.py Model and payload router · main_dc.py Engine state schema · engine_request.ts Request and validation
Components 19
Web client
- Landing page
client/react-app/LandingPage.tsx - World interface
client/react-app/App.tsx - Request and validation
client/services/engine_request.ts - Canvas rendering
client/services/render.ts - World payload types
client/types/state_types.ts
World engine
- Engine entry
engine/main.py - Model and payload router
engine/llm_router/router.py - LLM provider calls
engine/llm_router/llm.py - Engine state schema
engine/state_dataclasses/main_dc.py - Provider configuration store
engine/llm_router/storage/store.py
State and persistence
- State hypervisor
engine/state_hypervisor/hypervisor.py - State construction and tree
engine/state_manager - State compression
engine/state_compressor/compress.py - State database
engine/state_db/db.py - LMDB state data
engine/state_dataclasses/lmdb_dc.py
Service infrastructure
- Server API
server/server.ts - Service monitor
server/services/monitor.ts - Transport server
transport/cmd/server/main.go
Other components
- World user
Connections 15
- World user → Landing page: starts at
- World user → World interface: interacts with
client/react-app/App.tsx - Landing page → Request and validation: submits prompt
client/react-app/LandingPage.tsx - Request and validation → World payload types: validates payload
client/services/engine_request.ts - World interface → Canvas rendering: resets canvas
client/react-app/App.tsx - Request and validation → Engine entry: sends request
- Engine entry → Model and payload router: routes payload
engine/main.py - Engine entry → Engine state schema: types payload
engine/main.py - Engine entry → State hypervisor: initializes
engine/main.py - Model and payload router → Provider configuration store: reads configuration
engine/llm_router/router.py - Model and payload router → Engine state schema: uses schema
engine/llm_router/router.py - Model and payload router → LLM provider calls: dispatches provider call
- State hypervisor → Engine state schema: uses state types
engine/state_hypervisor/hypervisor.py - Server API → Service monitor: uses monitoring
server/server.ts - Engine state schema → LMDB state data: references metadata
engine/state_dataclasses/main_dc.py