Files
swift_companion/docs/pedagogie/00-reprise-et-etat.md
2026-09-30 08:24:20 +02:00

110 lines
5.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Reprise du projet — où nous en sommes
> Dernière mise à jour : étape 7 bonus (refresh token) codée.
## En bref
| | |
|---|---|
| **Fait** | Structure dépôt perso, sujet FR, paquet rendu, **projet Flutter** (`swifty_companion/`) |
| **Fait** | OAuth + token + `/v2/me` (login connecté) |
| **Fait** | Vue 1 recherche + vue 2 profil (skills, projets, ≥ 4 champs) |
| **Prochaine action** | **Rendu Vogosphere** + test manuel bonus (token invalide) |
## Arborescence actuelle
```
swifty_companion/ ← dépôt Git de TRAVAIL (perso)
├── README.md ← explique les 2 dépôts Git
├── .gitignore ← ignore docs + swiftyCompanion/.git/
├── docs/
│ ├── README.md
│ ├── sujets/
│ │ ├── swifty-companion.md ← sujet traduit (référence)
│ │ ├── originaux/swifty_companion_subject.pdf
│ │ └── captures/ ← visuels PDF (couverture uniquement)
│ └── pedagogie/
│ ├── README.md ← plan des étapes
│ └── 00-reprise-et-etat.md ← ce fichier
└── swiftyCompanion/ ← futur dépôt ÉCOLE (racine Vogosphere)
├── README.md
├── .env.example
└── swifty_companion/ ← projet Flutter (lib/, android/, pubspec.yaml)
```
## 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** : Flutter, `flutter_dotenv`, `flutter_appauth`, `http`.
3. **Secrets** : `.env` local uniquement, jamais commité (modèle dans `swiftyCompanion/.env.example`).
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
| Étape | Contenu | Statut |
|-------|---------|--------|
| **0** | Structure, traduction sujet, séparation travail / école, README rendu | ✅ **Terminé** |
| **1** | Projet Flutter `swiftyCompanion/swifty_companion/` | ✅ **Terminé** |
| **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 (`swifty_ui.dart`) | ✅ **Codé** — [etape-05-navigation-layout.md](etape-05-navigation-layout.md) |
| **6** | Checklist soutenance + rendu école | ✅ **Guide** — [etape-06-checklist-soutenance.md](etape-06-checklist-soutenance.md) |
| **7** | Bonus : refresh token à expiration | ✅ **Codé** — [etape-07-bonus-token.md](etape-07-bonus-token.md) |
## Code applicatif (`swifty_companion/lib/`)
| Fichier | Rôle |
|---------|------|
| `config/intra_config.dart` | `.env`, URLs OAuth / API |
| `services/intra_auth_service.dart` | OAuth + refresh token + `GET /v2/me` |
| `services/intra_oauth_tokens.dart` | Parse réponse `/oauth/token` |
| `services/intra_user_service.dart` | `GET /v2/users?filter[login]=` |
| `services/intra_profile_service.dart` | Profil : user, cursus_users, projects_users |
| `services/intra_api_exception.dart` | Erreurs métier |
| `screens/search_screen.dart` | **Vue 1** |
| `screens/profile_screen.dart` | **Vue 2** |
| `theme/swifty_ui.dart` | Layout responsive partagé |
| `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`.
4. Lancer l’app (après modification `.env`, relancer `flutter run`) :
```bash
cd swiftyCompanion/swifty_companion
flutter run -d <device>
```
5. Tester le parcours : OAuth → recherche → profil → retour → erreurs réseau.
## Fichiers utiles selon le contexte
| Tu veux… | Fichier |
|----------|---------|
| **Préparer la correction (sujet ↔ fichiers)** | **[guide-soutenance-realisation.md](guide-soutenance-realisation.md)** |
| 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) |
## Guides détaillés
| 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-05-navigation-layout.md) | ✅ |
| [etape-06-checklist-soutenance.md](etape-06-checklist-soutenance.md) | ✅ |
| [etape-07-bonus-token.md](etape-07-bonus-token.md) | ✅ piste bonus |
## Notes pour la session suivante
- Partie obligatoire : prête pour peer-eval si la checklist étape 6 est OK sur device.
- `git init` dans `swiftyCompanion/` quand tu pousses sur Vogosphere (voir README racine).
- Bonus refresh token : étape 7 si tu as le temps après rendu.