This file configures GitHub Copilot suggestions for this repository.
React Native 0.84 + TypeScript 5 (strict) boilerplate. Stack: react-navigation v7, reanimated v4, axios, i18next, and a provider-agnostic AI service layer (OpenAI / Anthropic / Gemini).
- Use path aliases, never relative
../../paths - Key aliases:
@shared-components,@services/*,@screens/*,@hooks,@theme/*,@fonts,@utils - Import from
@services/aibarrel β never fromsrc/services/ai/providers/*directly
const styles = useMemo(() => createStyles(theme), [theme])in every component- Colors from
const { colors } = useTheme()β never hardcoded hex values - Style files: co-located
MyComponent.style.tsusingcreateStyles(theme: ExtendedTheme)
- Text:
TextWrapperfrom@shared-components/text-wrapper/TextWrapper(never bare<Text>) - Touchables:
RNBounceablefrom@freakycoder/react-native-bounceable(neverTouchableOpacity) - Safe area:
SafeAreaViewfromreact-native-safe-area-context(never fromreact-native) - New shared components go in
src/shared/components/<name>/RN<Name>.tsx+.style.ts, exported fromindex.ts
- Props interfaces:
Iprefix (IRNButtonProps,IMyScreenProps) export type { Foo }for type-only re-exports- All locals and parameters must be used (
noUnusedLocals,noUnusedParametersare on) - Exhaustive switches:
const x: never = valin thedefaultcase
- Screen names from
SCREENSconstant (src/shared/constants/index.ts) β never raw strings - Register in
src/navigation/index.tsx
AIConfig.modelis a plainstringβ never default to a specific model name in service code- Use
useAIChatfor conversations,useAICompletionfor single completions - Streaming:
streamMessage()fromuseAIChatorstreamAIMessage()from@services/ai - To add a provider: implement
IAIProviderβ addcaseinAIService.tsβ extendAIProvidertype
npm run start:freshβ reset Metro cache (required after adding path aliases)npm run lintβ ESLint check before committing
- Hardcode color hex values in style files
- Add model name strings (e.g.
"gpt-4o") inside the AI service layer - Store API keys in source files
- Use
<Text>from react-native directly - Use
TouchableOpacityorPressableβ useRNBounceable - Use relative imports (
../../) when a path alias covers it