Velocity GP is a TypeScript monorepo for a multi-day endurance game experience. It includes a React web app, an Express BFF API, shared API contracts/client packages, and shared UI primitives.
apps/
web/ # React + Vite frontend
api/ # Express BFF + Prisma
packages/
api-contract/ # Shared endpoints, schemas, contracts, domain types
api-client/ # Reusable typed HTTP client
ui/ # Shared React UI primitives
config-typescript/ # Shared TS config presets
docs/ # Product, architecture, design, and contribution docs
- Node.js 18+
- npm 9+
- Docker (for local Postgres)
- Install dependencies:
npm install- Create local env files:
cp .env.example .env.local
cp apps/api/.env.example apps/api/.env- Start local Postgres:
docker compose up -dDefault local database from docker-compose.yml:
- host:
localhost - port:
16432 - user:
postgres - password:
postgres - db:
velocitygp
- Run Prisma migrations and seed data:
npm run db:deploy
npm run db:seed- Start development:
npm run devLocal URLs:
- Web:
http://localhost:5173 - API:
http://localhost:4000 - API prefix:
/api
Root scripts:
npm run dev- run all workspaces in watch modenpm run dev:web- run contract/client/ui + web onlynpm run dev:api- run contract + api onlynpm run build- build all workspacesnpm run build:web- build web-related workspacesnpm run build:api- build api-related workspacesnpm run lint- lint all workspacesnpm test- run tests across workspacesnpm run test:api:unit- run API unit testsnpm run test:api:integration- run API integration testsnpm run test:web:unit- run web unit testsnpm run test:web:component- run web component testsnpm run test:web:e2e- run web end-to-end tests (Playwright)npm run format- formatapps/webnpm run db:generate- generate Prisma clientnpm run db:deploy- apply migrationsnpm run db:migrate- create/apply dev migrationnpm run db:studio- open Prisma Studionpm run db:seed- seed local database
Health routes:
GET /healthGET /ready
API routes are mounted under /api and currently include:
- Events:
/events,/events/current,/events/:eventId - Game:
/events/:eventId/players/:playerId/race-state,/events/:eventId/players/:playerId/hazard-status,/events/:eventId/leaderboard - Players:
/players,/players/:playerId - Teams:
/teams,/teams/:teamId,/teams/:teamId/join,/teams/:teamId/members - Hazards:
/hazards/scan,/hazards/:hazardId,/events/:eventId/hazards - Rescue:
/rescue/initiate,/rescue/:playerId/status,/rescue/:playerId/complete - Scans:
/events/:eventId/scans - Admin (guarded by
requireAdmin):/admin/session,/admin/events/:eventId/race-control,/admin/events/:eventId/teams/:teamId/pit-control,/admin/users/:userId/helios-role,/admin/events/:eventId/audits
- Development workflow: DEVELOPMENT.md
- Docs index: docs/README.md
- Product spec: Velocity GP BDD Specifications
- Architecture overview: RepoStructure
- Planned stack direction: Tech Stack Needed
- Observability: observability.md
- Contributing: CONTRIBUTING.md
Thank you to everyone who has contributed to Velocity GP.
|
Neer Patel |
Daniel Grant |
Ryan Milton |
jn-anki |
MiloWical |
See the full list: Contributors Graph.
- The API uses shared contracts/schemas from
packages/api-contract. - Env loading for API supports repo-level and package-level
.env/.env.localfiles. - Do not commit local env files.