← Portfolio

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.

FlutterSupabaseFirebase pushEN / AR
Vault home screen with a rank card, featured Swiss tournaments, Live Now streams and a weekly calendar
2,426passing automated tests
384Dart files, about 124k lines
4roles: user, sub-admin, admin, owner
2languages with a runtime switch

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

Round 1 of 3

Matches

Standings

    Win is 1 point and a draw is 0.5, the defaults for a new tournament.

    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.

    Tournament overview for a live Swiss event
    Overview: your next match, registration and format.
    Standings with a podium
    Standings.
    Rounds with matches per table
    Rounds and tables.
    Match screen awaiting a result
    A match, waiting for results.

    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.

    FeedLeaderboardTourney Nights
    • 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.
    Categories screen with a card for each game A game community with Feed, Leaderboard and Tourney Nights tabs, a standing card and a countdown to the next tourney night

    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

    0Bronze
    Bronze0
    Silver1,000
    Gold2,500
    Platinum5,000

    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.

    Leaderboard with a podium and rank labels
    Per-game leaderboard with a podium and your own row pinned.
    Profile with level, win rate, achievements, missions and category progress
    Profile: level, win rate, missions and per-game progress.
    Missions grouped by daily, weekly and monthly
    Missions by reset window, with a claim button.
    Seasons list with an active season
    Seasons with a countdown.
    Another player's public profile
    A public profile.

    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.

    Warn1st violation
    Mute2nd violation
    Long ban3rd violation
    Permanent4th violation
    Community chat with a pinned post, replies and rank badges
    Chat with rank badges and a pinned post.
    The same chat in Arabic, right to left
    The same room in Arabic.
    AI moderation settings
    Moderation settings an admin can tune.
    Reported messages with delete and dismiss actions
    Reports queue.

    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.

    Marketplace with filters and listings
    Marketplace.
    Live Now streams page
    Live Now.
    Calendar of tournaments and events
    Calendar.
    Direct message conversations
    Direct messages.
    Notifications grouped by day
    Notifications grouped by day.
    Landing screen with the mascot
    Landing.
    Sign-up form
    Sign-up.

    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.

    Admin control center with counters
    Control center.
    User list with membership tiers and ban buttons
    Users and tiers.
    Tournament list with start and end controls
    Tournaments.
    Match results awaiting a decision
    Match results and conflicts.
    New tournament form
    New tournament form.

    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.

    FlutterDartSupabasePostgreSQL + RLSRealtimeEdge FunctionsFirebase FCMCrashlyticsVercel (web)GitHub Actions
    Home in dark theme
    Dark theme.
    Home in Arabic
    Arabic, right to left.
    Community feed in dark theme
    Feed, dark.
    Tournament overview in dark theme
    Tournament, dark.

    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.