A web application that lets players interact and upload assets in a shared 2D board game space. The core functionality is a board that loads pieces and allows players to move them around in real time using an authority token based movement system.
- Real-time game board interaction via WebSockets
- Upload and manage custom game assets
- Token-based authority system for piece movement
- Room-based multiplayer with simple codes
- File-based persistence for game state and assets
- Node.js 16+
- npm or yarn
- Clone the repository
- Install dependencies:
npm install - Copy the example environment file:
cp .env.example .env - Start the development server:
npm run dev
docker build -t minigame .
docker run -p 3000:3000 -v minigame-data:/usr/src/app/data -v minigame-uploads:/usr/src/app/uploads minigame
This maps port 3000 and creates persistent volumes for the data and uploads directories.
- Set up an EC2 instance with Docker installed
- Upload your Docker image to a registry or build it directly on the instance
- Run the container using the command above
- Configure security groups to allow traffic on port 3000 (or map to 80/443 with a reverse proxy)
POST /api/rooms- Create or join a game room- Body:
{ "roomCode": "your-room-code" }
- Body:
POST /api/assets/upload- Upload a new asset (multipart/form-data)- Form field:
asset(file upload)
- Form field:
GET /api/assets- Get all available assets
join-room- Join a game roomrequest-token- Request authority for a piecerelease-token- Release authority for a piecemove-piece- Move a piece on the boardadd-piece- Add a new piece to the boardremove-piece- Remove a piece from the board
game-state- Full game state on room joinpiece-locked- A piece has been locked by a playerpiece-unlocked- A piece has been unlockedpiece-moved- A piece has been movedpiece-added- A new piece has been addedpiece-removed- A piece has been removedplayer-joined- A new player joined the roomplayer-left- A player left the roomerror- Error message