menuyukti-mobile
DEPRECATED / inactive Expo React Native app (apps/mobile-app). Kept in the repo but not an active product track — prefer the web customer PWA in apps/web. Use this skill only when maintaining legacy C
SKILL.md.agents/skills/menuyukti-mobile/SKILL.md
GitHubMenuyukti: apps/mobile-app (deprecated)
Status: Deprecated / inactive. Customer focus is the web PWA (apps/web customer shell + Serwist). Keep this app in the monorepo for now; do not expand it as the primary customer path. Prefer menuyukti-web for new customer work.
Expo (React Native) CRM client (legacy): enroll via CRM token, then Home / Rewards / Profile. Product data goes through the Next.js mobile BFF (proxies private GraphQL). CRM enroll: POST /api/mobile/crm/v1/enroll on the web app.
For monorepo boundaries, see menuyukti-repo-orientation.
Companion skills
When implementing in apps/mobile-app, follow these skills in addition to this doc.
Feature work (default)
expo-native-ui— Native-feeling screens, layout, colors, controls.expo-data-fetching— Network/API calls, caching, errors.react-navigation— Stacks, tabs, headers, safe areas (this app uses React Navigation, not Expo Router).vercel-composition-patterns— Compound components and context providers.
Upgrades, shipping, and performance
expo-upgrade— Expo SDK upgrades and dependency fixes.expo-dev-client— Dev clients when native modules need a custom build.expo-examples— Canonical Expowith-*integration patterns.eas-app-stores/eas-workflows— Store release and EAS CI.react-native-best-practices— FPS, TTI, lists, re-renders, bundle size.
Do not restructure this app to match Expo Router “new project” layouts. Prefer React Navigation skills over Expo Router unless migrating intentionally.
Layout (high level)
| Concern | Typical locations |
|---|---|
| Entry | App.tsx, index.ts |
| Navigation | navigation/RootNavigator.tsx, MainTabs.tsx |
| Screens | screens/ — EnrollScreen, HomeScreen, RewardsScreen, ProfileScreen |
| UI primitives | components/ — Screen, Button, TextField, cards |
| Theme / brand | theme/tokens.ts, BrandContext.tsx, SessionContext.tsx |
| CRM enroll + session | lib/enroll.ts, lib/keys.ts, sessionStorage.ts, sessionCodec.ts, secureStorage.ts |
| CRM auth / API | lib/crmAuth.ts, crmClient.ts, accessToken.ts, tokenStorage.ts, signNonce.ts |
| Cashback | lib/cashback.ts — authenticated CRM reads via crmFetch |
| Mock / demo data | data/mockRestaurant.ts |
| Expo config | app.json, package.json |
Commands: apps/mobile-app/package.json scripts (pnpm --filter mobile-app …).
Boundaries
- No database drivers or migrations in the mobile app — call GraphQL / CRM HTTP only.
- Prefer pnpm (
pnpm --filter mobile-app …from repo root, or scripts insideapps/mobile-app). - Secrets: use
EXPO_PUBLIC_*only for non-secret public config (e.g.EXPO_PUBLIC_CRM_API_URL). Device private keys stay in SecureStore (native) or localStorage (web demo) vialib/keys.ts— never log or ship private key material. - CRM enroll backend lives in
apps/graphql(crm_auth/,/crm/v1/enroll) — seemenuyukti-graphql.
Session and navigation
SessionProviderhydratessession(customerId,deviceId, optionalappId) and profile from SecureStore; exposesisHydratedso the navigator does not flash enroll.RootNavigator: native stack withEnroll|Main(tabs), gated by hydrated session. Deep links use schememenuyukti(menuyukti://enroll?token=…&app=…).- Enroll flow: parse token / deep link →
ensureDeviceKeypair()→enrollDevice()→ persist session → tabs. resetSessionclears SecureStore session, profile, and device key.
Brand theming uses BrandProvider + Warm Editorial tokens in theme/tokens.ts (aligned with web/UI brand colors). Override via brand prop for white-label builds.
Networking
- Public BFF base:
EXPO_PUBLIC_CRM_API_URL(defaulthttp://localhost:3000). - Enroll:
POST /api/mobile/crm/v1/enroll(lib/enroll.ts). - Authenticated CRM:
crmFetch(lib/crmClient.ts) →/api/mobile/crm/v1/*with device access token fromcrmAuth/accessToken(refresh token in SecureStore viatokenStorage). - Example product read: cashback via
lib/cashback.ts(GET .../me/cashback). - Quality:
pnpm lint(ESLint /eslint-config-expo),pnpm check-types,pnpm test,pnpm check:expo(expo-doctor),pnpm format-check. - Keep new client code under
lib/and followexpo-data-fetching.
Related
| Topic | Skill |
|---|---|
| CRM / enroll API | menuyukti-graphql |
| Monorepo map | menuyukti-repo-orientation |
| Web counterpart | menuyukti-web |
Canonical docs
- Expo docs matching the app’s SDK (see
apps/mobile-app/package.jsonexpoversion)
Progressive disclosure
Split long screen or API maps into reference.md in this folder if this file grows.