Vault
Where card-game communities run their tournament nights.
A Flutter app for card-game esports. Join Swiss tournaments, follow a community for each game, chat in realtime, trade in a marketplace, and earn XP that follows you. English and Arabic, light and dark.
Swiss rounds, paired for you
Nobody is knocked out in a Swiss tournament. Each round pairs players on the same score, so everyone plays every round. In Vault the pairing runs in the database in one transaction. Try a round below: pick a winner for each match.
Demo Cup, 8 players
Matches
Standings
Created in the app
An organiser sets rounds, player cap, start time, points per win and draw, an optional entry fee in BHD, and an optional external link. The tournament is announced in every community of its game automatically.
Results with a referee
Players submit their own result. If two submissions disagree the match turns red as a conflict, and an admin or the game's sub-admin settles it. Rounds can advance and tournaments can end automatically once every result is in.
Seasons on top
Tournaments can be linked to a season with its own leaderboard. Admins create, activate and end seasons and link tournaments to them.




A home for every game
Pick your games once and each one gets its own space. Yu-Gi-Oh!, Union Arena, Star Wars, Riftbound, Pokémon and One Piece were set up in the screens shown here, and admins add categories from inside the app.
- Chat rooms per game, including Q&A rooms, on Supabase Realtime with 30-message pages of history.
- Reactions, pins and reports. Admins can pin, anyone can report, and deleted messages disappear for everyone.
- Direct messages with an online indicator that uses one presence channel per conversation.
- Support tickets open a chat with the team from inside the app.
XP, ranks and a tournament limit
Matches and missions award XP. Your rank comes from your score, and your membership decides how many tournaments you can be in at once. They are separate things, and the two demos below follow the app's own numbers.
Rank from score
Join gate by membership
Missions
Daily, weekly, monthly and one-time missions pay out XP. Each type has its own claim window, so a daily mission can be claimed once per day and a special one only once ever.
Per-game progress
Every game has its own score and leaderboard, next to a global level. The profile shows win rate, tournaments played, achievements and how far you are from the next rank.
Memberships expire
Silver, Gold and Elite are granted by admins for 7, 30 or 90 days. When one runs out, the account drops back to Free by itself.





Chat that polices itself, fairly
Messages are screened before they send. A flagged message adds a violation, and violations climb a ladder. The thresholds are settings an admin can change, and a wrongly flagged user can be given a violation back.
- AI screening. Text and images go to a moderation function that needs a signed-in user and is rate limited to 30 requests a minute. If the service is down, chat keeps working.
- Bans are enforced by the database, not just the app: writes to chat, DMs, reports, the marketplace and tournaments are refused for a banned user.
- Push that respects you. Notifications follow per-type preferences and mute settings, and arrive in Arabic or English.
Violation ladder
Default thresholds. Press the button to flag a message.




Trade cards, watch streams
- Marketplace. Peer-to-peer listings with photo galleries, search by game, saved favourites, and listings that expire on their own after a set time (two days in the clean-up job).
- Live Now. A row of embedded stream players on Home, and a stream link can be attached to a match.
- Urgent ticker and news. Admins post announcements that scroll across Home, plus news articles and events.
- Weekly calendar of tournaments and events, so a tournament night is never a surprise.
Registration verifies a phone number by one-time code. Login stays a normal password, and works with an email, a username or a phone number.







Run it from the phone
An admin console of about twenty screens covers users, tournaments, matches, seasons, categories, communities, events, news, marketplace, moderation, notifications, reports and support. The app only hides buttons. Real permission checks live in database policies and functions.
User
Plays, chats, trades, reports.
Sub-admin
Assigned to specific games. Settles match conflicts and runs tournaments for those categories.
Admin
Manages content, users, moderation and bans across the app.
Owner
The only role that can change other people's roles, enforced by a database trigger.





How it is built
Vault deliberately avoids a state-management package. Screens hold their own state, a few app-wide settings are notifiers, and services are plain classes that call Supabase.
Bilingual from the start
Around 2,800 lines of string table cover English and Arabic with a runtime switch and no build context needed. A responsive audit of about 270 cases checks layouts at different widths and text sizes.
Hardened backend
Row Level Security on user data, a private view for sensitive profile columns, sign-in through an edge function with rate limits, secrets in the database vault, and a diagnostics script that was run to 46 of 46 passes.
Pairings you can trust
The Dart pairing code is kept for unit tests only. Production pairs in a single Postgres function, so two admins cannot create two different round ones.




All screens are the real app, rendered with demo data.
Still open
- Many flows were verified by tests and database checks, not on a physical phone yet: sign-up end to end, push delivery and the release build.
- The database schema is not fully reproducible from the repo, so a read-only snapshot of the live one is kept beside the migrations.
- Typed data models were removed in favour of plain maps, which keeps screens simple but moves checking to runtime.