Skip to content

Jasonyou1995/Face-to-face-betting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PlayCheck: Real-World Verification Platform πŸš€

Logo

CI/CD Status License: MIT Security Rating

🌟 Project Overview

PlayCheck revolutionizes real-world event verification through a gamified, decentralized platform that combines cutting-edge blockchain technology, AI agents, and Zero-Knowledge Proofs. Our platform creates a trustworthy oracle system where users earn RLUSD rewards for accurate contributions to real-world data verification.

This is a public-facing fundraising project showcasing production-ready architecture and best practices.


πŸ—οΈ Architecture

Our platform is built on a robust, scalable architecture designed for enterprise-grade performance:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    PlayCheck Platform                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Frontend (Next.js 14)  β”‚  Backend (Node.js/Express)      β”‚
β”‚  - TypeScript           β”‚  - Microservices Architecture    β”‚
β”‚  - Tailwind CSS         β”‚  - GraphQL + REST APIs          β”‚
β”‚  - PWA Support          β”‚  - WebSocket Real-time          β”‚
β”‚  - Mobile Responsive    β”‚  - AI Agent Integration         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Blockchain Layer                                          β”‚
β”‚  - XRP Ledger Integration  β”‚  - RLUSD Stablecoin          β”‚
β”‚  - Crossmark SDK          β”‚  - Smart Contracts           β”‚
β”‚  - Zero-Knowledge Proofs  β”‚  - Multi-sig Treasury         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  AI & Analytics                                            β”‚
β”‚  - Challenge Validation   β”‚  - Fraud Detection            β”‚
β”‚  - Data Analysis Agents   β”‚  - Content Moderation         β”‚
β”‚  - Real-time Analytics   β”‚  - Reputation Scoring          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • Git
  • XRP Ledger testnet account (for development)

Installation

# Clone the repository
git clone https://github.com/your-username/Face-to-face-betting.git
cd Face-to-face-betting

# Install dependencies
npm install

# Set up environment variables (see Environment Setup section)
cp .env.example .env

# Start development environment
docker-compose up -d

# Run the application
npm run dev

Visit http://localhost:3000 to see the application running.


πŸ“ Project Structure

playcheck/
β”œβ”€β”€ .taskmaster/              # TaskMaster project management
β”‚   β”œβ”€β”€ tasks/               # Generated development tasks
β”‚   β”œβ”€β”€ docs/                # Project documentation
β”‚   └── reports/             # Complexity analysis reports
β”œβ”€β”€ frontend/                # Next.js application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/           # Application pages
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ utils/           # Utility functions
β”‚   β”‚   └── types/           # TypeScript definitions
β”‚   β”œβ”€β”€ public/              # Static assets
β”‚   └── styles/              # Global styles
β”œβ”€β”€ backend/                 # Express.js API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/             # API routes
β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   β”œβ”€β”€ models/          # Data models
β”‚   β”‚   β”œβ”€β”€ middleware/      # Custom middleware
β”‚   β”‚   └── utils/           # Server utilities
β”‚   β”œβ”€β”€ ai_agent/            # AI processing modules
β”‚   β”œβ”€β”€ zkp_verification/    # Zero-Knowledge Proof implementation
β”‚   └── eth/                 # Blockchain integration
β”œβ”€β”€ docs/                    # Additional documentation
β”œβ”€β”€ docker-compose.yml       # Local development setup
└── package.json             # Project dependencies

πŸ› οΈ Development Workflow

TaskMaster Integration

This project uses TaskMaster for comprehensive project management and development tracking:

# View current tasks
npm run tasks:list

# Get next recommended task
npm run tasks:next

# View specific task details
npm run tasks:show <task-id>

# Update task status
npm run tasks:status <task-id> done

Development Process

  1. Check TaskMaster for the next recommended task
  2. Research current best practices using TaskMaster's research tools
  3. Implement the feature following the detailed task breakdown
  4. Test thoroughly with automated and manual testing
  5. Document changes and update relevant documentation
  6. Commit with descriptive messages linked to task IDs

πŸ”§ Environment Setup

Required Environment Variables

Create a .env file in the project root with the following structure:

# Application Configuration
NODE_ENV=development
APP_PORT=3000
APP_URL=http://localhost:3000

# Database Configuration (Example - Use your preferred setup)
DATABASE_URL=postgresql://username:password@localhost:5432/playcheck
REDIS_URL=redis://localhost:6379

# XRP Ledger Configuration
XRPL_NETWORK=testnet
XRPL_WEBSOCKET_URL=wss://s.altnet.rippletest.net:51233

# AI Services (Optional - for development)
OPENAI_API_KEY=your-openai-key-here
ANTHROPIC_API_KEY=your-anthropic-key-here

# Security Keys (Generate secure keys for production)
JWT_SECRET=your-super-secure-jwt-secret-here
ENCRYPTION_KEY=your-32-byte-encryption-key-here

# Email Service (Example with SendGrid)
SENDGRID_API_KEY=your-sendgrid-api-key
FROM_EMAIL=noreply@playcheck.app

# Analytics & Monitoring
SENTRY_DSN=your-sentry-dsn-here

⚠️ Security Notice: Never commit real API keys or secrets to version control. Use proper secret management in production.


πŸƒβ€β™‚οΈ Development Scripts

# Development
npm run dev              # Start development servers
npm run build            # Build for production
npm run test             # Run test suite
npm run test:watch       # Run tests in watch mode
npm run test:coverage    # Generate coverage report

