Overview
d-sports-engage-native (package name:engage-native) is the native mobile app for D-Sports. It mirrors the core PWA experience on iOS and Android: wallet, shop, leaderboard, locker room, profile, plus binder, market, quests, and a team-admin hub.
- App version: 1.25.9
- Run:
infisical loginonce, thenbun start— pressafor Android orifor iOS.
Tech stack
Features
- Wallet — Custodial token balances, send/receive, PIN-gated server-side signing, pack opening
- Shop — Collectibles, cart, coin bundles, RevenueCat IAP + Thirdweb crypto checkout
- Digital binder — Card inventory viewer and transfer flows (
app/binder) - Market — Pack store and trading stay on separate screens (
app/market/packs,app/market/trading) - Leaderboard — Multi-board rankings powered by the quest/points system
- Locker room — Social feed, posts, comments with
@handlementions, likes, stars, sport-driven lineups, live/game surfaces - Game Engine — Shared shell for Pick’em, Trivia, prize wheel, guess-the-player, daily lineup, card trivia, login-streak scratcher, six hockey playfields, air hockey, and locker-singularity (
/(tabs)/locker-room/games/[gameKey]) - Quests — Team-aware quests, daily quiz sessions, arena check-in, Fan Rep
- Profile — Stats, achievements, featured collectibles, settings, account deletion
- Admin hub — Team-manager surfaces for packs, collectibles, coins, games, moderation, users (
app/(admin)) - Theme — Dark/light mode (default dark), plus high-contrast and color-blindness palettes
- Push — OneSignal (not a second notification backend)
What changed since last docs sync
- App version is 1.25.9. iOS and Android
runtimeVersionare both 1.25.9. - Auth package is
@clerk/expo4.6.1(Clerk Core 3 rename from@clerk/clerk-expo). The source README may still mention the old package name. - HQ starred clubs sync through
/api/me/starred-teams. A star is a bookmark, not a follow. - The Game Engine registers
air-hockeyandlocker-singularityalongside Pick’em, Trivia,prize-wheel-spin,guess-the-player,daily-lineup,card-trivia,login-streak-scratcher, and six hockey games. Locker Singularity uses the idle ledger, not session verbs. How-to-Play walkthroughs are local-only and must not spend a daily attempt. - Deep links claim
app.d-sports.org(iOS Universal Links plus Android App Links for locker-room, profile, market, quests, binder, leaderboard, rate).api.d-sports.orgmobile callbacks are unchanged. - About → Settings includes a manual EAS OTA update check.
- Locker room can attach sport-driven lineups. The API persists
lineuponPOST /api/locker-roomand serves real rosters fromGET /api/teams/{id}/roster. - Native safety actions call
/api/user/mutesand/api/user/blocks(distinct from Game Center thread mute). - Secrets are injected with Infisical.
bun startwraps Metro ininfisical run --env=dev. - Mobile OAuth can land a 128-char hex token in the URL fragment (
#token=). Native stashes it in memory and redeems it atPOST /api/mobile/exchangefor a Clerk ticket, thensignIn.create({ strategy: 'ticket' }). - Custodial wallets no longer sign on-device. Sends call
POST /api/wallets/{address}/sign-transactionafter a PIN gate. - New route groups:
app/binder,app/market,app/quests, and a fullapp/(admin)ops hub. - Android App Links now cover
api.d-sports.orgmobile callbacks. - Official Android sideload APKs live in the public
engage-androidrepo.
Backend integration surfaces
- Primary API source:
d-sports-apiunder/api/*and/api/v1/engage/*. - Native consumes team, league, quest, Fan Rep, reward, wallet, commerce, social, games, and mobile-auth endpoints.
- Retry/caching logic and auth token injection live in
lib/api/*. API responses can fall back to MMKV cache.
Quest, Fan Rep, and pass UX
- Quest UI reflects team-scoped eligibility and pass-gated progression.
- Daily quests use the
/api/v1/engage/quests/*session API (start, submit, forfeit). - Fan Rep screens read
/api/v1/engage/rep/breakdownand/api/v1/engage/rep/ledger. - Reward presentation differentiates free/unpaid states and claimability.
- Native progression state must mirror backend eligibility and completion semantics.
Team-aware experiences
- Team discovery, favorite-team interactions, and leaderboard context are integrated across locker room and profile surfaces.
- Team and league metadata is sourced from backend sync pipelines fed by the
leaguesrepository. - The games tab joins
GET /api/games/catalogwithGET /api/v1/engage/games/catalog. Engine rows stay visible when the legacy catalog omits them. Unknown engine keys show Update required, they are not ignored.locker-singularityprogress uses the idle ledger routes.
Compliance and legal: pack opening odds
- Native odds disclosure behavior is documented with policy-aligned copy and evidence requirements.
- Disclosure values must come from backend payloads and remain visible/accessible near open actions.
Getting started
- Clone the repository and run
bun install. - Run
infisical loginonce. - Install or build an Expo dev client, then
bun start. - For EAS profiles and store submission, see the repo
docs/EAS-BUILDS.md.
Deep dives
Ecosystem overview
See how the native app fits with the PWA, site, and Mic’d Up.
