Skip to content

About

The VR classroom experience.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Transcend

CI

v. be or go beyond the range or limits of

A VR environment in which people across geographical boundaries can congregate, move around, explore, and interact as if they were actually together. It's a world that goes beyond traditional boundaries, allowing people from different places, situations, and walks of life to come together to share ideas and experiences.

Why?

Social VR apps like AltSpace and vTime are redefining what it means to hang out with someone(s). Fullstack Academy has chosen Daydream as its VR platform of choice for its Remote Immersive program. However, vTime has only recently added Daydream support, and AltSpace still doesn't natively support Daydream. Both only allow small groups, up to six people/avatars, to join one "room" and hang out with each other.

As Mark Davis, Fullstack's Product Manager, describes in a post about Fullstack's VR Lab:

Here’s what we wish existed, now: a simple VR environment where up to 25 avatars can interact with each other, with real-time voice chat, that’s accessible on a Google Daydream headset as an MVP, but is also extensible to any WebVR enabled headset.

This project serves to address that need. Transcend was built by Joey Darbyshire, Sean McBride, Yoo-Nah Park, and Beth Qiang as their Capstone Project during their Senior Phase at Fullstack Academy.

Demo

Here's our presentation with a demo and discussion of the architecture and the challenges we faced while building it. To try it yourself, follow Installation and run a local build.

Architecture

Transcend is built on Node.js using Socket.io for event-based client-server interaction, WebRTC for real-time audio communication, A-Frame for 3D graphics and scene rendering and WebVR capabilities, and React as a view layer.

Client: Redux holds view/UI state as plain objects (auth, scene-loaded flag, WebRTC peers/media, and config).

Server: Authoritative multiplayer state lives in a plain GameState (user records keyed by socket id). Room membership and the socket registry are socket.io's own — scenes and voice-chat rooms use prefixed socket.io rooms rather than application-level maps. A fixed-rate, room-scoped broadcast loop pushes dirty-room snapshots to clients instead of fanning out on every inbound tick.

Language & tooling: The whole codebase is TypeScript (strict, type-erasable syntax only). Nothing is compiled to run: Node 24 executes the server's .ts files directly via type stripping, esbuild bundles the browser entry (pnpm run build), and Vitest runs the tests. pnpm run typecheck (tsc --noEmit) is the only step that sees the types. Package management is pnpm (packageManager in package.json; enable with corepack enable).

How to Play

Transcend supports keyboard & mouse controls on Chrome 56 or higher on a PC or Mac.

Google Daydream headset & controller integration coming soon.

Keyboard and Mouse Controls

Camera Movement

  • Lock Mouse: Click the 3D Scene
  • Moving your mouse left, right, up, and down turns the camera left, right, up, and down respectively
  • Unlock Mouse: Press ESC

Avatar Movement

  • Walk Forward: W or up arrow
  • Walk Backward: S or down arrow
  • Sidestep Left: A or left arrow
  • Sidestep Right: S or right arrow

Cursor

The ring in the center of your screen represents your cursor, which is your tool for interacting with the world. Certain elements in the world respond to your cursor hovering over a selectable object for one continuous second. An object is responding to your cursor when it glows a translucent blue, similar to an HTML hyperlink.

Teleporters

Teleporters, the floating labeled orbs in all of the rooms, are the way you move between VR scenes. They cause you to leave one scene and enter another. Teleporters can be activated via cursor selection.

Costumes in "The Gap"

In this VR universe, The Gap is where the fashion happens. Hover your cursor over a mannequin wearing an avatar you like for one second to switch your "skin". You should hear a voice confirming that you now are that avatar. Talk about Fast Fashion!

UI Wheel

When you are in game, look down where your feet would be and you'll notice a microphone button. No, it's not for your Reebok Pumps. C'mon, you can't even jump in this world! The button mutes your in-game microphone. Stare at it for a second, and you'll see the button change between recording and muted states. Hope you can hold your sneeze that long!

Installation

To install Transcend on your computer, you will need Node.js 24+ (see .nvmrc / package.json engines), pnpm 11 (via Corepack: corepack enable), and PostgreSQL.

1. Install dependencies

pnpm install

2. Environment

Copy the example env file and edit values as needed:

cp .env.example .env

Important variables (see comments in .env.example for the full list):

Variable Purpose
SESSION_SECRET Signs the session cookie. Required in production — the server refuses to boot without it. In development it falls back to an insecure key with a warning. Generate with openssl rand -hex 32.
DATABASE_URL Postgres connection string for the app (default in .env.example: postgres://localhost:5432/transcend).
DATABASE_TEST_URL Separate database used by pnpm test so force-sync never touches the dev DB (default: postgres://localhost:5432/transcend_test).
PORT HTTP listen port. If unset, the server defaults to 1337. .env.example sets 4000 when you copy it.
CLIENT_ID / CLIENT_SECRET Google OAuth credentials. Required at boot (Passport constructs the Google strategy even if you only use email/password). Dummy placeholders are fine for local password-only use; real values needed for "Log in with Google".

Node loads .env at process start via process.loadEnvFile() (server/load-env.ts). Variables already set in the shell are not overridden.

3. Database

Ensure PostgreSQL is running and reachable at DATABASE_URL.

On server start, prepare() (see db/index.ts):

  • In non-production, creates the database if it does not exist (connects to the same host’s postgres maintenance DB).
  • Runs pending Umzug migrations automatically (migrations/*.ts). You do not need pnpm run migrate for a normal boot.

Optional but recommended for local play — seed demo accounts (password 1234, e.g. [email protected]):

pnpm run seed

Manual migration CLI (usually unnecessary; boot already migrates):

pnpm run migrate        # up
pnpm run migrate:undo   # down one

For the test database, see TESTING.md (createdb transcend_test / DATABASE_TEST_URL).

4. Start the app

pnpm start

pnpm start runs pnpm run build (esbuild → public/bundle.js) then starts the server with file watching. The game is at http://localhost:1337 (or http://localhost:$PORT if PORT is set — e.g. 4000 when using the stock .env.example).

To rebuild without restarting, or run the server alone after a prior build:

pnpm run build
pnpm run server

Scripts

Script What it does
pnpm start Build client bundle, then run the server with --watch
pnpm run build / build-watch / build-prod esbuild client bundle (dev, watch, or minified production)
pnpm run server Server only (node --watch server/index.ts)
pnpm run seed Insert demo users into the database
pnpm run migrate / migrate:undo Apply or undo Umzug migrations
pnpm run lint / lint:fix Biome check (and auto-fix)
pnpm run format Biome format
pnpm run typecheck tsc --noEmit
pnpm test / test-watch / test:coverage Vitest suite (see TESTING.md)

Docker (prod-parity)

A multi-stage Dockerfile and docker-compose.yml run the production build together with Postgres:

docker compose up --build

Then open http://localhost:1337. Compose sets DATABASE_URL, a throwaway SESSION_SECRET, and FORCE_SSL=false so production mode works over plain HTTP without redirect loops or Secure-cookie login failures. Replace the secret before any real deploy; leave FORCE_SSL unset (default on) behind a TLS proxy. The app image healthcheck hits /healthz. Postgres is 14 to match CI.

Deployment: single-instance only

Run exactly one Node server process behind your load balancer / reverse proxy. Several critical pieces of state live in-process only and are not shared across workers:

In-process state Where Multi-instance failure mode
Multiplayer GameState (users / poses) server/socket.ts (new GameState()) Peers on different instances never see each other; room broadcasts stay local
Socket registry & scene/chat rooms socket.io defaults (no Redis adapter) Same as above; single-active-session eviction only sees sockets on this process
Socket event rate limits server/socket-rate-limit.ts (SocketRateLimiter maps) Effective limit becomes N× with N instances
Auth / skin HTTP rate limits server/auth-rate-limit.ts (express-rate-limit MemoryStore) Same N× inflation

Sticky sessions alone do not fix this: game state and socket rooms still do not cross process boundaries. Horizontal scaling would need at least a socket.io adapter (e.g. Redis), a shared game-state store, and shared rate-limit stores — none of which are implemented today. Prefer a single instance (or scale vertically) until that checklist is wired up.

Help

Create an issue or submit a pull request if you need help or find a bug. Contributions and ideas welcome!

About

The VR classroom experience.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages