- ๐งฉ Multiple Game Modes: Image puzzle, Number puzzle, Memory game (coming soon)
- ๐ Achievement System: Unlock achievements as you complete puzzles
- ๐ Statistics Tracking: Track your best times and moves
- ๐จ Beautiful UI: Modern dark theme with smooth animations
- ๐ฑ Cross-Platform: Android, iOS, Windows, Web
- ๐ Play Online: Play now on GitHub Pages
Play online: (https://salimdev1337.github.io/MultiGame)
Download the latest version for your platform:
- Android: Download APK
- Windows: Download ZIP
- Web: Play Online
Classic sliding puzzle with beautiful images from Unsplash. Choose from 3x3, 4x4, or 5x5 grids.
Traditional 15-puzzle with numbers.
Match pairs of cards to win.
Unlock achievements by completing challenges:
- ๐ First Victory: Complete your first puzzle
- ๐ฎ Puzzle Fan: Complete 5 puzzles
- ๐ Puzzle Master: Complete 10 puzzles
- โญ 3x3 Expert: Complete a 3x3 in under 100 moves
- ๐ 4x4 Pro: Complete a 4x4 in under 200 moves
- โก Speed Demon: Complete any puzzle in under 60 seconds
MultiGame follows a clean, layered architecture with:
- Dependency Injection via GetIt for loose coupling
- Repository Pattern for data persistence abstraction
- Provider Pattern for reactive state management
- Feature-First Structure for scalability
- Separation of Concerns between UI, business logic, and data layers
See docs/ARCHITECTURE.md for detailed documentation.
- ๐ Encrypted local storage for sensitive data (Flutter Secure Storage)
- โ Input validation on all user inputs
- ๐ก๏ธ Secure logging that prevents credential leakage
- ๐ฅ Firestore security rules to protect database access
- ๐ API key protection through build-time configuration
See docs/SECURITY.md for security best practices.
- Flutter - UI Framework
- Provider - State management
- GetIt - Dependency injection
- Firebase - Backend services
- Flutter Secure Storage - Encrypted storage
- Flame - Game engine (Infinite Runner)
- Shared Preferences - Local storage
- Carousel Slider - Game carousel
- HTTP - Image fetching
This project uses GitHub Actions for automated testing, building, and deployment:
- โ Continuous Integration: Automated tests on every commit
- ๐จ Multi-Platform Builds: Automatic builds for Android, Windows, and Web
- ๐ Auto Deployment: Web version deploys to GitHub Pages automatically
- ๐ฆ Releases: Automated release creation with downloadable builds
Learn more: Check out our CI/CD Learning Guide
- Flutter SDK (3.27.1 or higher)
- Dart SDK (3.10.4 or higher)
- Android Studio / VS Code
- Git
- Clone the repository:
git clone https://github.com/salimdev1337/puzzle.git
cd puzzle- Install dependencies:
flutter pub get- Set up Firebase (required for score tracking):
# Install FlutterFire CLI
dart pub global activate flutterfire_cli
# Configure Firebase (generates lib/config/firebase_options.dart)
flutterfire configure
# Follow the prompts to select/create a Firebase project
# See docs/FIREBASE_SETUP_GUIDE.md for detailed instructionsImportant: Add lib/config/firebase_options.dart to your .gitignore (already configured).
- Configure API keys (optional):
# See docs/API_CONFIGURATION.md for detailed instructions
# The app will work with fallback images without API configuration
flutter run --dart-define=UNSPLASH_ACCESS_KEY=your_key_here- Run the app:
# Android/iOS
flutter run
# Windows
flutter run -d windows
# Web
flutter run -d chrome# Run all tests
flutter test
# Run tests with coverage
flutter test --coverage
# View coverage report
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html# Android APK
flutter build apk --release
# Android App Bundle (for Play Store)
flutter build appbundle --release
# Windows
flutter build windows --release
# Web
flutter build web --releaselib/
โโโ main.dart # App entry point, DI setup
โ
โโโ config/ # Configuration
โ โโโ service_locator.dart # Dependency injection setup
โ โโโ api_config.dart # API key management
โ โโโ firebase_options.dart # Firebase config (gitignored)
โ
โโโ core/ # Core interfaces
โ โโโ game_interface.dart # Game registration interface
โ โโโ game_registry.dart # Game registry system
โ
โโโ games/ # Feature-based game modules
โ โโโ puzzle/ # Image Puzzle
โ โโโ game_2048/ # 2048 Game
โ โโโ snake/ # Snake Game
โ โโโ infinite_runner/ # Infinite Runner (Flame)
โ
โโโ models/ # Shared data models
โ โโโ game_model.dart
โ โโโ achievement_model.dart
โ โโโ user_stats_model.dart
โ
โโโ providers/ # State management
โ โโโ user_auth_provider.dart
โ โโโ mixins/
โ โโโ game_stats_mixin.dart
โ
โโโ repositories/ # Data access layer
โ โโโ secure_storage_repository.dart
โ โโโ user_repository.dart
โ โโโ stats_repository.dart
โ
โโโ services/ # Business logic
โ โโโ auth/ # Authentication
โ โโโ data/ # Firebase operations
โ โโโ game/ # Game services
โ โโโ storage/ # Persistence
โ
โโโ screens/ # UI screens
โ โโโ main_navigation.dart
โ โโโ home_page.dart
โ โโโ [game]_page.dart
โ
โโโ widgets/ # Reusable widgets
โ โโโ game_carousel.dart
โ โโโ achievement_card.dart
โ โโโ dialogs/
โ
โโโ utils/ # Utilities
โโโ input_validator.dart
โโโ secure_logger.dart
โโโ dialog_utils.dart
docs/ # Documentation
โโโ ARCHITECTURE.md # Architecture guide
โโโ SECURITY.md # Security best practices
โโโ ADDING_GAMES.md # Game integration guide
โโโ API_CONFIGURATION.md # API setup
โโโ FIREBASE_SETUP_GUIDE.md # Firebase setup
โโโ INFINITE_RUNNER_ARCHITECTURE.md
assets/
โโโ images/ # Game images and sprites
โโโ (audio, fonts coming soon)
See docs/ARCHITECTURE.md for detailed architecture documentation.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Note: All pull requests trigger automated tests. Make sure tests pass before requesting review.
This project is open source and available under the MIT License.
Your Name
- GitHub: @ME
- Images from Unsplash
- Flutter team for the amazing framework
- All contributors who help improve this project
If you encounter any issues or have questions:
- Open an issue
- Check the CI/CD Guide
- Browse documentation in the docs/ folder
- Architecture Guide - Application architecture, patterns, and design decisions
- Security Best Practices - Security guidelines and implementation
- Adding Games - Step-by-step guide for adding new games
- API Configuration - Unsplash API setup
- Firebase Setup - Firebase configuration guide
- CI/CD Setup - GitHub Actions workflows
- Infinite Runner Architecture - Flame engine architecture
- Security Improvements - Security changelog
- Sudoku Quick Reference - API reference and usage examples
- Sudoku Phase 1 Analysis - Complete implementation analysis and test coverage
This project implements industry-standard security practices:
- All sensitive data is encrypted using Flutter Secure Storage
- API keys are never committed to version control
- Input validation prevents injection attacks
- Secure logging prevents credential leakage
- Firebase security rules protect user data
Report security issues: Do not open public issues. Email security concerns privately.
See docs/SECURITY.md for complete security documentation.