
Add Apple Pay and Google Pay to Stripe checkout. Use when: (1) adding mobile wallet payments, (2) improving mobile conversion, (3) implementing one-tap checkout. Stripe Payment Request Button automatically detects device capabilities and shows Apple Pay (Safari/iOS) or Google Pay (Chrome/Android).
Master Expo Application Services (EAS) deployment for RidenDine mobile app. Use when: (1) building for iOS/Android, (2) submitting to App Store/Play Store, (3) configuring app signing, (4) managing build profiles, (5) over-the-air updates. Key insight: EAS Build for native compilation, EAS Submit for store uploads, EAS Update for OTA updates without app store review.
Master pnpm workspace management for RidenDine monorepo. Use when: (1) adding new packages or apps, (2) managing dependencies across workspace, (3) debugging module resolution, (4) running tasks across packages, (5) optimizing builds. Key insight: pnpm workspaces with "workspace:*" protocol for internal packages, strict dependency hoisting disabled.
Master Supabase SSR patterns for Next.js 15 App Router in RidenDine. Use when: (1) setting up Supabase clients, (2) implementing server-side auth, (3) protecting routes with middleware, (4) handling auth state changes, (5) debugging "user not defined" or session issues. Key insight: Different Supabase client factories for Server Components, Server Actions, Route Handlers, and Client Components - each with different cookie handling.
How to update the Pilot binary when user asks to "update pilot". Use when: (1) user says "update pilot", (2) user asks about pilot versions, (3) user tries `pilot update` command. Key insight: `pilot update` does NOT exist - must re-run installer or check license dashboard instead.
Master RidenDine's modular monorepo architecture with three independent apps. Use when: (1) understanding project structure, (2) adding new apps to monorepo, (3) configuring shared packages, (4) deploying apps independently, (5) debugging cross-app dependencies. Key insight: Admin, Web, and Mobile are separate apps with independent deployments but share packages via pnpm workspace (packages/shared, packages/data).
Master RidenDine's multi-party payment distribution model. Use when: (1) implementing payment splits, (2) onboarding new payment recipients (Chef, CoCo, Driver, Delivery Company), (3) calculating commission splits, (4) debugging payout issues, (5) extending payment infrastructure. Key insight: Customer pays → Platform distributes to 4 parties with CoCo receiving 60/40 split on $10/order base.
Master Stripe Connect for marketplace payments in RidenDine. Use when: (1) onboarding chefs to Stripe Connect, (2) implementing payment flows with platform fees, (3) handling webhooks, (4) managing payouts, (5) debugging payment issues. Key insight: RidenDine uses Standard Connect accounts with 15% platform fee deducted automatically via application_fee_amount.
Master Supabase Row Level Security (RLS) for RidenDine. Use when: (1) adding new tables, (2) modifying RLS policies, (3) debugging access control issues, (4) role-based data access. Key insight: All tables use RLS with role-based policies from profiles.role column.
Master Expo Router file-based routing for RidenDine mobile app. Use when: (1) adding new screens/routes, (2) implementing navigation patterns, (3) setting up auth guards, (4) debugging navigation issues, (5) configuring deep links. Key insight: Expo Router uses file-system based routing like Next.js App Router - file structure defines route structure.
Master order lifecycle and state management in RidenDine. Use when: (1) implementing order status updates, (2) debugging invalid state transitions, (3) handling role-based order operations, (4) building order tracking, (5) implementing cancellations. Key insight: Standardized lifecycle is draft → placed → accepted → preparing → ready → picked_up → out_for_delivery → delivered. Status enforcement via CHECK constraint + RLS policies.
Master incident response procedures for RidenDine production outages and emergencies. Use when: (1) production outage occurs, (2) database performance degradation, (3) payment processing failures, (4) security incidents, (5) coordinating incident resolution. Key insight: Blameless postmortems, incident commander role, clear communication channels, runbooks for common issues.
Master monitoring and observability for RidenDine production systems. Use when: (1) setting up monitoring dashboards, (2) configuring alerts, (3) debugging performance issues, (4) tracking errors, (5) analyzing user behavior. Key insight: Supabase built-in monitoring for database and Edge Functions, Vercel Analytics for web apps, Sentry for error tracking.
Master testing patterns for RidenDine across web, admin, and mobile apps. Use when: (1) writing tests for new features, (2) debugging test failures, (3) setting up test infrastructure, (4) mocking Supabase client, (5) testing auth flows, (6) E2E testing. Key insight: Vitest for web/admin (faster, better ESM), Jest for mobile (Expo ecosystem), different Supabase mocks for different contexts.
Master Supabase database migrations for RidenDine. Use when: (1) creating new migrations, (2) modifying schema, (3) adding RLS policies, (4) rolling back changes, (5) deploying to production. Key insight: Migrations are SQL files in backend/supabase/migrations/ executed in lexicographical order. Use supabase CLI to generate timestamps and apply migrations.
Master Vercel deployment for RidenDine web and admin Next.js apps. Use when: (1) deploying to production, (2) configuring environment variables, (3) setting up preview deployments, (4) debugging build failures, (5) configuring domains, (6) seeing "No Next.js version detected" error in Vercel builds, (7) setting up monorepo with separate projects on free tier. Key insight: Vercel monorepos require Root Directory configuration via dashboard (not vercel.json), GitHub integration auto-detects monorepo structure, free tier allows multiple projects.
Integrate Coinbase crypto payments into payment systems. Use when: (1) adding crypto payment support, (2) building onchain features, (3) implementing wallet functionality. Covers Coinbase Commerce (payment processor) vs CDP (developer platform), Server Wallets, Embedded Wallets, and multi-network support.