Getting Started
Clone to running in two minutes
Prerequisites
- Node ≥ 20, pnpm 9 (
corepack enablehandles it) - Nothing else. No Postgres, no Docker.
Run everything
pnpm install
pnpm dev # turbo runs all apps| App | URL |
|---|---|
| Web | http://localhost:3000 |
| API | http://localhost:3001 |
| API reference (Scalar) | http://localhost:3001/docs |
| Docs (this site) | http://localhost:3003 |
Or run one app: pnpm dev --filter=api.
Environment
Local dev needs no env vars — sane defaults and an embedded database cover everything. To override, copy the example:
cp apps/api/.env.example apps/api/.env| Variable | Required | Purpose |
|---|---|---|
PORT | no (3001) | API port |
DATABASE_URL | prod only | Real Postgres; unset = embedded PGlite in .data/pglite |
BETTER_AUTH_SECRET | prod only | Session signing — openssl rand -base64 32 |
BETTER_AUTH_URL | no | Public URL of the API |
CORS_ORIGINS | no | Comma-separated allowed origins |
DISCORD_WEBHOOK_URL | no | Event feed → Discord (setup) |
DISCORD_BOT_TOKEN, DISCORD_GUILD_ID | no | Only for pnpm discord:setup |
STEAM_WEB_API_KEY, STEAM_APP_ID | no | Achievement mirroring (setup) |
Day-to-day commands
pnpm test # all tests (in-memory Postgres, fast)
pnpm turbo run check-types lint # static gates
pnpm --filter api db:generate # regenerate migrations after schema edits
pnpm --filter api discord:setup # build out the Discord serverThe game repo
The actual game lives at dougwithseismic/thisisbeinghuman-rust (locally ../Factorio-2 — Rust workspace: sim → render → game → native/web shells). Its own CLAUDE.md and docs/ drive that work — nothing in this repo builds the game.