
Synchronized multiplayer play
Firebase Realtime Database keeps the shared room state live while each player writes only to their own node.
A real-time SwiftUI multiplayer card game built on Firebase without a custom server.
Uno400 is a distributed multiplayer game where Firebase handles live room synchronization while the host device acts as the game arbiter. The project combines optimistic card play, idempotent writes, event-sourced repair, bot players, and clean MVVM separation to keep gameplay responsive under network instability.

SwiftUI views stay stateless while ObservableObject view models own UI state and orchestrate service calls.
One connected device acts as the source of truth for trick resolution, scoring, turn advancement, and bot play.
UUID-keyed pending plays and last-applied guards prevent repeated snapshots from double-applying a card.

Firebase Realtime Database keeps the shared room state live while each player writes only to their own node.

Cards leave the hand immediately on tap, then roll back only if Firebase rejects an invalid play or stale turn.

Anonymous sessions, reusable identity storage, and room state make it easy to create, join, rejoin, and continue games.

Custom uno400 invite links let players share room codes through WhatsApp and return directly into the game.
The game stays responsive while Firebase snapshots, host processing, and repair checks happen behind the scenes.
The game logic service is pure Swift and Firebase-free, which keeps card validation, trick resolution, scoring, and repair behavior unit-testable with XCTest.
The host can reconstruct hands from a baseline deal and append-only trick log when snapshot order or reconnects cause drift.
Hand counts and full-deck validation catch corrupted state before scoring and repair it without a custom server.
Burst Firebase callbacks are collapsed into one UI update, with room fingerprinting to skip redundant renders.
AI players submit through the same Firebase protocol as humans, so the rest of the system does not need bot-specific paths.
Uno400 uses Firebase as the transport layer while the host device owns game authority, host reassignment, bot turns, replay protection, and integrity repair.