Welcome to ChordLab — a testing and demo tool for the Chord library. It showcases real-time state synchronization with delta tracking across three interactive features: chat, collaborative canvas, and cooperative minesweeper.
- Elixir ~> 1.14
- Phoenix ~> 1.7
-
Clone the repository:
git clone https://github.com/stefanzvkvc/chord_lab cd chord_lab -
Install dependencies:
mix deps.get npm install --prefix assets
-
Start the server:
mix phx.server
-
Open your browser and navigate to:
http://localhost:4000
- Public and private messaging with real-time delta syncing via Chord
- Typing indicators tracked as Chord context keys
- Unread message badges and online presence tracking
- Delta inspector to visualize outgoing, incoming, and sync deltas
- Connection loss simulation with automatic reconnection and delta catch-up
- 16x16 pixel grid — paint together in real-time
- 10-color palette with paint brush and eraser tools
- Every pixel change is a Chord context update generating a delta
- Multi-client real-time sync via PubSub delta broadcasting
- Connection loss simulation — reconnect and sync missed pixel changes
- 3 difficulty levels: Easy (8x8, 10 mines), Medium (12x12, 25 mines), Hard (16x16, 50 mines)
- Left click to reveal, right click to flag
- Cascade reveal on empty cells — batched as a single Chord delta
- Win/loss detection with game status tracked as a Chord context key
- All players share the same board in real-time
- Connection loss simulation — reconnect and catch up on reveals made by teammates
- Delta Inspector — a side panel showing every delta flowing through Chord, color-coded by direction (outgoing, incoming, sync)
- Connection loss simulation — test reconnection and Chord's delta-based state recovery
- Online presence via Phoenix Presence
- Chord for context management and delta syncing
- Phoenix LiveView for real-time web interfaces
- Phoenix Presence for user tracking
Contributions are welcome! Feel free to open issues or submit pull requests.