# Code Quality
npm run lint             # Run ESLint
npm run lint:fix         # Fix linting issues
npm run type-check       # TypeScript type checking
npm run format           # Format code with Prettier

# TaskMaster Integration
npm run tasks:init       # Initialize TaskMaster (run once)
npm run tasks:list       # List all tasks
npm run tasks:next       # Get next recommended task
npm run tasks:complexity # Analyze task complexity

# Docker
npm run docker:build     # Build Docker images
npm run docker:up        # Start containers
npm run docker:down      # Stop containers

πŸ§ͺ Testing Strategy

Test Categories

  1. Unit Tests: Component and function-level testing
  2. Integration Tests: API and service integration testing
  3. E2E Tests: Full user workflow testing
  4. Security Tests: Vulnerability and penetration testing
  5. Performance Tests: Load and stress testing

Running Tests

# Run all tests
npm test

# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e

# Generate coverage report
npm run test:coverage

πŸ”’ Security Best Practices

For Contributors

  • Never commit secrets: Use environment variables and .env.example
  • Code review required: All changes must be reviewed
  • Dependency scanning: Automated security scanning on all dependencies
  • Static analysis: SonarCloud integration for code quality
  • Penetration testing: Regular security assessments

Key Security Features

  • πŸ” End-to-end encryption for sensitive data
  • πŸ›‘οΈ Zero-Knowledge Proof implementation for privacy
  • πŸ”‘ Multi-signature wallet support for treasury
  • πŸ“ Comprehensive audit logs
  • 🚨 Real-time fraud detection
  • 🌐 Geographic compliance controls

🀝 Contributing

We welcome contributions from developers, security researchers, and blockchain enthusiasts!

Getting Started

  1. Fork the repository
  2. Clone your fork locally
  3. Set up the development environment
  4. Check TaskMaster for available tasks
  5. Create a feature branch
  6. Implement following our coding standards
  7. Test thoroughly
  8. Submit a pull request

Contribution Guidelines

  • Follow the TaskMaster workflow for organized development
  • Write comprehensive tests for new features
  • Update documentation for any API changes
  • Ensure all security checks pass
  • Include detailed commit messages with task references

πŸ“š Documentation


πŸš€ Roadmap

Our development is organized through TaskMaster with 25 major milestones:

Phase 1: Foundation (Tasks 1-6)

  • βœ… Project setup and architecture
  • πŸ”„ Frontend foundation with Next.js
  • πŸ”„ Backend API architecture
  • πŸ”„ Database design and implementation
  • πŸ”„ User authentication system
  • πŸ”„ XRP Ledger integration

Phase 2: Core Features (Tasks 7-14)

  • πŸ”„ RLUSD stablecoin integration
  • πŸ”„ Real-time communication
  • πŸ”„ Challenge management system
  • πŸ”„ Multi-modal data submission
  • πŸ”„ AI agent system
  • πŸ”„ Zero-Knowledge Proof implementation
  • πŸ”„ Verification and consensus
  • πŸ”„ Reward distribution system

Phase 3: Advanced Features (Tasks 15-21)

  • πŸ”„ User reputation system
  • πŸ”„ Analytics dashboard
  • πŸ”„ Fundraising platform features
  • πŸ”„ Compliance framework
  • πŸ”„ Marketing and community features
  • πŸ”„ Mobile responsiveness and PWA
  • πŸ”„ Performance optimization

Phase 4: Production Ready (Tasks 22-25)

  • πŸ”„ Security implementation and auditing
  • πŸ”„ Third-party integrations
  • πŸ”„ Documentation and knowledge base
  • πŸ”„ Deployment and DevOps pipeline

Track progress: Use npm run tasks:list to see current status


πŸ† Core Features

For Users

  • Challenge Creation: Create and validate real-world observation challenges
  • Gamified Verification: Earn rewards for accurate contributions
  • Privacy Protection: ZKP-powered verification without revealing data
  • Reputation Building: Build trust through consistent accuracy
  • RLUSD Rewards: Earn stablecoin rewards for participation

For Developers

  • Comprehensive APIs: Well-documented REST and GraphQL endpoints
  • AI Integration: Ready-to-use AI agents for validation and analysis
  • Blockchain Tools: XRP Ledger and RLUSD integration utilities
  • ZKP Framework: Privacy-preserving verification system
  • Real-time Features: WebSocket-based live updates

For Investors

  • Transparent Fundraising: Open-source, auditable platform
  • Tokenomics Visualization: Clear economic model documentation
  • Progress Tracking: Real-time development milestone tracking
  • Security Audits: Regular third-party security assessments
  • Compliance First: Built-in regulatory compliance features

πŸ“Š Key Metrics

  • Tasks Completed: 0/25 major milestones
  • Subtasks: 300 detailed implementation tasks
  • Test Coverage: Target 90%+
  • Security Score: Continuous monitoring
  • Performance: <3s load time target

🀝 Community & Support


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


βš–οΈ Legal Notice

PlayCheck is designed for educational and demonstration purposes. Always comply with local regulations regarding blockchain applications and fundraising activities. This platform implements robust compliance features but users are responsible for ensuring legal compliance in their jurisdiction.


πŸ™ Acknowledgments

  • XRP Ledger for providing robust blockchain infrastructure
  • Ripple Labs for RLUSD stablecoin technology
  • TaskMaster AI for intelligent project management
  • Open Source Community for the incredible tools and libraries

Built with ❀️ for the decentralized future

Website β€’ Documentation β€’ API Reference β€’ Contributing

About

RLUSD Betting Web3 App on Ripple Ledger / Ethereum with AI Agent Oracle and ZK Verification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •