MCPcopy Index your code
hub / github.com/DhruvikDonga/wordsbattle

github.com/DhruvikDonga/wordsbattle @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
150 symbols 340 edges 32 files 41 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

WordsBattle

MiniWordGames is an engaging multiplayer word game that combines the thrill of real-time battles with the challenge of word creation. This project utilizes Golang for the backend server, Vue.js for the frontend application, WebSocket for real-time communication, and Docker for easy deployment. The game is hosted under the domain miniwordgames.com.

Tech Stack

Go Vue.js Vuetify Docker AWS

Features

  • Real-time Battles: Challenge your friends or random opponents to fast-paced word battles.
  • WebSocket Integration: Enjoy seamless and instant communication between players for a responsive gaming experience.
  • Golang Backend: Utilizes the power of Golang to handle server-side logic efficiently.
  • Vue.js Frontend: A dynamic and interactive user interface designed with Vue.js for a smooth gaming experience.
  • Dockerized Multistaged Deployment: Easily deploy and manage the application using Docker containers which are small and lightweight.

SimplySocket

Wordsbattle uses simplysocket package for better rooms,events and message link

Architecture

graph TD
    A[Vue Client] --> B[Go Server]
    B --> C[HTTP server]
    B ==> D[Websocket client upgrader]
    D ==> E[Concurrent client reader]
    D --> F[Concurrent client writer]
    B ==> G[Game Server]
    G -.->|manage the rooms and clients 

 Manage the lobby for random rooms| H[Room Server <small><i>id:-axGrw</i></small>]
    E -->|Usecases 

Lobby server for random games connect two users create a room|G
    G -->|Usecases 

Give user notificatons incase of room is not connected due to reasons|F
    B --> H
    E ==>|send the data from client to room server| H
    H ==> F
    F ==>|Send data to all the clients in list| A
    H <--> I[Game State Manager 

 <small><ul><li>Game algorithm</li><li>Send Game State to the 

UI client on time ticker</li><li><b>Process the data of the user</b></li></ul> </small>]
    H -.->|Send game state data 

 <-ticker.C to all clients in a room|F

Demo

https://youtu.be/-9HrFUU_jfs?si=RhmSZE6-uSq-6M8f
Live :- http://miniwordgames.com

Project Setup

wordsbattle uses Docker for deployment and project creation you can find docker-compose.yaml in repo .

git clone git@github.com:DhruvikDonga/wordsbattle.git
cd miniwordgames

docker-compose build
docker-compose up

Interested to contribute

Checkout this issue :- https://github.com/DhruvikDonga/wordsbattle/issues/12 Dev Branch :- https://github.com/DhruvikDonga/wordsbattle/tree/WB-8

Authors

Star History

Star History Chart

Extension points exported contracts — how you extend this code

RoomData (Interface)
(no doc) [2 implementers]
pkg/simplysocket/room_manager.go
Room (Interface)
(no doc) [1 implementers]
pkg/simplysocket/room_manager.go
MeshServer (Interface)
(no doc) [1 implementers]
pkg/simplysocket/mesh_server.go

Core symbols most depended-on inside this repo

BroadcastMessage
called by 23
pkg/simplysocket/room_manager.go
GetRoomSlugInfo
called by 17
pkg/simplysocket/room_manager.go
broadcastToClientsInRoom
called by 14
internal/modules/cowgameclient/roomserver.go
encode
called by 7
internal/modules/cowgameclient/messages.go
encode
called by 6
internal/modules/cowgameclient/messages.go
RoomStopped
called by 5
pkg/simplysocket/room_manager.go
encode
called by 5
internal/modules/cowgameclient/messages.go
findRoom
called by 4
internal/modules/cowgameclient/lobbyserver.go

Shape

Method 96
Struct 29
Function 21
Interface 3
TypeAlias 1

Languages

Go99%
TypeScript1%

Modules by API surface

pkg/simplysocket/mesh_server.go33 symbols
pkg/simplysocket/room_manager.go17 symbols
internal/modules/game/gamroomhandle.go14 symbols
internal/modules/cowgameclient/roomserver.go14 symbols
internal/modules/cowgameclient/lobbyserver.go11 symbols
internal/modules/cowgameclient/messages.go8 symbols
internal/modules/cowgameclient/wsclient.go7 symbols
pkg/simplysocket/client.go6 symbols
internal/modules/game/handle.go5 symbols
internal/modules/cowgameclient/messagehandle.go5 symbols
internal/modules/users/jsonstructs.go4 symbols
pkg/db/database.go3 symbols

Datastores touched

wordsbattleDatabase · 1 repos

For agents

$ claude mcp add wordsbattle \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page