Skip to content

zeeshan2k2/Spatial-Tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spatial Tutor

Spatial Tutor is a visionOS learning application that combines immersive whiteboards, real-time voice interaction, profile-based personalization, and persistent app data.

Overview

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.

Features

  • 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

Screenshots

Welcome

Spatial Tutor welcome screen

Profile Management

Create profile screen Edit profile screen

Learning Sessions

Learning entry screen Session management screen

Spatial Learning Boards

Spatial whiteboard Diagram displayed on a spatial whiteboard

Tech Stack

  • 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

Project Structure

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.

Running the Project

Requirements

  • 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

Setup

  1. Open Spatial Tutor.xcodeproj in Xcode.
  2. Select the Development scheme for local work.
  3. Set ENV_WEBSOCKET_API in Spatial Tutor/Config/Development.xcconfig to your backend WebSocket endpoint.
  4. 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.

Demo and Live Data

Spatial Tutor/Test/TestConfig.swift contains the showcase board switch:

static var loadSampleBoard: Bool = true
  • true loads the sample whiteboard when the immersive space appears.
  • false skips 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.

Current Status

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.

About

An immersive visionOS learning platform with AI-powered voice tutoring, spatial whiteboards, diagrams, and persistent learning profiles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages