Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

118 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ Features

  • ๐Ÿงฉ 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

๐Ÿš€ Live Demo

Play online: (https://salimdev1337.github.io/MultiGame)

๐Ÿ“ฅ Download

Latest Release

Download the latest version for your platform:

๐ŸŽฎ Game Modes

Image Puzzle (Available)

Classic sliding puzzle with beautiful images from Unsplash. Choose from 3x3, 4x4, or 5x5 grids.

Number Puzzle (Coming Soon)

Traditional 15-puzzle with numbers.

Memory Game (Coming Soon)

Match pairs of cards to win.

๐Ÿ† Achievements

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

๐Ÿ—๏ธ Architecture

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.

Security Features

  • ๐Ÿ”’ 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.

๐Ÿ› ๏ธ Built With

๐Ÿš€ CI/CD

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

๐Ÿ“ฑ Getting Started for Developers

Prerequisites

  • Flutter SDK (3.27.1 or higher)
  • Dart SDK (3.10.4 or higher)
  • Android Studio / VS Code
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/salimdev1337/puzzle.git
cd puzzle
  1. Install dependencies:
flutter pub get
  1. 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 instructions

Important: Add lib/config/firebase_options.dart to your .gitignore (already configured).

  1. 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
  1. Run the app:
# Android/iOS
flutter run

# Windows
flutter run -d windows

# Web
flutter run -d chrome

Running Tests

# 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

Building for Production

# 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 --release

๐Ÿ“‚ Project Structure

lib/
โ”œโ”€โ”€ 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.

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Note: All pull requests trigger automated tests. Make sure tests pass before requesting review.

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Author

Your Name

๐Ÿ™ Acknowledgments

  • Images from Unsplash
  • Flutter team for the amazing framework
  • All contributors who help improve this project

๐Ÿ“ž Support

If you encounter any issues or have questions:

๐Ÿ“š Documentation

For Developers

Setup & Configuration

Technical Details

Sudoku Game (NEW)

๐Ÿ”’ Security

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.

About

a side project called MultiGame app using Flutter and Flame game engine

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages