← Retour au tableau de bord
Architecture Technique · v1.0

Architecture Technique

Stack Laravel 11, schéma d'infrastructure, modèle de données, routes API et intégrations.

Infrastructure

Schéma général

┌─────────────────────────────────────────────────────────────────┐
│                         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)                         │
└─────────────────────────────────────────────────────────────────┘

Architecture applicative

Couches Laravel MVC

Models (Eloquent)
User, Investisseur, Categorie, SousDomaine, Project, Investissement, Transaction, Kyc, MarketplaceOffer, Portefeuille
Services (Métier)
InvestissementService, KycService, PaiementService, NotificationService, MarketplaceService, PortefeuilleService
Controllers (Web + API)
AuthController, ProjectController, InvestissementController, KycController, MarketplaceController, AdminController
Middleware
Authenticate, KycRequired, InvestisseurVerified, EnsureEmailVerified, ThrottleRequests, AdminOnly
Jobs (Queues)
ProcessKycDocument, SendInvestmentConfirmation, ProcessPaymentWebhook, GeneratePortfolioReport, SendNewsletterBatch
Events / Listeners
InvestissementCreated, KycValidated, ProjectFunded, ProjectPublished, PaymentConfirmed
Policies (Autorisations)
ProjectPolicy, InvestissementPolicy, MarketplacePolicy, KycPolicy
Migrations & Seeders
5 migrations (users, projects, investissements, kyc, marketplace), CategorieSeeder (8 cat. + 44 sous-domaines)

Base de données

Schéma — 9 tables principales

TableColonnes clésRelations
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

API REST

Routes principales — /api/v1

Authentification
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
Projets publics
GET   /projects
GET   /projects/{slug}
GET   /categories
GET   /categories/{slug}/projects
GET   /countries
GET   /projects/featured
Investissement (auth)
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
KYC & Paiements
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

Services tiers

Intégrations externes

ServiceRôleEnv. activé
StripePaiements internationaux (cartes, SEPA)Staging, Production
WaveMobile money Afrique de l'OuestProduction
Orange MoneyMobile money francophoneProduction
MTN MoMoMobile money Anglophone + Ghana, NigeriaProduction
Jumio / OnfidoVérification KYC automatisée (OCR + biométrie)Staging, Production
TwilioSMS — OTP, alertes investissementTous
SendGridEmails transactionnels et newsletterTous
RedisCache sessions, queues Laravel HorizonStaging, Production
AWS S3 / Cloudflare R2Stockage documents KYC et assets projetsStaging, Production