Stack Laravel 11, schéma d'infrastructure, modèle de données, routes API et intégrations.
┌─────────────────────────────────────────────────────────────────┐
│ NAVIGATEUR / APP │
│ Web (React/Blade) Flutter Mobile (PWA) │
└────────────────────┬────────────────────────┬───────────────────┘
│ HTTPS / WSS │ HTTPS / REST
┌────────────────────▼────────────────────────▼───────────────────┐
│ LOAD BALANCER (Nginx) │
└────────────────────┬────────────────────────────────────────────┘
│
┌────────────────────▼────────────────────────────────────────────┐
│ APPLICATION LAYER — Laravel 11 │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Web Routes │ │ API Routes │ │ Artisan / Queues │ │
│ │ (Blade/SPA) │ │ (/api/v1/*) │ │ (Horizon + Redis) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Controllers → Services → Models (Eloquent) → Events │ │
│ └──────────────────────────────────────────────────────────┘ │
└────────────────────┬────────────────────────────────────────────┘
│
┌────────────────────▼────────────────────────────────────────────┐
│ SERVICES EXTERNES │
│ Stripe │ Wave │ OrangeMoney │ MTN MoMo │ Jumio │ Twilio │ SG │
└─────────────────────────────────────────────────────────────────┘
│
┌────────────────────▼────────────────────────────────────────────┐
│ PERSISTANCE │
│ PostgreSQL 16 (prod) Redis (cache/queues) S3 (fichiers) │
│ MySQL 8 (local XAMPP) SQLite (tests) │
└─────────────────────────────────────────────────────────────────┘
| Table | Colonnes clés | Relations |
|---|---|---|
users |
id (UUID), name, email, password, role, email_verified_at | hasOne Investisseur, hasMany Investments |
investisseurs |
id, user_id, type (diaspora/resident), pays, kyc_level, solde, plafond_annuel | belongsTo User, hasMany Investissements, hasOne Portefeuille |
categories |
id, slug, nom_fr, nom_en, nom_sw, icone, ordre, actif | hasMany SousDomaines, hasMany Projects |
sous_domaines |
id, categorie_id, slug, nom_fr, nom_en, ordre | belongsTo Categorie, hasMany Projects |
projects |
id (UUID), slug, titre, pays, categorie_id, sous_domaine_id, type_investissement, montant_objectif, montant_collecte, statut, date_fin, porteur_id | belongsTo Categorie, hasMany Investissements |
investissements |
id (UUID), investisseur_id, project_id, montant, type, statut, reference (WAR-AAAA-XXXXXX), gateway | belongsTo Investisseur, belongsTo Project |
kycs |
id, investisseur_id, document_type, document_path, statut, risk_score (0–100), ppe_flag, sanctions_flag, niveau | belongsTo Investisseur |
transactions |
id (UUID), investissement_id, montant, devise, gateway, gateway_ref, statut, type | belongsTo Investissement |
marketplace_offers |
id (UUID), vendeur_id, investissement_id, prix_vente, statut (open/pending/sold/cancelled), acheteur_id, commission_wara | belongsTo Investissement, belongsTo Investisseur |
POST /auth/register POST /auth/login POST /auth/logout POST /auth/refresh GET /auth/me POST /auth/verify-email POST /auth/forgot-password POST /auth/reset-password
GET /projects
GET /projects/{slug}
GET /categories
GET /categories/{slug}/projects
GET /countries
GET /projects/featured
POST /investments
GET /investments/{id}
GET /portfolio
GET /portfolio/stats
POST /marketplace/offers
GET /marketplace/offers
DELETE /marketplace/offers/{id}
POST /marketplace/offers/{id}/buy
POST /kyc/submit GET /kyc/status POST /payments/initiate POST /payments/webhook/stripe POST /payments/webhook/wave POST /payments/webhook/orange POST /payments/webhook/mtn
| Service | Rôle | Env. activé |
|---|---|---|
| Stripe | Paiements internationaux (cartes, SEPA) | Staging, Production |
| Wave | Mobile money Afrique de l'Ouest | Production |
| Orange Money | Mobile money francophone | Production |
| MTN MoMo | Mobile money Anglophone + Ghana, Nigeria | Production |
| Jumio / Onfido | Vérification KYC automatisée (OCR + biométrie) | Staging, Production |
| Twilio | SMS — OTP, alertes investissement | Tous |
| SendGrid | Emails transactionnels et newsletter | Tous |
| Redis | Cache sessions, queues Laravel Horizon | Staging, Production |
| AWS S3 / Cloudflare R2 | Stockage documents KYC et assets projets | Staging, Production |