An open-source platform for creating, building, and sharing games.
gamesung is a free, open-source platform that empowers developers and creators to build games. Whether you're a beginner or an experienced game developer, gamesung provides the tools and workflow you need to bring your game ideas to life.
The first game: Chess — a playable chess game with bot opponent and real-time WebSocket communication.
| Layer | Technology |
|---|---|
| Frontend | Next.js (React, TypeScript) |
| Backend | Go |
| Real-time | WebSockets (gorilla/websocket) |
| Chess Logic | notnil/chess |
| Package Manager | pnpm (workspaces) |
gamesung/
├── packages/
│ ├── web/ # Next.js frontend
│ │ ├── src/
│ │ │ ├── app/ # App Router pages
│ │ │ ├── components/ # React components
│ │ │ └── lib/ # API client
│ │ └── public/
│ └── server/ # Go backend
│ ├── bot/ # Chess AI
│ ├── game/ # Game logic & WebSocket hub
│ ├── handler/ # HTTP & WebSocket handlers
│ └── main.go
├── pnpm-workspace.yaml
└── package.json
# Clone the repository
git clone https://github.com/rekabytes/gamesung.git
# Navigate into the project
cd gamesung
# Install dependencies
pnpm installOpen two terminals:
Terminal 1 — Backend (Go)
cd packages/server
go run main.goServer starts on http://localhost:8080
Terminal 2 — Frontend (Next.js)
pnpm dev:webFrontend starts on http://localhost:3000
- Open
http://localhost:3000/chess - Choose your color (White or Black)
- Choose difficulty (Easy, Medium, Hard)
- Click Start Game
- Click a piece, then click a destination square to move
- Bot responds automatically via WebSocket
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/games |
Create multiplayer game |
POST |
/api/games/bot |
Create bot game |
GET |
/api/games |
List all games |
GET |
/api/games/{id} |
Get game state |
POST |
/api/games/{id}/join |
Join a game |
POST |
/api/games/{id}/move |
Make a move |
GET |
/ws/games/{id} |
WebSocket connection |
Contributions are welcome! To get started:
- Fork the repository
- Create a new branch (
git checkout -b issue/<number>-<short-description>) - Make your changes
- Commit your changes (
git commit -m "feat: Add your feature") - Push to the branch (
git push origin issue/<number>-<short-description>) - Open a Pull Request
Please refer to CONTRIBUTING.md for detailed branch naming rules.
All branches should be created from main and follow the convention:
issue/<number>-<short-description>
This project is licensed under the MIT License.
MIT License — Copyright (c) 2026 Khairul Anuar
- GitHub: rekabytes/gamesung