A real-time cooperative Minesweeper game where multiple players can work together to clear the board.
- Guest Login: Play without creating an account using the guest login option
- User Accounts: Create persistent accounts to save your best times and game history
- Real-time Multiplayer: Join rooms with friends or other players
- Multiple Difficulties: Easy (8x8), Medium (16x16), and Hard (24x24) game modes
- Leaderboards: Track your best completion times across all difficulties
- Core Game Logic: Minesweeper engine, game rules, difficulty settings
- Frontend: Game board UI, settings interface, real-time updates
- Multiplayer: WebSocket handling, game state synchronization
- Database: User authentication, leaderboards, game history
- Backend: Node.js, hosted on Render
- Frontend: React, hosted on Netlify
- WebSockets: Socket.io
- Development: Nix for reproducible environments
- Install Nix:
sh <(curl -L https://nixos.org/nix/install)- Enable Flakes
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf- Enter Dev Environment:
nix developmain- Deployed branchdev- Development branchfeature/[feature-name]- Individual feature branches
- Create a new branch from
dev - Use naming convention:
feature/game-logic,feature/multiplayer, etc.
git checkout dev
git pull origin dev
git checkout -b feature/your-feature- Commit regularly with clear messages
- Keep pulls from dev to stay updated
git commit -m "descriptive message"
git pull origin dev- Push your feature branch
- Create a Pull Request (PR) to dev
- GET A REVIEW BEFORE MERGING
git push origin feature/your-feature- Start with verb (add, fix, update)
- Be descriptive but concise
- Examples:
- Add mine placement logic
- Fix websocket disconnect issue
- Update game settings UI
- Clone the repository
git clone https://github.com/bzhang102/Minesweeper.git
cd multiplayer-minesweeper- Enter Nix development environment
nix develop- Install dependencies
npm install
cd src/server
npm install
npm startThe server will run on http://localhost:3000
cd src/client
npm install
npm run devThe client will run on http://localhost:5173
- Click the "Play as Guest" button on the login page
- A unique guest username will be generated for you
- You can play immediately without creating an account
- Note: Guest users won't have persistent game statistics
- Click "Create Account" to register a new user
- Your game statistics and best times will be saved
- You can log in with your credentials on future visits