Skip to content
Thomas Martel
← All projects

Game

Turn a music game my family invented into a real-time multiplayer platform

The Music Game

Status
In progress
Technologies
JavaRESTWebSocketDockerOpenAPIAsyncAPISpotify API
Source code
GitHub ↗

Why I built it

At home we play a homemade game: a random category is drawn, everyone picks a song, then everyone votes. I wanted to make it a real app, and use it to actually apply the software architecture I learned at ÉTS.

What I wanted to learn or prove

  1. 01Design and document the architecture myself before coding (arc42, OpenAPI, AsyncAPI)
  2. 02Keep the game smooth with several players, even when someone disconnects or an external service fails
  3. 03Keep the game core independent from technologies (hexagonal architecture)
  4. 04Work with AI like a real team would: through tickets, with review

Architecture

RESTWebSocketsearch, playback, playlistPlayeruserWeb appor any other clientThe Music GameModular monolith · DDDHexagonal · Java · DockerSpotifylibrary · playbackOther platformsApple Music, YouTube Musiclater
System context (arc42, section 3). Players go through a client; it talks to the backend over two channels, REST and WebSocket, and uses Spotify to search, play the songs and create the end-of-game playlist. The internal breakdown will come with the building block view.

Technical challenge: when a round doesn’t go as planned

Every round follows the same cycle: a random theme, a song to pick before a timer runs out, listening, then voting. The normal scenario is simple. The hard part is keeping every player in sync when it goes off track: a player who doesn’t pick in time, a tie, a pause, a disconnection.

I defined each of these cases in the use cases before writing a single line of code.

Process: architecture before code

I started by documenting the system with the arc42 template and writing the use cases. AI will generate most of the code, but only from tickets, to simulate a real work environment and force me to review everything. The rule I set for myself: no restrictions on AI, but no laziness.

Where I am: the goals and quality goals, the constraints, the context (Spotify, users, the web app) and five groups of use cases are defined. The next arc42 sections, such as the solution strategy, building blocks and architecture decisions, are still to come.

Retrospective

This project is in progress: the retrospective will come at the end.

Status: In progress