Running Locally
Prerequisites
- Node.js 20+, pnpm 9 (
packageManagerfield pins it —corepack enablepicks it up automatically) - Docker (for Postgres + Redis, and for a full container run)
The backend, in a few commands
git clone https://github.com/aiyu-ayaan/BetweenUs.git betweenus
cd betweenus
cp .env.example .env
pnpm install
pnpm dev:infra # Postgres + Redis via Docker Compose
pnpm db:generate
pnpm db:migrate
pnpm dev:backend # every service, watch mode
pnpm dev:infra reads .env from infrastructure/docker/, not the repo
root — the script passes --env-file .env for you; running docker compose
by hand without that flag starts every service with empty ${VAR}s.
pnpm dev:backend runs the services only. pnpm dev additionally starts
the desktop renderer on port 5173, which collides with pnpm dev:duo (see
Testing) — use dev:backend when you plan to run dev:duo
alongside it.
Desktop client
pnpm --filter @betweenus/desktop dev
Web client
pnpm dev:web
Serves at http://localhost:5175. The dev server proxies the same routes
the desktop client talks to, minus /api/v1/remote and /ws/remote — the
browser build has no remote-desktop section.
Admin panel
pnpm dev:admin
The first administrator is created from the CLI, not a web form — a page open to the internet that could mint the first admin is a race anyone could win:
pnpm admin:create
Two signed-in windows (chat, voice, presence)
pnpm dev:duo
See Testing for what it sets up and what to try.
Full container stack
cp .env.example .env
pnpm prod:build
pnpm prod:up # pull published images, or:
pnpm prod:up:build # build images locally
See Docker Compose for the service list and networks.
Database
pnpm db:generate # Prisma client
pnpm db:migrate # apply migrations (dev)
pnpm db:seed # seed data
pnpm db:studio # Prisma Studio, browse the data
Android
cd apps/android
./gradlew assembleDebug
Needs JDK 21. local.properties sets betweenus.serverUrl, which is only
a default — the login screen's server picker overrides it at runtime.
Docs site
From the repo root (docs/ is a standalone npm project, not a pnpm
workspace member, so these wrap npm --prefix docs):
pnpm docs:install
pnpm docs # http://localhost:3000, live reload
pnpm docs:build # static site into docs/build/
Or directly:
cd docs
npm install
npm start
npm run build
npm run serve # serve the production build locally
See Docs Deployment for how a !docs commit
publishes this to GitHub Pages.