This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
yarn test- Run unit tests without coverageyarn test:coverage- Run unit tests with coverageyarn test:e2e- Run Maestro E2E tests (requires Maestro installation)
yarn lint:ts- Run TypeScript type checkingyarn lint- Run ESLint with auto-fixyarn prettify- Format code with Prettieryarn pretty:check- Check Prettier formatting
- src/app/ - Expo Router app directory with file-based routing
- src/application/ - Application layer with business logic and queries
- src/domain/ - Domain layer with entities, contexts, and theme
- src/features/ - Feature-specific components and logic
- src/infra/ - Infrastructure layer (API, storage, analytics, etc.)
- src/shared/ - Shared components, hooks, and utilities
- React Native with Expo and Development Builds
- Expo Router for file-based routing
- TypeScript with custom ESLint config
- Unistyles for theming and styling
- GraphQL with CodeGen and TanStack Query
- Zustand for state management
- i18next for internationalization
- Sentry for error monitoring
- PostHog for analytics and feature flags
- Uses Unistyles for consistent theming
- Theme file in
src/domain/theme/unistyles.ts
- Zustand store in
src/infra/store/ - Slice-based architecture (
app,session) - Persistence with selective field exclusion
- Immer integration for immutable updates
- GraphQL client with TanStack Query
- Code generation from schema
- Token-based authentication
- Query client persistence
- Request failure queue for offline support
- Jest with React Native Testing Library
- Maestro for E2E testing
- Coverage reporting with exclusions for generated code
- Pre-commit hooks run related tests
$*maps tosrc/*for clean imports- Platform-specific file extensions (
.ios.tsx,.android.tsx)
- English is the default locale
- Translation files in
src/infra/i18n/resources/ - All locales must have same keys as English (linted)
- Supports RTL languages
- PostHog-based feature flags
- Components for A/B testing (
FeatureFlagSplitter) - Hooks for flag access (
useGetBooleanFeatureFlag,useGetFeatureFlag)
- Sentry integration for crash reporting
- Global error boundary (
FullscreenErrorBoundary) - Breadcrumb tracking for debugging
- PostHog for product analytics
- Screen tracking and app state monitoring
- Purchase tracking via RevenueCat
- Use development builds for native dependency testing
- Storybook for component development
- Pre-commit hooks ensure code quality
- Conventional commits for automated changelogs
- Git Flow with develop/master branches
- Always use TypeScript
- Always use yarn
- Use ES modules, use
import, don't userequire - Prefer async/await where possible and always handle error cases
- Always wrap arrow function args in parentheses
- Never define inline styles and always use Unistyles's StyleSheet API
- When there are ESLint warning, always try to fix them, and ask for feedback if you can't
- For components, hooks or utils used outside of the current folder, create an index.ts file that does the exporting by using the
export * from Xsyntax.
- Use arrow functions with extracted Props interfaces
- Don't use
React.FCtype - Prefer interfaces to types for Props
- To extract Props type, use
ComponentProps<typeof MyComponent> - No need to forwardRef, as the project uses React 19
- ESLint configuration is defined at the root of the project
- TypeScript strict mode enabled
- React strict mode is also enabled
- Always run
yarn lint,yarn lint:tsandyarn prettifythen fix potential errors before finishing a task