Spatial Tutor is a visionOS learning application that combines immersive whiteboards, real-time voice interaction, profile-based personalization, and persistent app data.
The project explores how conversational tutoring can work inside a spatial interface. Learners can manage profiles, organize learning sessions, enter a fully immersive classroom, speak to a tutor through a WebSocket-backed audio workflow, and receive board content containing formatted text, code, equations, and Mermaid diagrams.
The client is built with SwiftUI and The Composable Architecture. SwiftData stores profile and app data, while TCA reducers coordinate navigation, persistence, audio, WebSocket events, and whiteboard state.
- Native visionOS windows and a fully immersive learning space
- Create, edit, select, and delete learner profiles
- SwiftData-backed profile and app-state persistence
- Session and subject browsing, creation, and editing
- Real-time microphone audio streaming over WebSockets
- Streaming audio playback and speech controls
- Multi-page spatial whiteboards with two-column layout
- Board blocks for Markdown-style text, code, LaTeX equations, and Mermaid diagrams
- TCA-based state management and dependency injection
- Demo board, session, and summary data for showcasing the interface
- Language: Swift
- UI: SwiftUI
- Platform: visionOS 26.2+
- Architecture: The Composable Architecture 1.23+
- Persistence: SwiftData
- Networking: URLSession WebSockets
- Audio: AVFoundation
- Equations: SwiftMath
- Diagrams: Mermaid rendered in a
WKWebView
Spatial Tutor/
├── App/ # App entry point, routing, and profile views
├── Config/ # Development and production configuration
├── Core/ # WebSocket, audio, DTO, and utility code
├── Domain/ # Profiles, sessions, boards, and block models
├── Features/ # TCA features and visionOS views
│ ├── Content/
│ ├── ImmersiveSpace/
│ ├── SessionSelector/
│ └── SessionSummary/
├── Persistence/ # SwiftData models, mappings, and persistence client
├── Support/ # Showcase data and sample board content
└── Test/ # Runtime demo flags
The repository also contains the Xcode project, screenshots, and a local RealityKit content package.
- Xcode with the visionOS 26.2 SDK or newer
- Apple Vision Pro or the visionOS simulator
- A compatible tutoring WebSocket backend for live voice and board updates
- Open
Spatial Tutor.xcodeprojin Xcode. - Select the Development scheme for local work.
- Set
ENV_WEBSOCKET_APIinSpatial Tutor/Config/Development.xcconfigto your backend WebSocket endpoint. - Choose an Apple Vision Pro simulator or device and run the app.
Swift Package Manager resolves TCA and SwiftMath automatically. Mermaid diagrams load their renderer from jsDelivr, so diagram rendering requires network access.
Spatial Tutor/Test/TestConfig.swift contains the showcase board switch:
static var loadSampleBoard: Bool = truetrueloads the sample whiteboard when the immersive space appears.falseskips the sample board; live board updates can then arrive from the configured WebSocket backend after a voice session is started.
The session browser and session summaries currently use SampleData independently of this switch. Profile data is persisted with SwiftData, while session and subject edits currently remain in memory for the running app session.
Spatial Tutor is a functional visionOS application with an implemented immersive board, audio pipeline, WebSocket client, profile persistence, and TCA feature structure. The AI service runs outside this repository, while included showcase data makes the session catalog and summary screens easy to demonstrate without a live learning history.






