Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pong with Centrifugo

AWS Amazon EKS Terraform ArgoCD Docker Go JavaScript Redis

A real-time multiplayer Pong game built with Centrifugo WebSocket server, Go backend, and vanilla JavaScript frontend. Players connect via WebSocket for low-latency gameplay, with automatic disconnect handling through Redis presence monitoring.

Live demo: pong.stabalmo.pro

Pong gameplay preview

Get started

See the Getting Started guide for installation instructions.

Repositories

Repository Description
frontend Vanilla JavaScript game client with canvas rendering and Centrifugo WebSocket integration
backend Go REST API handling game logic, JWT authentication, and Redis presence monitoring
iac Infrastructure as Code for Redis and Centrifugo services
terraform AWS infrastructure provisioning with EKS, ElastiCache Redis, S3, and CloudFront

Next steps

How it works

Players authenticate via JWT tokens and connect to Centrifugo WebSocket channels. Game state updates flow through dedicated channels for each player position. When a player disconnects (browser close, network failure, or page refresh), the backend detects this through dual strategies: Redis pub/sub for instant leave events, and presence monitoring for stale connections. The game automatically ends and the lobby resets.

Development approach

The backend and frontend were largely written using vibe-coding (AI-assisted development). My focus was on system architecture, infrastructure design, and understanding how Centrifugo, Redis, and real-time communication work together. I'm not proficient in Go or Vue/JavaScript, but that didn't stop me from building a working multiplayer game.

This approach lets you focus on what matters most — architecture decisions, SRE practices, and understanding the system as a whole — while AI handles the implementation details. Even Linus Torvalds uses AI assistance for his personal projects.

Contributing

Contributions are welcomed and encouraged. Pull requests welcome. For major changes, open an issue first.

About

A real-time multiplayer Pong implementation demonstrating WebSocket-based game architecture with Centrifugo, Go, and vanilla JavaScript.

Resources

Author

Created by Danila Alferov (LinkedIn, @Stabalmo)

About

Real-time multiplayer Pong game – powered by Centrifugo WebSocket server with Redis-backed presence detection.

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors