Scene 04 · API · 2026
Rethink3D Raffle System — missions, tickets and a draw you can audit
Missions that earn tickets and a draw streamed live over WebSockets, with every result audited.
Draft — copy under review
- Role
- Sole author — API and web.
- Stack
- NestJS 11 · Prisma 5 · PostgreSQL · Socket.IO · Passport JWT · React 19 · Zustand · TanStack Query
- Links

The problem
At events, Rethink3D wanted to engage people walking past the booth — and an improvised draw doesn’t convince anyone it was fair.
What I built
API and web, alone, in five weeks (Jul 10 to Aug 15, 2026, 66 commits):
- participants complete missions — photo proof, quizzes, feedback, referrals, surveys — and earn tickets;
- the admin triggers the draw, streamed live to the big screen and to phones;
- participant, admin and public screens, plus a paired booth kiosk.
Decisions
An auditable draw. Each participant’s weight is proportional to their tickets, and every draw writes a log with a snapshot of participants, weights and the result.
A public gateway with limits. The WebSocket accepts up to 1,000 connections, 10 per IP and messages up to 10 KB.
Campaigns as a state machine. Draft → active → drawing → paused → finished, with no shortcuts between states.
By the numbers
- 66 commits in 5 weeks
- 23 Prisma migrations and 15 modules in the API