Skip to content

Quick Start Tutorial

Go from zero to a working operator integration in 5 minutes. This tutorial uses the white-label scaffolder.

Prerequisites

  • Node.js 20+
  • npm 10+
  • Docker (for PostgreSQL in development)

Step 1: Scaffold Your Operator Project

bash
npx create-ultima-operator

Follow the prompts:

? Operator name: Lucky Seven Gaming
? Brand primary color: #FF6B00
? Coordinator URL: https://api.ultimalotto.com
? Payment provider: transak

This creates a complete project with:

  • React player app (20 screens)
  • Express operator API (30+ endpoints)
  • PostgreSQL via Prisma (11 tables)
  • Docker Compose for local dev

Step 2: Start Development Environment

bash
cd lucky-seven-gaming
docker compose up -d        # Start PostgreSQL
npx prisma migrate deploy   # Create tables
npx prisma db seed          # Load demo data
npm run dev                 # Start API + player app

Your player app is now running at http://localhost:5174 and your API at http://localhost:4000.

Step 3: Register a Test Player

bash
curl -X POST http://localhost:4000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "player@example.com",
    "password": "Test123!",
    "displayName": "Test Player"
  }'

Response:

json
{
  "player": { "id": 1, "email": "player@example.com", "displayName": "Test Player" },
  "tokens": { "accessToken": "eyJ...", "refreshToken": "eyJ..." }
}

Step 4: Purchase a Ticket

bash
curl -X POST http://localhost:4000/api/tickets/purchase \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJ..." \
  -d '{
    "jackpotNumber": 4729156,
    "bonus1": 381047,
    "bonus2": 62914,
    "bonus3": 4207,
    "bonus4": 831,
    "bonus5": 42,
    "isQuickPick": false
  }'

Response:

json
{
  "ticket": {
    "ticketId": "UL-2026-4265-0000001",
    "roundId": 4265,
    "jackpotNumber": 4729156,
    "bonus1": 381047,
    "bonus2": 62914,
    "bonus3": 4207,
    "bonus4": 831,
    "bonus5": 42,
    "status": "active"
  }
}

Step 5: Check Draw Results

After a draw completes, the coordinator sends a webhook to your API. Check a player's tickets:

bash
curl http://localhost:4000/api/tickets \
  -H "Authorization: Bearer eyJ..."

Step 6: Verify a Draw

Visit verify.ultimalotto.com and enter any round ID to see the full cryptographic verification.

Next Steps

Production Deployment

When ready to go live:

  1. Set COORDINATOR_URL=https://api.ultimalotto.com in your environment
  2. Set NODE_ENV=production
  3. Configure your real payment provider keys
  4. Deploy to your preferred cloud provider (Railway, Fly.io, AWS, etc.)
  5. Point your domain to the deployment
  6. Contact operators@ultimaprotocol.com for production API keys