Skip to content

Latest commit

 

History

History
302 lines (233 loc) · 10.7 KB

File metadata and controls

302 lines (233 loc) · 10.7 KB
3D Sudoku Matrix Banner

🧩 3D Sudoku Matrix

A holographic puzzle interface with multi-language microservices architecture

CI/CD Pipeline Code Quality License: MIT PRs Welcome

Quick StartFeaturesArchitectureAPIContributing


🎯 Overview

Transform your mind with 3D Sudoku Matrix - a next-generation puzzle game that combines the classic logic of Sudoku with cutting-edge cyberpunk aesthetics and modern software architecture. Built with a multi-language microservices architecture following OSI model principles, this Progressive Web App delivers an immersive gaming experience with offline capabilities, real-time multiplayer, and lightning-fast puzzle solving.

✨ Features

🎮 Game Experience

  • Immersive UI: Cyberpunk-themed interface with digital rain effect
  • Multiple Difficulty Levels: Easy, Medium, Hard, and Expert modes
  • Real-time Validation: Instant feedback on moves with visual highlighting
  • Smart Hints System: AI-powered assistance when you're stuck
  • Undo/Redo: Full move history with unlimited undo capabilities
  • Timer & Statistics: Track your solving time and personal records

📱 Progressive Web App

  • Offline Support: Play without internet connection
  • Installable: Add to home screen for native app experience
  • Background Sync: Automatic save and sync when connection returns
  • Push Notifications: Get notified about new challenges and updates
  • Responsive Design: Perfect on desktop, tablet, and mobile devices

🚀 Technical Excellence

  • Multi-Language Backend: C++, C#, PHP, and Node.js microservices
  • Ultra-Fast Solving: Microsecond-level performance with optimized algorithms
  • Real-time Multiplayer: Compete with friends via WebSocket connections
  • Global Leaderboards: Track rankings across different difficulty levels
  • WebAssembly Integration: Client-side C++ solver for offline mode

🏗️ Architecture

Built on modern microservices architecture following OSI model principles:

┌─────────────────────────────────────────────────────────┐
│                    🌐 Frontend (PWA)                   │
│              Angular 20+ • TypeScript • Tailwind       │
├─────────────────────────────────────────────────────────┤
│                   🔗 API Gateway                       │
│              Node.js • Express • Socket.IO             │
├─────────────────────────────────────────────────────────┤
│                  ⚡ Microservices                      │
│  C++ Solver  │ C# Users │ PHP Leaderboard │ Auth Service │
├─────────────────────────────────────────────────────────┤
│                   💾 Data Layer                        │
│              MongoDB • Redis • In-Memory DB            │
├─────────────────────────────────────────────────────────┤
│                  🐳 Infrastructure                     │
│            Docker • Nginx • Health Monitoring          │
└─────────────────────────────────────────────────────────┘

🛠️ Technology Stack

Backend Services

Service Language Purpose Port
Solver Engine C++17 Ultra-fast puzzle solving 8081
User Management C# .NET 8 Authentication & profiles 8082
Leaderboards PHP 8.2 Global rankings & stats 8083
API Gateway Node.js Service orchestration 8080

Frontend Technologies

  • Angular 20+ - Modern web framework
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first styling
  • WebAssembly - High-performance computation
  • Service Workers - Offline functionality
  • Socket.IO - Real-time communication

Infrastructure

  • Docker - Containerization
  • MongoDB - Document database
  • Redis - Caching & sessions
  • Nginx - Reverse proxy
  • GitHub Actions - CI/CD pipeline
  • Nginx: Reverse proxy and load balancing
  • Redis: Caching and session storage
  • MongoDB: Persistent data storage
  • Service Workers: Offline functionality

🚀 Quick Start

One-Command Deployment

git clone https://github.com/GizzZmo/3d-Matrix-Sukoku.git
cd 3d-Matrix-Sukoku
./deploy.sh

🎉 That's it! Open http://localhost:4200 and start playing!

Prerequisites

  • Docker & Docker Compose - Container orchestration
  • Node.js 20+ - JavaScript runtime (for development)
  • Modern Browser - Chrome, Firefox, Safari, or Edge with WebAssembly support

