Skip to content
/ QuPot Public

Quantum Blockchain Lottery: An educational project that implements a decentralized lottery using blockchain technologies with randomness elements based on quantum computing principles. Designed to help understand the fundamentals of blockchains, smart contracts, and random number generation through quantum concepts.

Notifications You must be signed in to change notification settings

RadW2020/QuPot

Repository files navigation

QuPot - Quantum Lottery Platform

QuPot is a quantum-powered lottery platform that leverages quantum random number generation for provably fair lottery draws. The platform is built using modern microservice architecture and blockchain technology for transparency and security.

Architecture

The platform consists of multiple microservices:

  • API Gateway: Central entry point that routes requests to the appropriate services
  • Quantum Service: Generates quantum random numbers for lottery draws using Qiskit
  • Lottery Service: Manages lottery draws, tickets, and results
  • Blockchain Service: Handles blockchain interactions and smart contract operations
  • Auth Service: Manages user authentication and authorization

Technology Stack

  • Backend: NestJS (TypeScript) for most services
  • Quantum Engine: FastAPI (Python) with Qiskit for quantum computing
  • Database: PostgreSQL for persistent storage
  • Smart Contracts: Solidity with Hardhat development environment
  • Infrastructure: Docker for containerization
  • Build System: Turborepo for monorepo management

Getting Started

Prerequisites

  • Node.js v18+
  • npm v9+
  • Python 3.8+ (for Quantum Service)
  • Docker and Docker Compose (optional, for containerized development)

Option 1: Development with Turborepo

  1. Clone the repository and install dependencies:
git clone <repository-url>
cd qupot
npm install
  1. Run services using Turborepo:
# Run all services
npm run dev

# Run only the quantum service
npm run dev -- --filter=quantum-service
  1. Access services:

Option 2: Development with Docker

  1. Clone the repository and install dependencies:
git clone <repository-url>
cd qupot
npm install
  1. Start all services using Docker Compose:
npm run docker:up
  1. Stop all services:
npm run docker:down

Project Structure

qupot/
├── apps/                 # Microservices
│   ├── api-gateway/      # API Gateway service (NestJS)
│   ├── quantum-service/  # Quantum random number service (FastAPI/Python)
│   ├── lottery-service/  # Lottery management service (NestJS)
│   ├── blockchain-service/ # Blockchain & smart contract service (NestJS/Solidity)
│   └── auth-service/     # Authentication service (NestJS)
├── packages/             # Shared libraries
│   └── common-lib/       # Common utilities & types (TypeScript)
├── docker/               # Docker configurations
└── docker-compose.yml    # Docker Compose configuration

Documentation

Current Focus

The project is currently focused on developing the Quantum Service, which provides quantum random number generation through a REST API using Qiskit and quantum computing principles. This service leverages quantum superposition and measurement to generate truly random numbers that are cryptographically secure and unpredictable, making them ideal for fair lottery draws.

About

Quantum Blockchain Lottery: An educational project that implements a decentralized lottery using blockchain technologies with randomness elements based on quantum computing principles. Designed to help understand the fundamentals of blockchains, smart contracts, and random number generation through quantum concepts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •