Skip to content

AndikaFitra/Minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฃ Minesweeper Pro

Minesweeper Pro Laravel PHP License

Modern Minesweeper game dengan fitur admin management dan profile system

Demo โ€ข Features โ€ข Installation โ€ข Screenshots


๐Ÿ“‹ Deskripsi

Minesweeper Pro adalah implementasi modern dari game klasik Minesweeper dengan tambahan fitur-fitur canggih seperti user authentication, profile management, admin dashboard, dan leaderboard system. Dibangun menggunakan Laravel 11 dengan UI yang stunning menggunakan Tailwind CSS dan glassmorphism effects.

โœจ Features

๐ŸŽฎ Game Features

  • 3 Tingkat Kesulitan: Easy (8x8), Medium (16x16), Hard (16x30)
  • Real-time Timer: Track waktu bermain Anda
  • Flag System: Tandai cell yang dicurigai sebagai mine
  • Auto-reveal: Otomatis membuka cell kosong di sekitarnya
  • Win/Lose Detection: Deteksi kemenangan dan kekalahan otomatis
  • Score Recording: Semua game disimpan ke database

๐Ÿ‘ค User Features

  • Authentication System: Register, Login, Forgot Password
  • Email Verification: Verifikasi email untuk keamanan
  • Profile Management: Update nama, email, password
  • Profile Photo Upload: Upload foto profil (max 2MB, JPG/PNG)
  • Personal Dashboard: Lihat statistik game Anda
  • Game History: Riwayat semua game yang dimainkan
  • Personal Records: Best time untuk setiap tingkat kesulitan

๐Ÿ† Leaderboard & Stats

  • Global Leaderboard: Top 30 pemain terbaik
  • Win Rate Tracking: Persentase kemenangan
  • Best Time Records: Waktu tercepat per difficulty
  • Total Games Played: Total game yang dimainkan
  • Achievement System: Badge untuk pencapaian tertentu

๐Ÿ‘จโ€๐Ÿ’ผ Admin Features

  • User Management Dashboard: Kelola semua user
  • Search & Filter: Cari user by nama/email, filter by role
  • Edit User Info: Update nama, email, role user
  • Toggle User Role: Ubah role user โ†” admin
  • Reset Password: Reset password user lain
  • Delete User: Hapus user (dengan proteksi admin)
  • Security Controls: Admin tidak bisa delete admin lain

๐ŸŽจ UI/UX Features

  • Modern Design: Purple-pink gradient theme
  • Glassmorphism Effects: Transparent glass-like components
  • Smooth Animations: Micro-interactions dan transitions
  • Responsive Design: Mobile-friendly layout
  • Dark Theme: Eye-friendly dark mode
  • Loading States: Skeleton screens dan spinners
  • Toast Notifications: Success/error messages

๐Ÿ› ๏ธ Tech Stack

  • Backend: Laravel 11.x
  • Frontend: Blade Templates, Alpine.js
  • Styling: Tailwind CSS
  • Database: MySQL
  • Authentication: Laravel Breeze
  • File Storage: Laravel Storage (Public Disk)
  • Build Tool: Vite

๐Ÿ“ฆ Installation

Prerequisites

  • PHP >= 8.2
  • Composer
  • Node.js & NPM
  • MySQL

Setup Steps

  1. Clone Repository
git clone https://github.com/AndikaFitra/Minesweeper.git
cd Minesweeper
  1. Install Dependencies
composer install
npm install
  1. Environment Setup
cp .env.example .env
php artisan key:generate
  1. Database Configuration

Edit .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=minesweeper
DB_USERNAME=root
DB_PASSWORD=
  1. Run Migrations & Seeders
php artisan migrate --seed
  1. Create Storage Link
php artisan storage:link
  1. Build Assets
npm run build
  1. Run Development Server
php artisan serve

Visit: http://localhost:8000

๐Ÿ” Default Credentials

Admin Account

Email: admin@minesweeper.com
Password: admin123

Test User Accounts

Email: user@minesweeper.com
Password: user123

Email: john@example.com
Password: password

Email: jane@example.com
Password: password

๐ŸŽฏ How to Play

  1. Pilih Tingkat Kesulitan: Easy, Medium, atau Hard
  2. Klik Cell: Klik kiri untuk membuka cell
  3. Flag Mine: Klik kanan untuk menandai mine
  4. Angka: Menunjukkan jumlah mine di sekitar cell
  5. Menang: Buka semua cell yang bukan mine
  6. Kalah: Klik cell yang berisi mine

๐Ÿ“ Project Structure

minesweeper/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ Http/
โ”‚   โ”‚   โ”œโ”€โ”€ Controllers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AdminController.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ GameController.php
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ProfileController.php
โ”‚   โ”‚   โ””โ”€โ”€ Middleware/
โ”‚   โ”‚       โ””โ”€โ”€ IsAdmin.php
โ”‚   โ””โ”€โ”€ Models/
โ”‚       โ”œโ”€โ”€ User.php
โ”‚       โ”œโ”€โ”€ GameSession.php
โ”‚       โ””โ”€โ”€ ScoreRecord.php
โ”œโ”€โ”€ database/
โ”‚   โ”œโ”€โ”€ migrations/
โ”‚   โ””โ”€โ”€ seeders/
โ”‚       โ””โ”€โ”€ AdminUserSeeder.php
โ”œโ”€โ”€ resources/
โ”‚   โ”œโ”€โ”€ views/
โ”‚   โ”‚   โ”œโ”€โ”€ admin/
โ”‚   โ”‚   โ”œโ”€โ”€ auth/
โ”‚   โ”‚   โ”œโ”€โ”€ minesweeper/
โ”‚   โ”‚   โ””โ”€โ”€ profile/
โ”‚   โ””โ”€โ”€ css/
โ”‚       โ””โ”€โ”€ app.css
โ””โ”€โ”€ routes/
    โ””โ”€โ”€ web.php

๐Ÿ”’ Security Features

  • โœ… CSRF Protection
  • โœ… SQL Injection Prevention
  • โœ… XSS Protection
  • โœ… Password Hashing (bcrypt)
  • โœ… Email Verification
  • โœ… Role-Based Access Control
  • โœ… File Upload Validation
  • โœ… Admin Action Protections

๐Ÿš€ Deployment

Production Setup

  1. Set Environment to Production
APP_ENV=production
APP_DEBUG=false
  1. Optimize Application
php artisan config:cache
php artisan route:cache
php artisan view:cache
  1. Build Production Assets
npm run build

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

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

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

Andika Fitra

๐Ÿ™ Acknowledgments

  • Laravel Framework
  • Tailwind CSS
  • Alpine.js
  • Heroicons

๐Ÿ“ž Support

Jika ada pertanyaan atau issue, silakan buka GitHub Issues.


Made with โค๏ธ by Andika Fitra

โญ Star this repo if you like it!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages