← Back to projects
Case study 003 · Personal project — consumer platform

Online Lottery Platform

Run prize-draw campaigns and let players verify the results.

ContextPersonal project — consumer platform
TechnologiesNode.js · Express · TypeScript · Vue 3 · MongoDB · Redis
CodeRead access on request
The lottery catalogue: prize pots, categories and live status
The lottery catalogue: prize pots, categories and live status
01 — Problem

Making draw results verifiable

LuckyDraw lets players create accounts, buy tickets and view their participation history. An administration interface manages campaigns, results and statistics. The draw engine uses a commit-reveal mechanism so players can verify the result.

02 — Constraints

Verifying draws and representing amounts

Players need to be able to verify the result using information published by the engine. Monetary amounts are stored as integer cents to avoid errors from floating-point calculations.

03 — Approach

Commit, reveal, verify

Front-endA player area and an admin back-office for campaigns.
Back-endA draw engine that publishes a hash before the draw and reveals the seed afterwards.
DatabaseCampaigns, tickets, entries and transactions.
  • Commit-reveal mechanism that lets players recalculate and verify the result
  • Configurable campaigns (rules, schedule, prizes)
  • Ticket purchase and participation history
  • Back-office: results, transactions, analytics, exports
Every draw is cryptographically verifiable (commit-reveal): hash published upfront, seed revealed, result replayable
Every draw is cryptographically verifiable (commit-reveal): hash published upfront, seed revealed, result replayable
Browse the lotteries and play, on mobile too
Browse the lotteries and play, on mobile too
04 — Result

Verification covered by tests

Tests cover seed verification, rejection of a second draw and the representation of monetary amounts.

  • Seed committed as a SHA-256 hash published before the draw, revealed after: a genuine draw is validated, a tampered seed is rejected
  • Immutable draws: a second draw on the same lottery is refused
  • Amounts stored as integer cents, with no floating-point arithmetic
  • 45 automated tests (43 unit and integration, 2 end-to-end journeys); lint, type checks, tests and build required to pass in CI
Lottery page: prize, ticket price, scheduled draw and rules
Lottery page: prize, ticket price, scheduled draw and rules
Prize-draw platform home page
Prize-draw platform home page
Source access

On request, I can provide read-only repository access or walk you through the architecture, code and technical decisions behind this project.

Request repository access
Next project — 004Password manager →
Contact

Building something new or improving an existing application?

Let’s talk about your needs, constraints and next steps.

Let’s work together
© 2026 Hamed Bouare — All rights reservedAvailable for new projectsLinkedIn