fossasia/loungemesh

Spatial video lounge for informal, hallway-style interactions.

TypeScript

1,479

200 commits

updated Oct 12, 2026

See the code

README

LoungeMesh

Spatial video lounge for informal online and hybrid events — move freely in a shared 2D space with proximity-based audio. Built for Eventyay integration and self-hosted Jitsi.

Documentation: docs.loungemesh.com — built with TypeDoc + VitePress, deployed via GitHub Actions to GitHub Pages. See Publishing docs.


Features

  • Spatial Video & Audio: Move freely as an avatar in a 2D room with real-time audio attenuation computed off-thread via Web Audio API and Web Workers.
  • Collaborative Whiteboard: Infinite canvas with pen, eraser, shapes, color palettes, pan/zoom navigation, and live multi-user synchronization.
  • Shared Session Notes: Live collaborative markdown notes with optional templates, host broadcasting, and persistent state.
  • Live Polling: Create instant single/multi-choice polls, collect anonymous votes, and publish real-time results.
  • Stage Presentation Mode: Spotlight speakers on stage with elevated video resolution and full-screen desktop screensharing.
  • Room Access Control: Configurable host claiming, moderator promotion, room join PIN protection, lobby admission, and participant permission grants.
  • Event Scheduling & Calendar Sync: Schedule rooms with recurring rules and synchronize events directly to Google Calendar with AES-256 encrypted OAuth.
  • Ultra-Low Resource Scaling:
    • Spatial viewport culling: only streams video for visible or on-stage peers; zero video bandwidth consumed for off-screen peers.
    • Efficient resolution budgeting: 360p avatar camera, 720p @ 15–30 fps screenshare.
    • Single-roundtrip /api/meetings/state/:roomName/init endpoint bundling room state, role verification, notes, polls, whiteboard, and background.
    • Nginx rate-limiting (50 r/s burst 100) with client real-IP forwarding (X-Forwarded-For).
    • Prosody rate limiting (128 kb/s) and expanded stanza buffer (25 unacked stanzas).
    • Database connection pooling configured for high concurrency.

Architecture & Stack

LayerTechnologies
Frontend SPAVue 3, TypeScript, Vite, Pinia, Web Audio API, Web Workers
Media Enginelib-jitsi-meet (headless WebRTC, no iframe API)
Backend APINode.js, Express, TypeScript, Prisma ORM, PostgreSQL, Redis
Media ServerJitsi Videobridge (JVB), Prosody XMPP, Jicofo
InfrastructureDocker Compose, Nginx (reverse proxy, Brotli/gzip compression, CSP headers)

Quick Start

Spins up the full stack: LoungeMesh SPA, Backend API, PostgreSQL, Redis, and Jitsi media containers.

# 1. Install dependencies and initialize environment
npm run setup

# 2. Start all Docker containers
npm run docker:up

Note: Use 127.0.0.1 for local smoke testing; some systems resolve localhost to IPv6 first which may reset mapped container ports.

Option 2: Local Development Mode

Run the frontend SPA and backend API server locally with hot-reloading:

# Install root and backend dependencies
npm install
npm --prefix server install

# Initialize .env file (auto-detects local LAN IP)
npm run setup

# Run backend migrations
npm --prefix server run prisma:migrate -- --name init

# Start development servers
npm run dev                    # Frontend Vite dev server (port 5173)
npm --prefix server run dev    # Backend Express API server (port 5000)

Scripts Reference

CommandDescription
npm run devRun Vite development server for the Vue SPA
npm run buildBuild production SPA bundle to dist/
npm testRun Vitest unit tests with 100% code coverage enforcement
npm run typecheckRun vue-tsc type-check across .ts and .vue files
npm run docs:devRun local VitePress documentation server
npm run docs:buildBuild TypeDoc API reference and VitePress documentation
npm run docs:previewPreview built documentation site locally
npm run test:e2eRun Playwright end-to-end integration tests
npm run setupGenerate .env from template and detect LAN IP (loungemesh.sh dev)
npm run docker:upLaunch full stack in Docker Compose
npm run deployRebuild and deploy Docker stack on server (loungemesh.sh deploy)
npm run fix:jvbRe-advertise public IP on a running JVB instance

