2.6 KiB
2.6 KiB
Repository Guidelines
Project Structure & Module Organization
- Entry points:
App.js,index.js,index.web.js. - Source code:
src/(key folders:actions/,components/,hooks/,screens/,providers/,navigation/,utils/,styles/,assets/). - Native projects:
android/,ios/. - Assets:
assets/andsrc/assets/. - Config:
app.json,eas.json,metro.config.js,config/. - Backend:
functions/(Firebase Cloud Functions, Node 20).
Build, Test, and Development Commands
- Install deps:
yarn(preferred; lockfile isyarn.lock). - Run app:
yarn start(Expo dev client),yarn android,yarn ios,yarn web. - Clean native builds:
yarn clean(runsexpo prebuild --clean). - Web build:
yarn build:web→ outputs todist/. - Desktop (pake):
yarn build:desktop:dev(requires dev server),yarn build:desktop:prod. - Firebase functions:
cd functions && npm run serve(emulators),npm run deploy.
Coding Style & Naming Conventions
- Languages: React Native (JS/TS). Indentation: 2 spaces.
- dont do eslint checks
- Components and screens: PascalCase filenames, e.g.,
MusicDetails.js,CreateLyricsWithAi.js. - Hooks: prefix with
use(e.g.,src/hooks/useFirestorePagination.js). - Utilities: lowerCamelCase modules in
src/utils/orhelpers/; prefer named exports. - Avoid duplicating inline styles; share via
src/styles/. - Lors du parsing de payloads (API, callbacks, fichiers), utilise uniquement les champs attendus : ne multiplie pas les fallbacks "au cas où". Si la structure exacte t'échappe, demande-la avant d'ajouter du code.
Testing Guidelines
- No unit tests configured yet. If adding tests, prefer Jest +
@testing-library/react-native. - Place tests under
src/**/__tests__/or as*.test.[jt]sxnear sources. - Until tests exist, include manual test steps in PRs (platform, device, steps, expected results).
Commit & Pull Request Guidelines
- Commits: concise, imperative subject (≤72 chars). Optional scope, e.g.,
feat(login): add Google button. - PRs must include: clear description, screenshots/video for UI changes, reproduction and verification steps, linked issues, and notes on breaking changes.
- Verify the app launches on Android, iOS, and Web locally; fix lint and type warnings before requesting review.
Security & Configuration Tips
- Never commit secrets (e.g.,
functions/serviceAccountKey.json, API keys). Use Firebase/Expo secrets and environment config. - Manage runtime config via
app.json/eas.jsonor remote config; avoid hardcoding credentials. - Before EAS builds, run
yarn cleanto resync native projects.