A simple implementation of the classic Minesweeper game built with Next.js. This project showcases the use of React components and modern front-end development techniques. Players can enjoy the Minesweeper game experience directly in their browser, with a clean and responsive UI.
Minesweeper is a web-based implementation of the classic puzzle game, built with Next.js 15. It features modern UI elements, customizable settings, and responsive design. Players can enjoy the classic Minesweeper experience with added features like custom themes, multiple languages, and various visual customization options.
- ๐ฎ Classic Gameplay - Traditional Minesweeper mechanics with modern features
- ๐ Dark/Light Mode - Full theme support with automatic system detection
- ๐ Multi-Language - Supports English, Thai, Japanese, Vietnamese, and Chinese (can add more)
- ๐ฑ Responsive Design - Playable on all devices from mobile to desktop
- ๐จ Customizable UI - Various options for icons, numbers, and game elements (can add more)
- ๐พ No Backend - Client-side only with state management
- ๐ฏ Multiple Difficulty Levels - Easy (9x9), Medium (16x16) and Hard (16x30)
- ๐จ Customizable Elements (can add more)
- Different flag icons (Default, Pyramid, Radar, Sparkles, Sigma)
- Various mine icons (Bomb, Skull, Fire, Flame, Ghost)
- Multiple number styles (Default, Roman, Thai, ABC, Question)
- ๐ Language Support - Available in multiple languages (can add more)
- ๐จ Theme Options - Dark and light mode with system preference detection
- ๐ Score System - Time-based scoring with difficulty multipliers
- ๐ฑ Mobile Support - Touch-friendly interface with flag mode toggle
Next.js 15 โ Framework for static site generation.
TailwindCSS 4 โ Utility-first CSS framework for styling.
TypeScript โ Strongly typed JavaScript for better maintainability.
shadcn/ui โ Reusable UI components
Magic UI โ Reusable UI components
Lucide Icons โ Modern icon set
next-themes โ Theme management
Try it here: Minesweeper
To run this project locally, follow these steps:
git clone https://github.com/guysuvijak/nextjs-minesweeper-game.git
cd nextjs-minesweeper-game
npm install
or
bun install
or
pnpm install
npm run dev
or
bun run dev
or
pnpm run dev
npm run tauri
or
bun run tauri
or
pnpm run tauri
note: If you want to Export Cross-platform, please follow setup before Here
nextjs-minesweeper-game/
โโโ public/ # Static assets
โ โโโ cursor/ # Static Cursor Image
โ โโโ icon/ # Website Icon
โ โโโ metadata/ # Static Metadata & README Image
โ โโโ manifest.json # Config Metadata (PWA)
โโโ src/
โโโ app/ # layout & page Next.JS
โ โโโ page.tsx # Main Page
โโโ components/ # React components
โ โโโ magicui/ # UI from Magic-UI
โ โโโ ui/ # UI from shadcn/ui
โ โโโ CustomDock.tsx # Menu Dock in Mainmenu
โ โโโ GameResultModal.tsx # Modal Result in Game Screen
โ โโโ MainMenu.tsx # Mainmenu Screen
โ โโโ Minesweeper.tsx # Game Screen
โ โโโ SettingsModal.tsx # Modal Settings in Mainmenu
โ โโโ Timer.tsx # Timer in Game Screen
โโโ configs/ # Configs File (Edit Here)
โโโ hooks/ # React Custom Hooks
โโโ lib/ # Auto Create from Library
โโโ locales/ # Language Files
โโโ types/ # TypeScript File
Since this is a static website, all modifications must be made directly within the project files. Hereโs where you can edit specific parts of the site:
โ๏ธ Game Configuration
๐ File: src/configs/game.tsx
Add or modify game settings like difficulty levels, scoring, and colors.
๐จ UI Settings
๐ File: src/configs/settings.ts
Configure available options for icons, themes, and number styles.
๐ Language Files
๐ Folder: src/locales/
๐ File: src/configs/language.ts
Add or modify translations for different languages.
๐ผ๏ธ Custom Cursors
๐ Folder: public/cursor/
Add or modify custom cursor images.
โ๏ธ Types Definition
๐ File: src/types/index.ts
Modify TypeScript types and interfaces.
โ๏ธ Website Configuration
๐ Files:
src/configs/metadata.ts โ Modify general layout and metadata settings.
public/manifest.json โ Update website metadata for PWA settings.
This project is open-source under the MIT License. Let me know if you need any modifications! ๐
Thank you for your interest in Minesweeper from me! Your support means a lot. โค๏ธ
โญ If you like this project, please consider giving it a star on GitHub to show your support and encouragement! ๐