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.
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
- 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
- Node.js v18+
- npm v9+
- Python 3.8+ (for Quantum Service)
- Docker and Docker Compose (optional, for containerized development)
- Clone the repository and install dependencies:
git clone <repository-url>
cd qupot
npm install
- Run services using Turborepo:
# Run all services
npm run dev
# Run only the quantum service
npm run dev -- --filter=quantum-service
- Access services:
- API Gateway: http://localhost:8000
- Auth Service: http://localhost:8001
- Quantum Service: http://localhost:8002
- Lottery Service: http://localhost:8003
- Blockchain Service: http://localhost:8004
- Clone the repository and install dependencies:
git clone <repository-url>
cd qupot
npm install
- Start all services using Docker Compose:
npm run docker:up
- Stop all services:
npm run docker:down
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
- DEV_GUIDE.md: Detailed development instructions
- SETUP_SUMMARY.md: Summary of the current setup
- QUANTUM_CONCEPTS.md: Explanation of quantum computing principles used
- Service README files: Each service contains its own documentation
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.