Overview
d-sports-engage-native (package name:engage-native, version 1.10.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. The app also supports web via Metro bundler with PWA capabilities (display: standalone).
Tech stack
| Category | Technology |
|---|---|
| Framework | Expo 54, React Native 0.81, React 19 |
| Auth | Clerk (Expo) |
| Payments | RevenueCat (react-native-purchases) |
| Web3 | Thirdweb SDK |
| State | Zustand |
| Storage | MMKV (synchronous persistence) |
| UI | Lucide React Native |
| Navigation | Expo Router 6 (file-based routing) |
| Monitoring | Sentry (@sentry/react-native) |
| Package mgr | Bun |
Features
- Wallet — token balances, holdings, pack opening animations, and crypto checkout via the PWA backend
- Shop — collectibles, cart, coin bundles, and crypto checkout with Thirdweb
- Leaderboard — rankings with filters and user stats
- Locker room — social feed, daily Pick’Em and Spin-the-Wheel games, quests, team exploration, and fan profiles
- Profile — user profile, team membership, and full settings suite
- Theme — dark/light mode (dark by default)
- Onboarding — guided first-run flow for new users
Project structure
Getting started
Configure environment variables
Create a
.env file in the project root. Only EXPO_PUBLIC_* keys are accessible at runtime:| Variable | Purpose |
|---|---|
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY | Clerk authentication |
EXPO_PUBLIC_API_URL | Backend API base URL (defaults to https://api.d-sports.org) |
EXPO_PUBLIC_TW_CLIENT_ID | Thirdweb client ID for web3 |
EXPO_PUBLIC_REVENUECAT_API_KEY | RevenueCat API key |
EXPO_PUBLIC_REVENUECAT_APPSTORE_ID | RevenueCat App Store identifier |
EXPO_PUBLIC_REVENUECAT_ENTITLEMENT | RevenueCat entitlement name |
EXPO_PUBLIC_SUPABASE_URL | Supabase project URL |
EXPO_PUBLIC_SUPABASE_KEY | Supabase publishable key |
Build and deploy
The project uses EAS Build for native builds. Build profiles are defined ineas.json:
| Profile | Purpose | Command |
|---|---|---|
development | Dev client with simulator support | bun run build:dev |
preview | Internal distribution (APK on Android) | bun run build:preview |
staging | Staging channel with auto-increment | bunx eas-cli build --profile staging |
production | Production release with auto-increment | bun run build:prod |
bun run update (uses eas-cli update).
The EAS CI workflow (
.github/workflows/eas-update.yml) automatically triggers updates on push.Architecture patterns
- File-based routing — Expo Router with route groups
(tabs),(auth), and(onboarding) - Modular screens — screen files contain only JSX; state, effects, and handlers live in dedicated hooks (e.g.,
use-wallet-screen.ts) - API client layer —
lib/api/client.tswrapsfetchwith automatic Clerk token injection and parses the normalized{ success, data, error, code }envelope fromd-sports-api - MMKV cache fallback —
lib/api/cache.tscaches API responses in MMKV so screens can render instantly from cache while refreshing in the background - Zustand + MMKV — global store (
services/store.ts) persists theme, cart, and points via synchronous MMKV - React Context — auth/user state, collectibles, navbar visibility, and accessibility settings
- Path alias —
@/*maps to the project root
API integration
The app connects to the same backend as the PWA (d-sports-api). The useApi() hook in lib/api/index.ts provides access to all API modules:
user, quests, leaderboard, wallet, lockerRoom, teams, collectibles, shop, and checkout.
Ecosystem overview
See how the native app fits with the PWA, site, and Mic’d Up.
