Technology stack
Everything the platform is built with, and the exact shape it ships in. One monorepo produces six deployable artifacts from a single Dockerfile; every version below is pinned by the repository's lockfile, not by convention.
Languages and runtime
| Layer | Technology | Version |
|---|---|---|
| Runtime | Node.js | ≥ 26 |
| Language | TypeScript, strict | 5.9 |
| Package manager | pnpm workspaces (hoisted) | 11.x |
| Task runner | Turborepo | 2.10 |
TypeScript is strict everywhere: any and unknown are banned by lint, and
every class, function and method carries JSDoc — enforced by ESLint as part
of the build, so an undocumented function fails compilation, not review.
Backend
| Concern | Technology | Version |
|---|---|---|
| Framework | NestJS | 11 |
| API | GraphQL (Apollo Server) | Apollo 5, graphql 16.13 |
| Database | MongoDB (Mongoose ODM) | Mongoose 8; MongoDB 7+ |
| Feed transport | RabbitMQ (amqplib) — LSports STM | 0.10 |
| Object storage | Any S3-compatible API | MinIO in dev; Spaces/S3 in prod |
| Transactional email | SMTP (nodemailer) — Mailtrap in production | nodemailer 6 |
| Login captcha | Cloudflare Turnstile on the back-office login | optional — off until keys are set |
The sports data provider is LSports (PreMatch and InPlay feeds over RabbitMQ). The connection lives in exactly one process — see Architecture for why.
Player email (verification links and the like) goes out over plain SMTP
through a provider-agnostic adapter, so any SMTP service works — production
runs on Mailtrap. With MAIL_HOST unset the api
writes each mail to its log instead, which is how local development reads a
verification link without a mail server.
Frontend
| Surface | Technology | Version |
|---|---|---|
| UI library | React | 19 |
| Sportsbook widget | Vite + Tailwind, shipped as a web component (Shadow DOM) | Vite 7, Tailwind 3.4 |
| White-label site | Next.js (server-rendered, one deployment serves every operator domain) | Next 16 |
| Back-office UI | React + Vite + Tailwind, served by its own NestJS process | Vite 7, Tailwind 4 |
| Documentation | Docusaurus (static, trilingual) | 3.10 |
The six deployables
One Dockerfile, one build stage per target, driven together by one
docker-compose.yml:
| Target | Process | Port | Role |
|---|---|---|---|
api | NestJS | 3000 | Betting core: GraphQL + REST, wallets, settlement, cashout |
admin | NestJS + built React UI | 3100 | Back-office: tenants, users, roles, content, platform settings |
feed | NestJS (no HTTP) | — | LSports consumer: catalog and settlement facts. Exactly one instance |
cdn | nginx | 80 | The embeddable widget bundle, static |
site | Next.js | 3002 | White-label host: renders each operator's published site on its own domain |
docs | nginx | 80 | This documentation, static |
All six are Docker images: multi-stage builds on a node:26-alpine base,
with the static targets (cdn, docs) shipping on nginx:alpine.
docker-compose.yml runs them as one deployment alongside MinIO; MongoDB
runs on its own server and is reached through MONGO_URI —
Self-hosting is the ordered path through it.
Quality gates
- Tests: Jest for the NestJS halves, Vitest for the browser workspaces (widget, admin UI, site client, template kit) — each half tested in the pipeline it actually ships through.
- Lint: ESLint 9 flat config; the JSDoc rules and the typing rules are
build-breaking by design (
prebuildruns lint in every workspace). - Deploy: a push to a branch deploys its environment directly through the
deploy platform's auto deploy; there is no CI stage. The full test and build
suite runs locally before every push, and
mainreceives only what already passed on the work branch.