Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 3.94 KB

File metadata and controls

83 lines (61 loc) · 3.94 KB

Contributing to React Native Starter

Thanks for your interest in contributing. This document explains how to get your changes merged.

Before you start

  • Read the README for project overview and setup.
  • For code layout, conventions, and where things live, see AGENTS.md (written for AI agents but useful for humans too).

Development setup

  1. Clone the repo and install dependencies: npm install, then npx pod-install ios for iOS.
  2. Copy .env.example to .env and adjust if needed.
  3. Run the app: npm start, then npm run ios or npm run android.

Quality checks (required before submitting)

Run these locally; CI will run them as well:

  • Biome: npm run lint runs biome check . (no writes). npm run format applies fixes (biome check . --write). There is no ESLint/Prettier in this repo.
  • Type-check: npx tsc --noEmit
  • Tests: npm test
  • Guards (if you touched relevant files):
    • After changing SVGs: npm run gen:icons and ensure npm run check:icons passes.
    • After changing i18n keys: npm run i18n:all.
    • npm run check:imports must pass (path aliases only, no deep relative imports).

Branch naming

Use a short, descriptive branch name, e.g. fix/auth-redirect, feat/settings-theme-toggle, docs/readme-quick-start.

Pull requests

  • Keep PRs focused: one feature or fix per PR when possible.
  • Ensure all quality checks above pass.
  • If your change is user-facing or notable, add an entry to CHANGELOG.md under ## Unreleased.
  • Do not include unrelated refactors or formatting-only changes in the same PR.

Reporting issues

Use the bug report or feature request templates when opening an issue. Include environment details (React Native version, Node version, OS) for bugs.

For security concerns, do not file a public issue. Use GitHub → Security → Report a vulnerability if enabled for this repository, or contact the maintainers privately.

PR checklists

Use the relevant checklist(s) when reviewing or submitting a PR.

React Query

  • Keys defined in api/keys.ts — not inline in components.
  • Freshness profile from src/shared/services/api/query/policy/freshness.ts — no magic numbers.
  • Mutations include meta.tags; api/keys.ts has the tag → keys mapping.
  • API response validated with Zod before caching.
  • Normalized errors only (normalize-error.ts).
  • Pagination uses infinite queries; resets on params change.
  • Offline behavior and post-replay invalidations defined.

State & stores

  • One responsibility per slice; no monolithic store.
  • Actions atomic; no side effects inside store definitions.
  • Narrow selectors; components subscribe to specific fields.
  • Only safe bits persisted (theme/locale); no secrets in Zustand.
  • No server data duplicated from React Query.
  • Logout resets all slices and clears sensitive storage.

Navigation

  • Route constants from src/navigation/routes.ts — no inline strings.
  • ParamList entries added to the feature's navigation/param-list.ts.
  • Provider order matches App.tsx (i18n → GestureHandler → SafeArea → Theme → ErrorBoundary → Query → Nav).
  • Half-sheet / modal screens use HALF_SHEET_OPTIONS preset.

Assets & theming

  • No raw colors, spacing, or font values — theme tokens only.
  • SVGs under assets/svgs/; icons.ts regenerated (npm run gen:icons).
  • npm run check:icons passes.
  • Light and dark mode both reviewed for contrast.

Security & NFRs

  • No sensitive data in logs or analytics.
  • Secrets and tokens in Keychain / Keystore — not in Zustand or plain storage.
  • Accessibility roles, labels, and hit targets on all interactive elements.
  • Offline UX acceptable (cached data shown; pull-to-refresh available).
  • i18n keys present in all locales (en, de, ru).