PD-96 — Plan d'implémentation¶
📚 Navigation User Story
| Document | | | ---------- | -- | | 📋 [Spécification](PD-96-specification.md) | | | 🛠️ **Plan d'implémentation** | *(ce document)* | | ✅ [Critères d'acceptation](PD-96-acceptability.md) | | | 📝 [Retour d'expérience](PD-96-rex.md) | | [← Retour à mobile-ios](../PD-195-epic.md) · [↑ Index User Story](index.md)Objectif¶
Initialiser le projet React Native iOS avec Expo SDK 52, TypeScript strict, et pipeline CI/CD GitLab.
Choix techniques retenus¶
- Framework : Expo SDK 52 (managed workflow)
- Langage : TypeScript 5.x strict mode
- Build : EAS Build (Expo Application Services)
- Tests : Jest + React Testing Library
- Qualité : ESLint + Prettier + SonarQube
- CI/CD : GitLab CI avec stages lint/test/build
Architecture ciblée¶
ProbatioVault-app/
├── src/
│ ├── components/ # Composants réutilisables
│ │ ├── common/ # UI génériques
│ │ ├── security/ # PIN, biométrie
│ │ └── vault/ # Documents, dossiers
│ ├── screens/ # Écrans navigables
│ ├── services/ # Logique métier
│ ├── hooks/ # Hooks React custom
│ ├── store/ # State management (Zustand)
│ ├── crypto/ # Cryptographie client
│ ├── navigation/ # Configuration navigation
│ └── types/ # Types TypeScript
├── __tests__/ # Tests unitaires
├── app.json # Configuration Expo
├── eas.json # Configuration EAS Build
├── tsconfig.json # TypeScript strict
└── .gitlab-ci.yml # Pipeline CI/CD
Découpage technique¶
Phase 1 : Initialisation Expo¶
npx create-expo-app@latest ProbatioVault-app- Sélectionner template TypeScript
- Configurer app.json (bundle ID, version, SDK 52)
- Configurer eas.json pour builds iOS
Phase 2 : Configuration TypeScript¶
- Activer
strict: truedans tsconfig.json - Activer
noImplicitAny,strictNullChecks - Configurer paths aliases (
@/components, etc.) - Ajouter types manquants (
@types/*)
Phase 3 : Structure dossiers¶
- Créer arborescence src/ conforme
- Configurer exports index.ts par module
- Ajouter .gitkeep dans dossiers vides
- Documenter structure dans README
Phase 4 : Qualité code¶
- Configurer ESLint avec règles strictes
- Configurer Prettier (semi, singleQuote, etc.)
- Ajouter husky + lint-staged (pre-commit)
- Configurer SonarQube (sonar-project.properties)
Phase 5 : Tests¶
- Configurer Jest avec preset expo
- Ajouter React Testing Library
- Configurer coverage ≥ 70%
- Créer premiers tests (App.test.tsx)
Phase 6 : Navigation¶
- Installer @react-navigation/native
- Installer @react-navigation/stack
- Configurer NavigationContainer
- Créer écran de test (HomeScreen)
Phase 7 : CI/CD GitLab¶
- Créer .gitlab-ci.yml avec stages :
- lint : eslint + prettier check
- type-check : tsc --noEmit
- test : jest --coverage
- sonar : analyse SonarQube
- build : eas build --platform ios
- Configurer variables CI (EAS_TOKEN, SONAR_TOKEN)
- Configurer règles de merge request
Points de vigilance¶
- Expo SDK : Vérifier compatibilité dépendances avec SDK 52
- EAS Build : Nécessite compte Expo et Apple Developer
- Coverage : Seuil 70% peut bloquer le build si non atteint
- Hermes : Activer pour performance (défaut SDK 52)
Hors périmètre¶
- Fonctionnalités métier (→ autres US)
- Cryptographie client-side (→ PD-97)
- Authentification SRP (→ PD-24 mobile)
- Android/Web/Desktop