Loci is a study-to-spatial-memory app. It turns imported study material into concept objects, generates 3D assets for those concepts, and places them inside a preloaded room so the user can review information as a visual memory palace.
- Imports study material from pasted text or PDFs
- Extracts concepts and stores them in MongoDB
- Generates metaphor-backed object prompts for each concept
- Calls a 3D generation pipeline to create GLB assets
- Loads a room scan plus room anchors in a Three.js viewer
- Places generated objects into the room and lets the user inspect what each object represents
- TanStack Start
- React
- Three.js
- Auth0
- MongoDB Atlas
- RunPod
- Cloudflare R2
- Zod
- Vite
- TanStack Start for the full-stack app shell
- React for UI
- Three.js for the room viewer and object interaction
- Spark
SplatMeshfor room splat rendering
- TanStack server functions for client-callable backend actions
- Auth0 / OpenID Connect for authentication
- MongoDB Atlas for rooms, concepts, metaphors, and asset metadata
- Zod for request and payload validation
- Durable object storage for generated GLBs and previews
- Same-origin asset proxying for browser-safe model loading in the viewer
The generation pipeline is concept-first, then metaphor-first, then asset-first.
- Study material is imported.
- Concepts are extracted from text or PDFs.
- Concepts are persisted into the active room.
- A metaphor layer chooses a concrete stand-in object for each concept.
- The 3D generation service creates a model for that metaphor.
- The generated asset is uploaded to durable storage.
- The viewer fetches ready assets and places them into the room.
- Concept extraction: local parsing and feature server logic
- Metaphor generation: room/concept server pipeline with deterministic fallback behavior
- 3D generation provider: TRELLIS via
@gradio/client - Asset upload/storage: S3-compatible object storage
- Asset delivery: proxied GLB loading into the Three.js viewer
For each concept, the app can store:
- the concept label
- the concept description
- the generated metaphor object name
- the metaphor rationale when one exists
- the generated 3D asset URL
- the preview URL when available
The /play experience is the core MVP surface.
It supports:
- loading a bundled or uploaded room scan (
.spz/.ply) - importing room anchor JSON
- placing generated concept objects into the room
- clicking placed objects to inspect what they represent
src/routes: thin route filessrc/features/<feature>/functions.ts: client-callable server functionssrc/features/<feature>/server: server-only logicsrc/features/<feature>/components: UIsrc/features/<feature>/types.ts: shared feature contractssrc/lib: shared infrastructurepublic/rooms: bundled room scans and matching anchor JSON files
Install dependencies:
vp installStart local development:
vp exec vite devTypecheck:
vp exec tsc --noEmitRun tests:
vp exec vitest run -c vitest.config.tsBuild:
vp exec vite buildCopy .env.example to .env and provide values for the server integrations.
Core variables:
AUTH0_DOMAINAUTH0_CLIENT_IDAUTH0_CLIENT_SECRETAPP_BASE_URLMONGODB_URIMONGODB_DB_NAMESESSION_COOKIE_SECRET
Pipeline-related variables commonly needed for object generation and delivery:
TRELLIS_GRADIO_URLASSET_S3_PUBLIC_BASE_URL- storage credentials required by the S3-compatible upload layer
Client-safe variable:
VITE_APP_NAME