- Classic Gameplay: Experience the original Minesweeper game with familiar mechanics.
- Cell Revealing and Flagging: Floating bubble action chooser for revealing and flagging cells.
- Charts and Statistics: View game statistics with charts representing wins, losses, and incomplete games.
- Game State Management: Load and save game sessions using UUIDs.
- Full Server-Side Rendering: Enjoy SSR and HTMX.
- Go (Golang): Server-side logic.
- SQLC: SQL compiler for type-safe database interactions.
- Goose: Database migration tool.
- HTMX: For AJAX requests and HTML swapping.
- Go-Templates: For server-side rendered HTML.
- Go-Echarts: SSR charts.
- SQLite: Database for storing game data.
- Tailwind CSS: Styling framework.
- Go: Ensure you have Go installed on your machine.
- Goose: DB database migration tool.
- SQLC: Generating type-safe database code from SQL.
-
Clone the Repository:
git clone https://github.com/Oskarowski/minesweeper.git cd minesweeper
-
Create the
.env
File: Copy the.ENV_example
file to.env
and fill in the required values:cp .env.example .env
-
Build CSS: Compile the Tailwind CSS files by running:
npm run build:css
-
Apply Database Migrations: Use Goose to apply the database migrations:
goose -dir db/migrations sqlite3 ./db/minesweeper.db up
-
Generate SQL Code: Run SQLC to generate type-safe database code:
npm run build:sql
-
Start the Server: Run the Go server:
go run main.go
-
Access the Game: Open your browser and go to `http://localhost:8080\` to play the game.