This commit is contained in:
2026-09-29 15:07:05 +02:00
parent 06fe43bba3
commit 4de305bbf4
12 changed files with 837 additions and 97 deletions

View File

@@ -1,6 +1,6 @@
# Reprise du projet — où nous en sommes
> Dernière mise à jour : projet Flutter créé dans `swiftyCompanion/swifty_companion/`.
> Dernière mise à jour : étape 4 codée (profil complet).
## En bref
@@ -8,7 +8,8 @@
|---|---|
| **Fait** | Structure dépôt perso, sujet FR, paquet rendu, **projet Flutter** (`swifty_companion/`) |
| **Fait** | OAuth + token + `/v2/me` (login connecté) |
| **Prochaine action** | **Étape 4** — [vue profil complète](etape-04-vue-profil.md) |
| **Fait** | Vue 1 recherche + vue 2 profil (skills, projets, ≥ 4 champs) |
| **Prochaine action** | **Étape 5** — retour / layout + tests manuels sur device |
## Arborescence actuelle
@@ -27,7 +28,6 @@ swifty_companion/ ← dépôt Git de TRAVAIL (perso)
│ └── 00-reprise-et-etat.md ← ce fichier
└── swiftyCompanion/ ← futur dépôt ÉCOLE (racine Vogosphere)
├── README.md
├── .gitignore
├── .env.example
└── swifty_companion/ ← projet Flutter (lib/, android/, pubspec.yaml)
```
@@ -35,9 +35,10 @@ swifty_companion/ ← dépôt Git de TRAVAIL (perso)
## Décisions déjà prises
1. **Deux dépôts Git** : tout `docs/` et la traduction restent dans le repo perso ; l’Intra ne reçoit que le contenu de `swiftyCompanion/`.
2. **Stack prévue** : Flutter (cohérent avec `piscine_mobile/`), modifiable en soutenance si justifié.
2. **Stack** : Flutter, `flutter_dotenv`, `flutter_appauth`, `http`.
3. **Secrets** : `.env` local uniquement, jamais commité (modèle dans `swiftyCompanion/.env.example`).
4. **Sujet PDF** : pas de maquettes d’écrans — l’UI suit la liste des critères obligatoires ([sujet FR](../sujets/swifty-companion.md)).
4. **Redirect OAuth mobile** : `com.example.swiftycompanion://callback` (pas `localhost` sur téléphone physique).
5. **Sujet PDF** : pas de maquettes d’écrans — l’UI suit la liste des critères obligatoires ([sujet FR](../sujets/swifty-companion.md)).
## Avancement par étape
@@ -45,25 +46,37 @@ swifty_companion/ ← dépôt Git de TRAVAIL (perso)
|-------|---------|--------|
| **0** | Structure, traduction sujet, séparation travail / école, README rendu | ✅ **Terminé** |
| **1** | Projet Flutter `swiftyCompanion/swifty_companion/` | ✅ **Terminé** |
| **2** | OAuth2 (`IntraAuthService`, `/v2/me`) | ✅ **Validé** (`fgras-ca`) |
| **3** | Vue 1 : `SearchScreen` + `IntraUserService` + navigation profil | ✅ **Codé** — à tester sur téléphone |
| **4** | Vue 2 : profil complet (≥ 4 champs, skills, projets) | ⏳ **Prochaine** |
| **5** | Retour vue 1 + layout adaptatif | ⏳ |
| **2** | OAuth2 (`IntraAuthService`, `/v2/me`) | ✅ **Validé** |
| **3** | Vue 1 : `SearchScreen` + `IntraUserService` + navigation profil | ✅ **Codé** — tester sur téléphone |
| **4** | Vue 2 : `IntraProfileService` + profil (skills, projets, champs) | ✅ **Codé** — tester sur téléphone |
| **5** | Retour vue 1 + layout adaptatif (polish) | ⏳ **Prochaine** |
| **6** | Passage checklist [swiftyCompanion/README.md](../../swiftyCompanion/README.md) | ⏳ |
| **7** | Bonus : refresh token à expiration | ⏳ |
## Code applicatif (`swifty_companion/lib/`)
| Fichier | Rôle |
|---------|------|
| `config/intra_config.dart` | `.env`, URLs OAuth / API |
| `services/intra_auth_service.dart` | OAuth + token unique + `GET /v2/me` |
| `services/intra_user_service.dart` | `GET /v2/users?filter[login]=` |
| `services/intra_profile_service.dart` | Profil : user, cursus, experiences, projects_users |
| `services/intra_api_exception.dart` | Erreurs métier |
| `screens/search_screen.dart` | **Vue 1** |
| `screens/profile_screen.dart` | **Vue 2** |
| `main.dart` | `home: SearchScreen()` |
## Reprendre le travail (checklist)
1. Ouvrir le dépôt : `~/projets/42School/swifty_companion`
2. Relire le [sujet traduit](../sujets/swifty-companion.md) (section obligatoire).
3. Vérifier Flutter : `flutter doctor` et `flutter devices` (voir [piscine — Ubuntu natif](../../../piscine_mobile/docs/pedagogie/flutter/09-ubuntu-natif-dev-android.md) si besoin).
4. Lancer l’app :
3. Vérifier Flutter : `flutter doctor` et `flutter devices`.
4. Lancer l’app (après modification `.env`, relancer `flutter run`) :
```bash
cd swiftyCompanion/swifty_companion
flutter run -d <device>
```
5. **Étape 2** — suivre [etape-02-oauth-intra.md](etape-02-oauth-intra.md) (app OAuth Intra, `.env`, service token unique).
6. Dans le chat : demander l’**implémentation pas à pas** du code OAuth quand l’app OAuth Intra est créée.
5. Tester le parcours : OAuth → recherche → profil → retour → erreurs réseau.
## Fichiers utiles selon le contexte
@@ -71,23 +84,22 @@ swifty_companion/ ← dépôt Git de TRAVAIL (perso)
|----------|---------|
| Comprendre le sujet | [docs/sujets/swifty-companion.md](../sujets/swifty-companion.md) |
| Plan complet des étapes | [docs/pedagogie/README.md](README.md) |
| Vue profil (étape 4) | [etape-04-vue-profil.md](etape-04-vue-profil.md) |
| Workflow Git travail / école | [README racine](../../README.md) |
| Soutenance / peer-eval | [swiftyCompanion/README.md](../../swiftyCompanion/README.md) |
| Environnement Flutter | [piscine_mobile](../../../piscine_mobile/README.md) |
## Guides détaillés (à créer au fil du code)
## Guides détaillés
| Fichier prévu | Quand |
|---------------|--------|
| `etape-01-flutter-init.md` | Après validation étape 1 |
| `etape-02-oauth.md` | Début OAuth Intra |
| `etape-03-vue-recherche.md` | Vue 1 |
| `etape-04-vue-profil.md` | Vue 2 + API |
| `etape-05-navigation-layout.md` | Navigation + responsive |
| `etape-06-bonus-token.md` | Bonus |
| Fichier | Statut |
|---------|--------|
| [etape-02-oauth-intra.md](etape-02-oauth-intra.md) | ✅ |
| [etape-03-vue-recherche.md](etape-03-vue-recherche.md) | ✅ |
| [etape-04-vue-profil.md](etape-04-vue-profil.md) | ✅ |
| `etape-05-navigation-layout.md` | 🔜 |
| `etape-06-bonus-token.md` | 🔜 |
## Notes pour la session suivante
- Code : projet Flutter par défaut (`lib/main.dart` compteur) — OAuth et vues à implémenter.
- Valider étapes 3–4 sur **device réel** (recherche, profil, mode avion sur vue 2).
- Étape 5 : harmoniser marges / contraintes sur les deux écrans si besoin en soutenance.
- Le dépôt perso peut versionner le code dans `swiftyCompanion/` ; le remote **école** pointe uniquement sur ce sous-dossier (voir README racine).
- Aucun `git init` obligatoire dans `swiftyCompanion/` tant que tu n’es pas prêt à lier Vogosphere.