# Architecture Cible - LineUp France

## Vue d'ensemble

- `backend/`: API metier, auth, missions, paiement, wallet, notifications.
- `apps/client_app/`: app Flutter client.
- `apps/liner_app/`: app Flutter liner.
- `frontend web`: landing publique pour presentation + liens de telechargement.
- `bo admin`: application interne de supervision.

## Composants backend (Laravel)

- `AuthService`: auth, sessions/JWT, reset password.
- `MissionService`: cycle de vie mission, affectation liner, statut.
- `RealtimeService`: diffusion statuts et localisation (websocket ou polling).
- `PaymentService`: debit client, credit liner, ledger.
- `KycService`: verification documents liner.
- `NotificationService`: push mobile + events metier.
- `AdminService`: moderation, supervision, reporting.

## Entites metier minimales

- `User` (roles: CLIENT, LINER, ADMIN)
- `KycDocument`
- `Mission`
- `MissionStatusEvent`
- `MissionProof`
- `Payment`
- `Wallet`
- `WalletLedger`
- `Payout`
- `Rating`
- `Notification`

## Flux principal

1. Le client cree une mission.
2. Un liner accepte la mission.
3. Le liner met a jour ses statuts et envoie la preuve.
4. La mission est terminee et validee.
5. Le client est debite; le wallet du liner est credite.
6. Le client evalue le liner.

## Securite et conformite

- JWT court + refresh token.
- Verification KYC avant mission remunerable.
- Journalisation des evenements critiques.
- Chiffrement des donnees sensibles.
- Politique RGPD (consentement, retention, suppression).