Manual Setup

Click to expand manual installation steps
  1. Clone and Install

    git clone https://github.com/GizzZmo/3d-Matrix-Sukoku.git
    cd 3d-Matrix-Sukoku
    npm install
  2. Start Services

    # Start all microservices
    docker-compose up -d --build
    
    # Or start individual services
    npm run dev  # Frontend only
  3. Verify Installation

    # Check service health
    curl http://localhost:8080/health
    
    # View running services
    docker-compose ps

🌐 Service Endpoints

Service URL Description
🎮 Frontend http://localhost:4200 Progressive Web App
🚪 API Gateway http://localhost:8080 Unified API endpoint
C++ Solver http://localhost:8081 High-performance solver
👤 User Service http://localhost:8082 Authentication & profiles
🏆 Leaderboard http://localhost:8083 Global rankings
📊 Health Dashboard http://localhost:8080/health System monitoring

📖 API Documentation

Quick API Reference

# Health Check
curl http://localhost:8080/health

# Solve Puzzle
curl -X POST http://localhost:8080/api/v1/solver/solve \
  -H "Content-Type: application/json" \
  -d '{"puzzle": [[0,0,0,2,6,0,7,0,1]...]}'

# Get Leaderboard
curl http://localhost:8080/api/v1/leaderboard?difficulty=hard

# Register User
curl -X POST http://localhost:8080/api/v1/users/register \
  -H "Content-Type: application/json" \
  -d '{"username": "player1", "email": "[email protected]"}'

📚 Full API Documentation: Available at http://localhost:8080/api/docs after deployment

🔧 Development

Local Development Setup

# Frontend development
npm run dev

# Backend development (individual services)
cd backend/cpp && mkdir build && cd build && cmake .. && make
cd backend/csharp && dotnet run
cd backend/php && composer install && php -S localhost:8083
cd backend/gateway && npm install && npm run dev

Testing & Quality

# Install dependencies
npm install

# Build verification
npm run build

# Docker health check
./deploy.sh && curl http://localhost:8080/health

Architecture Benefits

Scalability - Independent service scaling
Maintainability - Language-specific expertise
Performance - Optimized components
Reliability - Service isolation
Flexibility - Easy service replacement

🤝 Contributing

We welcome contributions! Here's how you can help:

Getting Started

  1. 🍴 Fork the repository
  2. 🌱 Create a feature branch: git checkout -b feature/amazing-feature
  3. 💾 Commit changes: git commit -m 'Add amazing feature'
  4. 📤 Push to branch: git push origin feature/amazing-feature
  5. 🔄 Open a Pull Request

Contribution Areas

  • 🏗️ Backend Services: Add new language implementations
  • 🎨 Frontend Features: PWA enhancements and UI improvements
  • Performance: Algorithm optimizations and caching
  • 🧪 Testing: Comprehensive test coverage
  • 📝 Documentation: API and architecture docs

Development Guidelines

  • Follow existing code style and conventions
  • Add tests for new features
  • Update documentation for API changes
  • Ensure Docker builds pass
  • Test across different browsers

📊 Performance & Benchmarks

Metric Value Notes
Solve Time < 1ms C++ solver average
Bundle Size < 2MB Optimized production build
First Paint < 1s Initial page load
PWA Score 95+ Lighthouse audit
Uptime 99.9% Service availability

🚀 Deployment Options

Local Development

./deploy.sh  # One-command setup

Production Docker

docker-compose up -d --build

Cloud Deployment

# AWS/Azure/GCP ready
# Configure your deployment target
# Update environment variables

📄 License

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

🙏 Acknowledgments

  • 🎯 Original Sudoku concept and logic
  • 🌐 Open source community for tools and libraries
  • 🎨 Cyberpunk aesthetic inspiration
  • 🏗️ Microservices architecture patterns
  • 💫 Modern web development standards

Built with ❤️ using modern software engineering principles

🐛 Report Bug💡 Request Feature💬 Discussions

⭐ Star this repo if you find it useful!