Pairline is not designed as a demo platform—it is engineered for scalability and production use. It is a real-time chat application capable of handling thousands of concurrent connections seamlessly. The platform includes a comprehensive feature set, such as chat moderation, an administrative dashboard, video and text communication, interest-based user matching with intelligent fallback mechanisms, AI-driven moderation, bot integration, and more.
Note: New to the project? Read the Developer Onboarding Guide first for a high-level architectural overview and daily development workflows before running these commands!
This project runs as four app services plus Redis and Postgres:
frontend/client: React + Vite chat app onhttp://localhost:5173frontend/admin: React + Vite admin app onhttp://localhost:5174backend/elixir/omegle_phoenix: Phoenix websocket/matchmaking service onhttp://localhost:8080backend/golang: Go public/admin services, with the legacy combined binary onhttp://localhost:8082redis: local Redis Cluster seed nodes onlocalhost:7000throughlocalhost:7005postgres: moderation data onlocalhost:5432
- Node.js 20+
- Go 1.21+
- Elixir 1.17+ with Erlang/OTP 26+
- Docker with Docker Compose, or local Redis 7+ and PostgreSQL 15+
Using the checked-in Docker cluster stack:
docker compose -f docker/docker-compose.yml up -d redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5 redis-node-6 redis-cluster-init postgresOr start local services manually with a Redis Cluster available on the ports above.
Backend environment variables are documented in ENVIRONMENT.md (Phoenix + Go consolidated reference).
Frontend:
cd frontend/client
cp .env.example .envOptional admin frontend:
cd frontend/admin
cp .env.example .envPhoenix backend:
cd backend/elixir/omegle_phoenix
cp .env.example .envGo backend:
cd backend/golang
cp .env.example .envMinimum values to review:
frontend/client/.envVITE_API_URL=http://localhost:8082VITE_WS_URL=ws://localhost:8080/ws
frontend/admin/.envVITE_API_URL=http://localhost:8082VITE_ADMIN_BASE_PATH=/
backend/elixir/omegle_phoenix/.envSECRET_KEY_BASESHARED_SECRETCORS_ORIGINSTRUSTED_PROXY_CIDRSADMIN_STREAMMATCH_EVENT_STREAMMATCH_FRONTIER_SIZEMATCH_SHARD_COUNTMATCH_RELAXED_WAIT_MSMATCH_OVERFLOW_WAIT_MS
backend/golang/.envPOSTGRES_*JWT_SECRETSHARED_SECRETROOT_ADMIN_PASSWORDCORS_ORIGINTRUSTED_PROXY_CIDRSBAN_SYNC_INTERVAL_SECONDS
SHARED_SECRET should match across the backend services.
Notes:
- Phoenix matchmaking now uses exact-interest queues, relaxed interest tiers, and frontier-limited queue scans.
MATCH_FRONTIER_SIZEcontrols how much of each queue head is searched per pass,MATCH_SHARD_COUNTcontrols relaxed/random shard fanout,MATCH_RELAXED_WAIT_MScontrols when users can relax out of exact-interest buckets, andMATCH_OVERFLOW_WAIT_MScontrols when they can fall back to broad random matching. - Phoenix shard coordination now uses a Redis Stream.
MATCH_EVENT_STREAMcontrols the stream name, whileMATCH_SWEEP_INTERVAL_MSandMATCH_SWEEP_STALE_AFTER_MStune the slower stale-queue safety sweep. - Phoenix admin moderation fanout now uses a Redis Stream by default for durable cross-node coordination.
ADMIN_STREAMcontrols the stream name. - The Go service now does startup ban reconciliation by default. Set
BAN_SYNC_INTERVAL_SECONDSto a positive value only if you want periodic full resyncs.
Frontend:
cd frontend/client
npm installOptional admin frontend:
cd frontend/admin
npm installPhoenix backend:
cd backend/elixir/omegle_phoenix
mix deps.getGo backend:
cd backend/golang
go mod downloadPhoenix backend:
cd backend/elixir/omegle_phoenix
mix phx.serverGo backend:
cd backend/golang
go run .Optional split-binary flow:
cd backend/golang
go run ./cmd/public
go run ./cmd/adminFrontend:
cd frontend/client
npm run devAdmin frontend:
cd frontend/admin
npm run dev- Chat frontend: open
http://localhost:5173 - Admin frontend: open
http://localhost:5174 - Phoenix health:
http://localhost:8080/api/health - Go health:
http://localhost:8082/health
If you are using the Docker stack through Nginx instead of running the services
directly on the host, note that /api/health and /health are intentionally
not exposed publicly. Use the authenticated admin infra endpoint or inspect the
services from inside the Docker network.
Frontend:
cd frontend/client
npm run build
npm run lintAdmin frontend:
cd frontend/admin
npm run build
npm run lintGo backend:
cd backend/golang
GOCACHE=/tmp/go-build go test ./...Phoenix backend:
cd backend/elixir/omegle_phoenix
mix compile
mix test