Latest work · Games · Personal project
CompletedShaanis
Traditional rules. A shared engine. A digital table.
The context
Project overview
Shaanis is my latest project: a traditional Somali card game available as a web app and an iOS app. The completed app separates a pure Dart rules engine, Flutter presentation and a real-time authority layer. Offline pass-and-play and private online formats share the same core rules.
The problem
Digitalising a traditional game means making its rules precise while preserving the way people play. Captures, redeals, grouped builds, final settlement and hidden hands all need consistent treatment across devices and game formats.
How it comes together
Technical approach
Keep rule legality and outcomes in one shared Dart engine. Flutter sends player intent and renders a permitted view. The online adapter invokes the compiled engine rather than independently rewriting game rules in TypeScript. Local practice uses its own session, separate from online identity and results.
Implementation & scope
Implemented
- Pure Dart rules engine, state transitions and settlement
- Flutter offline pass-and-play with private handoff
- Private 1v1 and team 2v2 multiplayer
- WebSocket commands and seat-specific redacted game views
- Reconnect and persistence handling in the online authority
- Offline computer opponent
- Accounts, public profiles and competitive statistics
- Team play validated with real users
- Physical-device and release acceptance testing completed
- Engine, client and authority regression test suites
- Released as a web app and on the iOS App Store
Engineering decisions
One source of gameplay truth
The pure Dart engine owns legal moves and settlement. Reusing its compiled form at the online boundary avoids parallel rule implementations drifting apart.
A client sees only its own view
Online presentation uses seat-specific views. Opponent and teammate hands stay hidden, and clients submit commands rather than official winners or results.
Separate practice from competition
Offline computer play runs a local session. It does not use an online player identity or create official competitive statistics.
Challenges & lessons
Turning community rules into explicit behaviour
The project maintains a canonical rules document alongside engine tests. Ambiguous mechanics need a reviewed rule before dependent implementation can be trusted.
Consistency through retries and reconnection
The authority persists accepted state and handles reconnecting clients. Regression suites cover hidden information, move sequencing, persistence and supported match formats.
What I’m taking forward
Rules, network authority and presentation have different responsibilities. Keeping those boundaries clear makes it easier to test game behaviour and add formats without trusting the client with hidden state or outcomes.
Where it stands
Completed and live on web and iOS. Team-play validation, physical-device testing and release acceptance are complete. The app includes accounts, public profiles and competitive statistics alongside online multiplayer and offline play.
Case study last reviewed 26 November 2026
Play on webView on the App Store