Skip to main content

Overview

d-sports-engage-native (package name: engage-native, v1.8.0) is the native mobile app for D-Sports. It mirrors the core PWA experience on iOS and Android: wallet, shop, leaderboard, locker room, and profile.
  • Run: bunx expo start or bun run start — then press a for Android or i for iOS, or scan the QR code with Expo Go.

Tech stack

CategoryTechnology
FrameworkExpo 54, React Native 0.81, React 19
AuthClerk (Expo)
PaymentsRevenueCat (react-native-purchases)
Web3Thirdweb
StateZustand
StorageMMKV
UILucide React Native
NavigationExpo Router (v6, file-based)
DatabaseSupabase (client-side)
PackageBun

Features

  • Wallet — Tokens, holdings, pack opening, crypto checkout (via PWA backend)
  • Shop — Collectibles, cart, coin bundles, checkout
  • Leaderboard — Rankings with league-based filters (OHL, Swiss, Community) and team leaderboards
  • Locker room — Social feed, quests, daily games (Pick’Em, Spin Wheel, Guess the Player), and team exploration with league grouping
  • Leagues — Teams are organized by league (e.g. OHL, Swiss, Community). Each team carries leagueInfo (name, country, logo) and leagueColors (dark/light palettes). The leaderboard supports filtering by league, and the locker room displays league badges on team cards.
  • Profile — User profile, settings, and accessibility options
  • Theme — Dark/light mode (default dark)

Getting started

1

Install dependencies

Clone the repository and run bun install.
2

Configure environment

Create a .env file at the project root with the following keys (only EXPO_PUBLIC_* keys are accessible at runtime):
VariablePurpose
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEYClerk authentication
EXPO_PUBLIC_API_URLBackend API base URL (e.g. https://api.d-sports.org)
EXPO_PUBLIC_TW_CLIENT_IDThirdweb client ID for Web3
EXPO_PUBLIC_REVENUECAT_API_KEYRevenueCat API key
EXPO_PUBLIC_REVENUECAT_APPSTORE_IDRevenueCat App Store ID
EXPO_PUBLIC_REVENUECAT_ENTITLEMENTRevenueCat entitlement (e.g. premium)
EXPO_PUBLIC_SUPABASE_URLSupabase project URL
EXPO_PUBLIC_SUPABASE_KEYSupabase publishable (anon) key
3

Start the dev server

Run bunx expo start. Press a for Android, i for iOS, or scan the QR code with Expo Go.
4

Build for devices (optional)

Use EAS for development builds: bun run build:dev (all platforms), bun run build:dev:ios, or bun run build:dev:android.

Architecture

The app uses file-based routing via Expo Router with route groups: (tabs) for main navigation, (auth) for login/signup, and (onboarding) for new users. Screen files contain only JSX — all state, effects, and handlers live in dedicated hooks (e.g. hooks/use-wallet-screen.ts, hooks/use-shop-screen.ts). Sub-components are extracted into components/wallet/, components/shop/, and components/locker-room/ with barrel exports.

API client modules

The API client layer in lib/api/ provides typed modules for every backend domain:
ModuleEndpoints
teams-apiList teams, follow/unfollow, follower counts — includes LeagueInfo and LeagueColors types
leaderboard-apiGlobal and team leaderboards, seasons, winners, search
wallet-apiToken balances, holdings, transactions
shop-apiProducts and collectibles
checkout-apiCrypto checkout (calls PWA backend)
user-apiProfile, sync, stats
quests-apiQuest listings and completions
locker-room-apiPosts, reactions, feeds
collectibles-apiOwned packs and items
All modules are accessed via the useApi() hook, which injects Clerk auth tokens automatically.

State management

  • Zustand with MMKV persistence for global state (theme, cart, points)
  • React Context for auth (UserContext), collectibles, and navbar visibility
  • MMKV cache in lib/api/cache.ts for offline-first API responses
The app targets both native and web (responsive, PWA-ready) and uses the same backend (d-sports-api) as the PWA for API and checkout flows.

Ecosystem overview

See how the native app fits with the PWA, site, and Mic’d Up.