This is a desktop client made using tauri framework. This client is used by users to play/spectate the games.
-
State Management:
Implemented using Zustand for efficient and scalable state handling across the app. -
Custom WebSocket Context:
Developed a custom WebSocket context to handle three distinct channels:- User Events
- Player Events
- Spectator Events
-
Smooth Animations:
UI animations are powered by Framer Motion for a polished and responsive user experience.
- Play turn-based games with friends or matched players.
- Friends on your list can spectate your games, enhancing community engagement.
-
Staked Games
- Players place a bet on their victory.
- Spectators can also place bets within the first 5 minutes of the match.
-
Normal Games
- Function exactly like staked games, but without any monetary bets.
-
Create a Lobby
- Start a private lobby and invite friends to play.
- Currently supports 2 players (since only Chess is available).
-
Find a Match
- Automatically match with random players.
- Staked players are only matched with other staked players.
-
Rewatch completed matches at any time.
- Normal Games: Restart automatically.
- Staked Games: Require players to place new bets to restart.
Note: Every match (including replays) is treated as a unique, separate entity.
Bets are evaluated independently for each instance.
Architecture Design (Lucid Chart)
Codebase | Description |
---|---|
Vortex | Contains Axum APIs for Auth and other services for necessary processing |
Vortex-Client | Tauri Client Used to Play/Join Games as Players or specate any games |
Vortex-Mobile | React Native App to scan QR codes and stake in the game and check status of any previous bets |
Vortex-Pub-Sub | Elixir Service to broadcast realtime events to players and spectators |
Vortex-Exchange | Smart Contracts made using Anchor framework so that players/spectators can place their bets |
Executor-Bots | Bots which consume game result events and settle bets for the players |
Vortex-Matchmaker | Matchmaking Service which matches any two players with similar ratings |