This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
bun run dev # Start Expo dev server (runs prebuild + asset generation first)
bun run ios # Run on iOS simulator
bun run android # Run on Android emulator
bun run web # Run in browser
bun run test # Run Vitest tests (watch mode)
bun run test:run # Run tests once
bun run check # Biome lint + format check
bun run fix # Auto-fix lint/format issues
bun run typecheck # TypeScript type check
bun run generate:assets # Regenerate type-safe asset imports (auto-runs on dev start)- React Native 0.81.5 (New Architecture + Hermes), Expo 54, React 19
- Expo Router 6 — file-based routing with typed routes enabled
- tRPC 11 — end-to-end type-safe API with HTTP batch link and SuperJSON serialization
- TanStack React Query 5 — server state, configured in
lib/providers/react-query.tsx - Zustand — client UI state (see
lib/store/) - Uniwind — Tailwind CSS 4 for React Native (configured in
metro.config.js, styles instyles/) - Biome via Ultracite preset — linting and formatting (no ESLint/Prettier)
app/
_layout.tsx # Root: wraps in Providers (GestureHandler, SafeArea, Theme, Keyboard, ReactQuery)
(stack)/_layout.tsx # Stack navigator
(drawer)/_layout.tsx # Drawer navigator
index.tsx # Home screen
(tabs)/_layout.tsx # Tab navigator (inside drawer)
index.tsx
two.tsx
other.tsx
setting/index.tsx
trpc/[trpc]+api.ts # tRPC API route handler (Expo Router server middleware)
Providers are composed with stackProviders() utility in lib/providers/index.tsx. Add new providers there rather than nesting them manually in the root layout.
- Router defined in
server/router.ts, subranged routers inserver/routers/ - Client configured in
lib/trpc.tsxwith SuperJSON transformer and HTTP batch link - API handler at
app/trpc/[trpc]+api.ts - Use
trpc.procedure.query/mutationon the server;trpc.someRoute.useQuery()on the client
- 10 OKLCH-based themes (5 light/dark pairs: classic, ocean, forest, sunset, lavender) in
styles/ - Theme selection persisted via
expo-secure-store(seelib/contexts/theme-context.tsx) - Access theme in components with
useTheme()hook - Extra themes registered in
metro.config.jsunderextraThemes
- Static assets live in
assets/static/ - Run
bun run generate:assetsafter adding assets — it generates type-safe imports inlib/assets.ts - Served via tRPC
asset.fromandasset.lottieSplashprocedures
- Use
cn()(fromlib/utils.ts) for merging Tailwind classes: combinesclsx+tailwind-merge - Component variants use CVA (Class Variance Authority)
- Avoid barrel files — import directly from source files
- No
any— useunknownand type narrow - No
console.login production code for...ofover.forEach()and indexed loopsasync/awaitover promise chains; always handle errors with try-catch- Early returns to reduce nesting
- Don't define components inside other components
- Run
bun run fixbefore committing to auto-resolve most issues