Skip to content

Kaplin86/party-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PARTY API

This is a lightweight Node.js server designed for building room-based multiplayer party games. It contains a simple event-log API for syncing game state across clients without requiring WebSockets or complex backend infrastructure. It is was created for rapid prototyping of games similar to Jackbox, Gartic Phone, and Kahoot. Intended for more educational purposes.

This api is fairly bare bones and has a handful of issues (like security), and is not fully suited for a professional game release

API:

Creating Rooms

Create Room : POST /create-room

Response: { "roomId": "ABCD"}

Sending Events

Send Event : POST /room/:roomId/event

Body : { "type": "string", "playerId": "string", "payload": {} }

Response : true if successful, false if otherwise

Get Events

Get Events : GET /room/:roomId?since=INDEX

Response: { "events": [], "lastIndex": 0 }

Core event format

{
  "type": "join | startRound | submitDraw | endRound | etc.",
  "playerId": "string", 
  "timestamp": 123456789, 
  "payload": {}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors