Skip to content

Latest commit

 

History

History
163 lines (114 loc) · 5.13 KB

File metadata and controls

163 lines (114 loc) · 5.13 KB

QuPot Development Setup Summary

Current State of Development

The QuPot quantum lottery platform development is underway, with the Quantum Service being the primary focus at present. This document summarizes the current setup and outlines the next steps.

What's Been Configured

  1. Turborepo Configuration

    • Root package.json with workspace setup for monorepo management
    • Turborepo pipeline configuration in turbo.json for efficient builds
    • Command structure for running all or selected services
    • Dependencies and scripts for development workflows
  2. Quantum Service

    • FastAPI application with quantum random number generation using Qiskit
    • Virtual environment management through npm scripts
    • Port configured to 8002 for local development
    • Environment check script to verify Python setup
    • Interactive API documentation with Swagger UI
    • Custom HTML landing page with explanations and visualizations
    • Quantum circuit visualization capabilities
    • Testing and client utilities
  3. Docker Setup

    • Docker Compose configuration for all planned services
    • Individual Dockerfiles for each service
    • Shared network and volume setup for inter-service communication
    • Updated port configuration and environment variables
  4. Documentation

    • Project README.md with overview information
    • DEV_GUIDE.md with detailed development instructions
    • Service-specific documentation for the quantum service
    • Consistent documentation structure across files

How to Run the Services

Run All Services

npm run dev

Run Specific Services

# Run just the quantum service
npm run dev -- --filter=quantum-service

# Run multiple specific services
npm run dev -- --filter=quantum-service --filter=api-gateway

Using Docker

# Start all services
npm run docker:up

# Stop all services
npm run docker:down

Service URLs and Technologies

Service URL Technology Stack Status
API Gateway http://localhost:8000 NestJS ⚠️ Scaffolded
Quantum Service http://localhost:8002 FastAPI, Qiskit ✅ Functional
Lottery Service http://localhost:8003 NestJS, PostgreSQL ⚠️ Scaffolded
Blockchain Service http://localhost:8004 NestJS, Solidity ⚠️ Scaffolded
Auth Service http://localhost:8003 NestJS, JWT ⚠️ Scaffolded

Quantum Service Features

The Quantum Service currently provides:

  1. Random Number Generation

    • Endpoint: POST /api/v1/random
    • Uses quantum computing principles via Qiskit
    • Configurable parameters (range, count, uniqueness)
    • Returns cryptographically secure random numbers
  2. Quantum Circuit Information

    • Endpoint: GET /api/v1/quantum-circuit
    • Returns details about the quantum circuit used
    • Includes measurement statistics and explanations
  3. Documentation and Visualization

    • Interactive API docs at /docs
    • Custom HTML documentation at /
    • Visualization scripts for quantum circuits

Next Steps for Development

  1. Enhanced Quantum Service

    • Connect to IBM Quantum cloud for real quantum hardware execution
    • Add more complex quantum circuit options
    • Implement authentication for the API
    • Add comprehensive unit and integration tests
  2. API Gateway Implementation

    • Connect to the Quantum Service
    • Implement proper routing and authentication
    • Add rate limiting and monitoring
  3. Lottery Service Development

    • Create database schema for draws and tickets
    • Implement draw management and ticket purchasing
    • Connect to Quantum Service for random number generation
  4. Blockchain Integration

    • Connect to Ethereum network (Mumbai testnet)
    • Deploy and interact with the QuantumLottery smart contract
    • Implement verification of lottery results on-chain
  5. Authentication Service

    • Implement JWT authentication
    • Add wallet authentication for Web3 integration
    • Create user management functionality
  6. Frontend Development

    • Create a web application to interact with the services
    • Implement MetaMask integration for blockchain interactions
    • Build interactive lottery UI with real-time draw information

Development Guidelines

For all future development:

  1. Follow the Established Patterns

    • Use the same folder structure and naming conventions
    • Match the documentation style in README files
    • Update port information in relevant documentation
  2. Ensure Cross-Service Integration

    • All services should be ready to communicate with each other
    • Use consistent data formats across services
    • Document API contract changes
  3. Maintain Test Coverage

    • Write unit tests for all new functionality
    • Include integration tests for service interactions
    • Use environment check scripts for dependencies
  4. Keep Documentation Updated

    • Update this document with new service information
    • Maintain service-specific README files
    • Document API endpoints in both code and docs