estimatex-server
is the backend component for estimatex
, enabling real-time story point estimation through WebSocket communication. This server handles room management, user connections, and message broadcasting to facilitate collaborative estimation sessions.
- Real-time WebSocket communication
- Room-based collaboration with admin controls
- Support for multiple concurrent estimation sessions
- Automatic room cleanup on admin disconnect
- Configurable room capacity
- Structured event system for client-server communication
- Clients connect to the server using WebSocket.
- The server facilitates communication by:
- Handling room creation and joining
- Receiving client events (e.g., room actions, votes), validating them, and executing the appropriate logic
- Broadcasting events, votes and results in real-time
- Managing session state (e.g., participants, room data)
- Outputs final session results upon completion
- Go 1.x or higher
- Make (optional, for using Makefile commands)
-
Clone the repository:
git clone https://github.com/skamranahmed/estimatex-server.git cd estimatex-server
-
Install dependencies:
make dep # or go mod tidy && go mod download
make run
# or
go run main.go
The server will start on port 8080
- URL Path:
/ws
- Protocol:
ws://
orwss://
action
: EitherCREATE_ROOM
orJOIN_ROOM
. It is a required parameter.name
: Client's display name. It is a required parameter.max_room_capacity
: Maximum number of participants. It is a required parameter whenaction
isCREATE_ROOM
.room_id
: ID of the room to join. It is a required parameter whenaction
isJOIN_ROOM
.
The server implements a bidirectional event system:
JOIN_ROOM
: When a client joins a roomBEGIN_VOTING
: Admin initiates votingMEMBER_VOTED
: Member submits their voteREVEAL_VOTES
: Admin reveals all votes
ROOM_JOIN_UPDATES
: Room membership updatesROOM_CAPACITY_REACHED
: Room is fullBEGIN_VOTING_PROMPT
: Prompt for admin to start votingASK_FOR_VOTE
: Request for members to voteVOTING_COMPLETED
: All votes receivedREVEAL_VOTES_PROMPT
: Prompt for admin to reveal votesVOTES_REVEALED
: Final vote resultsAWAITING_ADMIN_VOTE_START
: Waiting for admin to start next vote
CREATE_ROOM
: Room creation event
.
├── cmd/
│ └── app.go # Server setup and configuration
├── internal/
│ ├── api/ # API response handling
│ ├── controller/ # WebSocket connection management
│ ├── entity/ # Domain models
│ ├── event/ # Event definitions
│ └── session/ # Session management
├── main.go # Application entry point
├── Makefile # Build and run commands
└── README.md # Documentation
make dep
: Install dependenciesmake run
: Start the server
This project is licensed under the MIT License