← Back to work

Mazurka Cafe

Mazurka Cafe is a listening room in the spirit of plug.dj: everyone in a room hears the same YouTube track at the same moment, takes turns on the decks, and votes on what's playing while pixel avatars dance under a synchronized light show. Our own product, built end to end, and live at mazurka.cafe.

Client Our own product
Role Design, build, and operations
ReactNode.jsSocket.IOPostgreSQLRedis
A Mazurka Cafe room: video playing above a pixel dance floor, DJ queue and chat alongside

A music venue in a browser tab.

Rooms hold a rotating DJ booth: your top playlist track plays on your turn, then the decks pass to the next person in line. Everyone hears the same song at the same position, woots or mehs it, chats, and walks a pixel avatar around a dance floor where the video, the bar, and a laser light show share one canvas. The show runs in step for the whole room and climbs a tier brighter with every woot. Guests can listen without an account; signing in is what unlocks the decks.

This is the portfolio's one project with no client: we designed it, built the client and server, and run it in production. It is here because it shows the far end of what "custom code" means when a platform has nothing to offer, real-time state shared by every visitor at once.

Everyone hears the same moment.

A listening room fails the moment listeners drift apart, so everything follows from one decision: the server owns the clock, and browsers only follow it. Each room keeps a single authoritative record of what's playing and when it started; every listener's player seeks to the same computed position and corrects itself if it drifts more than a couple of seconds. Clients never advance playback themselves, which means a laggy tab can fall behind but can't drag the room with it. A new track's start time is set a beat in the future, so every player gets a moment to buffer and the whole room hits the intro together.

Built to be left running.

The unglamorous parts got the most engineering. A dead video and a blocked ad blocker look identical from one browser, so a track is only skipped when two listeners independently fail on it; one broken browser can't vote music off the decks for a room. A refresh or a dropped connection holds your place in the DJ rotation for a grace window instead of dumping it. Deploys wait on the test suite, database migrations apply themselves, and nightly backups live off the hosting platform entirely.

It runs today at mazurka.cafe. Walk in as a guest and the current track is already playing at the room's position, which is the whole pitch in one page load.

How it's built.

React + Vite

The room client. Video, dance floor, and bar share one canvas scene, driven by a render loop built to never re-mount mid-track.

Node.js + Socket.IO

The server and the room's single source of truth: every event rides one socket, and the server's clock is the only one that counts.

PostgreSQL + Redis

Postgres keeps what must survive a restart (accounts, playlists, history); Redis keeps the live room (presence, queue, the clock).

Railway

One service runs it all. The build bundles the client, the server serves it, and migrations apply on every deploy behind a CI gate.

Tell us what you're building.

Every project starts with a conversation, not a contract. We respond within 24 hours.

Start a Project