Production server provisioning uses ./scripts/loungemesh.sh bootstrap — see Deployment Guide.

Contributor & AI Agent Workflow (Pre-PR & Commit Requirements)

[!IMPORTANT] Mandatory Quality Gates Before Committing or Submitting a Pull Request:

  1. All READMEs & AI Skills Must Be Updated: Whenever introducing or modifying user flows, features, or architectural components, all README files (README.md, server/README.md) and all AI skills in .agents/skills/ MUST be updated to reflect the newer user flows, API contracts, and testing instructions.
  2. Vitest 100% Code Coverage: Run npm test — all test files must pass with strict 100% statement, branch, function, and line coverage.
  3. E2E Integration Testing: Run npm run build && npm run test:e2e — all Playwright end-to-end integration tests must pass cleanly.
  4. Typechecks & Server Builds: npm run typecheck and npm --prefix server run build must compile with zero errors.

1. Mandatory Pre-Commit & Pre-PR Testing

  • Vitest Unit Test Suite & Coverage:
    npm test
    
    Must pass across all test files with 100% statement, branch, function, and line coverage enforced by @vitest/coverage-v8.
  • E2E Integration Tests:
    npm run build && npm run test:e2e
    
    Playwright smoke and integration tests must pass cleanly.
  • TypeScript & Server Checks:
    npm run typecheck
    npm --prefix server run build
    
    Zero TypeScript compiler errors in both frontend (vue-tsc) and backend (tsc).
  • Documentation Build:
    npm run docs:build
    
    VitePress documentation and TypeDoc API references must compile with zero broken links or markdown errors.

2. Documentation & Agent Skills Maintenance

Whenever introducing or modifying user flows, features, or architectural components:


License

See LICENSE.md.

fossasia/loungemesh

Spatial video lounge for informal, hallway-style interactions.

TypeScript

1,479

200 commits

updated Oct 12, 2026

See the code

README

LoungeMesh

Spatial video lounge for informal online and hybrid events — move freely in a shared 2D space with proximity-based audio. Built for Eventyay integration and self-hosted Jitsi.

Documentation: docs.loungemesh.com — built with TypeDoc + VitePress, deployed via GitHub Actions to GitHub Pages. See Publishing docs.


Features

  • Spatial Video & Audio: Move freely as an avatar in a 2D room with real-time audio attenuation computed off-thread via Web Audio API and Web Workers.
  • Collaborative Whiteboard: Infinite canvas with pen, eraser, shapes, color palettes, pan/zoom navigation, and live multi-user synchronization.
  • Shared Session Notes: Live collaborative markdown notes with optional templates, host broadcasting, and persistent state.
  • Live Polling: Create instant single/multi-choice polls, collect anonymous votes, and publish real-time results.
  • Stage Presentation Mode: Spotlight speakers on stage with elevated video resolution and full-screen desktop screensharing.
  • Room Access Control: Configurable host claiming, moderator promotion, room join PIN protection, lobby admission, and participant permission grants.
  • Event Scheduling & Calendar Sync: Schedule rooms with recurring rules and synchronize events directly to Google Calendar with AES-256 encrypted OAuth.
  • Ultra-Low Resource Scaling:
    • Spatial viewport culling: only streams video for visible or on-stage peers; zero video bandwidth consumed for off-screen peers.
    • Efficient resolution budgeting: 360p avatar camera, 720p @ 15–30 fps screenshare.
    • Single-roundtrip /api/meetings/state/:roomName/init endpoint bundling room state, role verification, notes, polls, whiteboard, and background.
    • Nginx rate-limiting (50 r/s burst 100) with client real-IP forwarding (X-Forwarded-For).
    • Prosody rate limiting (128 kb/s) and expanded stanza buffer (25 unacked stanzas).
    • Database connection pooling configured for high concurrency.

Architecture & Stack

LayerTechnologies
Frontend SPAVue 3, TypeScript, Vite, Pinia, Web Audio API, Web Workers
Media Enginelib-jitsi-meet (headless WebRTC, no iframe API)
Backend APINode.js, Express, TypeScript, Prisma ORM, PostgreSQL, Redis
Media ServerJitsi Videobridge (JVB), Prosody XMPP, Jicofo
InfrastructureDocker Compose, Nginx (reverse proxy, Brotli/gzip compression, CSP headers)

Quick Start

Spins up the full stack: LoungeMesh SPA, Backend API, PostgreSQL, Redis, and Jitsi media containers.

# 1. Install dependencies and initialize environment
npm run setup

# 2. Start all Docker containers
npm run docker:up

Note: Use 127.0.0.1 for local smoke testing; some systems resolve localhost to IPv6 first which may reset mapped container ports.

Option 2: Local Development Mode

Run the frontend SPA and backend API server locally with hot-reloading:

# Install root and backend dependencies
npm install
npm --prefix server install

# Initialize .env file (auto-detects local LAN IP)
npm run setup

# Run backend migrations
npm --prefix server run prisma:migrate -- --name init

# Start development servers
npm run dev                    # Frontend Vite dev server (port 5173)
npm --prefix server run dev    # Backend Express API server (port 5000)

Scripts Reference

CommandDescription
npm run devRun Vite development server for the Vue SPA
npm run buildBuild production SPA bundle to dist/
npm testRun Vitest unit tests with 100% code coverage enforcement
npm run typecheckRun vue-tsc type-check across .ts and .vue files
npm run docs:devRun local VitePress documentation server
npm run docs:buildBuild TypeDoc API reference and VitePress documentation
npm run docs:previewPreview built documentation site locally
npm run test:e2eRun Playwright end-to-end integration tests
npm run setupGenerate .env from template and detect LAN IP (loungemesh.sh dev)
npm run docker:upLaunch full stack in Docker Compose
npm run deployRebuild and deploy Docker stack on server (loungemesh.sh deploy)
npm run fix:jvbRe-advertise public IP on a running JVB instance

Production server provisioning uses ./scripts/loungemesh.sh bootstrap — see Deployment Guide.

Contributor & AI Agent Workflow (Pre-PR & Commit Requirements)

[!IMPORTANT] Mandatory Quality Gates Before Committing or Submitting a Pull Request:

  1. All READMEs & AI Skills Must Be Updated: Whenever introducing or modifying user flows, features, or architectural components, all README files (README.md, server/README.md) and all AI skills in .agents/skills/ MUST be updated to reflect the newer user flows, API contracts, and testing instructions.
  2. Vitest 100% Code Coverage: Run npm test — all test files must pass with strict 100% statement, branch, function, and line coverage.
  3. E2E Integration Testing: Run npm run build && npm run test:e2e — all Playwright end-to-end integration tests must pass cleanly.
  4. Typechecks & Server Builds: npm run typecheck and npm --prefix server run build must compile with zero errors.

1. Mandatory Pre-Commit & Pre-PR Testing

  • Vitest Unit Test Suite & Coverage:
    npm test
    
    Must pass across all test files with 100% statement, branch, function, and line coverage enforced by @vitest/coverage-v8.
  • E2E Integration Tests:
    npm run build && npm run test:e2e
    
    Playwright smoke and integration tests must pass cleanly.
  • TypeScript & Server Checks:
    npm run typecheck
    npm --prefix server run build
    
    Zero TypeScript compiler errors in both frontend (vue-tsc) and backend (tsc).
  • Documentation Build:
    npm run docs:build
    
    VitePress documentation and TypeDoc API references must compile with zero broken links or markdown errors.

2. Documentation & Agent Skills Maintenance

Whenever introducing or modifying user flows, features, or architectural components:


License

See LICENSE.md.

Significant stargazers

Nikit Bhandari

298 followers · starred Dec 2017

Nupur Baghel

136 followers · starred Feb 2018

Devansh Batra

107 followers · starred Sep 2018

Paavini Nanda

108 followers · starred Feb 2018