Local Development
How to run the full SkyTalk stack locally — pnpm workspace setup, Docker Compose, database seeding, and mobile mock mode.
This covers running the full stack on your local machine for development. Everything runs in Docker except the mobile app (Expo runs natively).
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Node.js | 20+ | LTS recommended |
| pnpm | 9+ | npm install -g pnpm |
| Docker | 24+ | Docker Compose v2 (docker compose, not docker-compose) |
| Expo Go | Latest | On your iPhone/Android for testing the mobile app |
Monorepo Setup
The project is a pnpm workspace. Install all dependencies from the root once:
This installs deps for all packages: packages/server, packages/mobile, packages/comms, packages/portal, packages/docs.
Server Setup
Create the .env file
Edit it with these values:
The DATABASE_URL host must be db (the Docker Compose service name) when running inside Docker — not localhost.
Start with Docker Compose
Starts two containers:
db— Postgres 16 on port 5432 (internal only)server— Fastify on port 3000
The server container runs prisma db push on startup via entrypoint.sh to sync the schema.
Seed the database
Creates:
- Admin user:
admin/admin - Pilot user:
pilot1/test - Talkgroup: Ground Ops (both users as members)
Get a JWT for API testing
$JWT is per-terminal-session. If you open a new pane (e.g. in zellij), re-run the login command.
Test the WebSocket
Install wscat if needed:
Connect and join a talkgroup:
Send a JOIN_TALKGROUP message:
You should receive a PRESENCE message back immediately.
Stopping and Resetting
After wiping, re-seed with npx tsx prisma/seed.ts.
Viewing Logs
Mobile App
No server needed. MockRelaySocket echoes messages back locally.
Set in packages/mobile/.env.local:
Then:
Scan the QR code with Expo Go.
Docs Site
Opens at http://localhost:3000 (or next available port if 3000 is taken by the server).