# 🏇 Hippique Pro - Architecture Complète

## Vue d'ensemble du projet

Application Laravel 11+ dédiée aux pronostics hippiques avec système d'abonnement, paiements Stripe/PayPal et annuaire de sites hippiques avec référencement payant.

---

## 📁 Structure des dossiers

```
hippique-pro/
├── app/
│   ├── Http/
│   │   ├── Controllers/
│   │   │   ├── Auth/                    # Contrôleurs d'authentification (Breeze)
│   │   │   ├── Front/                   # Contrôleurs frontend public
│   │   │   │   ├── HomeController.php
│   │   │   │   ├── PredictionController.php
│   │   │   │   ├── DirectoryController.php
│   │   │   │   └── PageController.php
│   │   │   ├── Member/                  # Espace abonné
│   │   │   │   ├── DashboardController.php
│   │   │   │   ├── PredictionController.php
│   │   │   │   ├── HistoryController.php
│   │   │   │   ├── SubscriptionController.php
│   │   │   │   └── InvoiceController.php
│   │   │   ├── DirectorySubmission/     # Soumission annuaire
│   │   │   │   ├── SubmissionController.php
│   │   │   │   └── PaymentController.php
│   │   │   └── Admin/                   # Backoffice
│   │   │       ├── DashboardController.php
│   │   │       ├── UserController.php
│   │   │       ├── PredictionController.php
│   │   │       ├── SubscriptionController.php
│   │   │       ├── DirectoryController.php
│   │   │       ├── DirectoryPlanController.php
│   │   │       ├── ContentController.php
│   │   │       └── SettingsController.php
│   │   ├── Middleware/
│   │   │   ├── CheckSubscription.php    # Vérifie abonnement actif
│   │   │   ├── CheckSubscriptionLevel.php # Vérifie niveau d'abonnement
│   │   │   ├── CheckAdmin.php           # Vérifie rôle admin
│   │   │   └── SetLocale.php            # Gestion multilingue
│   │   ├── Requests/                    # Form Requests
│   │   └── Resources/                   # API Resources (si besoin)
│   ├── Models/
│   │   ├── User.php
│   │   ├── Subscription.php
│   │   ├── SubscriptionPlan.php
│   │   ├── Prediction.php
│   │   ├── Racecourse.php
│   │   ├── Race.php
│   │   ├── DirectoryListing.php
│   │   ├── DirectoryPlan.php
│   │   ├── DirectoryPayment.php
│   │   ├── Invoice.php
│   │   ├── Page.php
│   │   ├── BlogPost.php
│   │   ├── Review.php
│   │   └── Setting.php
│   ├── Services/                        # Services métier
│   │   ├── Payment/
│   │   │   ├── StripeService.php
│   │   │   ├── PayPalService.php
│   │   │   └── PaymentGatewayInterface.php
│   │   ├── PredictionService.php
│   │   ├── DirectoryService.php
│   │   ├── InvoiceService.php
│   │   └── NotificationService.php
│   ├── Jobs/                            # Jobs en file d'attente
│   │   ├── SendPredictionNotification.php
│   │   ├── SendSubscriptionReminder.php
│   │   ├── SendDirectoryExpiryReminder.php
│   │   ├── ProcessDirectoryExpiry.php
│   │   └── GenerateInvoicePdf.php
│   ├── Mail/                            # Mailables
│   │   ├── NewPredictionNotification.php
│   │   ├── SubscriptionActivated.php
│   │   ├── SubscriptionExpired.php
│   │   ├── DirectorySubmissionReceived.php
│   │   ├── DirectoryValidated.php
│   │   ├── DirectoryRejected.php
│   │   ├── DirectoryExpiryReminder.php
│   │   └── InvoiceGenerated.php
│   ├── Events/                          # Événements
│   │   ├── PredictionPublished.php
│   │   ├── SubscriptionCreated.php
│   │   ├── DirectorySubmitted.php
│   │   └── DirectoryValidated.php
│   ├── Listeners/                       # Listeners
│   ├── Policies/                        # Policies
│   ├── Providers/
│   └── Helpers/                         # Fonctions helper
│       └── helpers.php
├── bootstrap/
├── config/
│   ├── hippique.php                     # Config spécifique app
│   ├── seo.php                          # Config SEO
│   └── directory.php                    # Config annuaire
├── database/
│   ├── factories/
│   ├── migrations/
│   └── seeders/
│       ├── DatabaseSeeder.php
│       ├── SubscriptionPlanSeeder.php
│       ├── DirectoryPlanSeeder.php
│       ├── RacecourseSeeder.php
│       └── AdminUserSeeder.php
├── lang/                                # Fichiers de traduction
│   ├── fr/
│   │   ├── auth.php
│   │   ├── validation.php
│   │   ├── messages.php
│   │   └── seo.php
│   └── en/
│       ├── auth.php
│       ├── validation.php
│       ├── messages.php
│       └── seo.php
├── public/
│   ├── storage/                         # Liens symboliques
│   └── assets/
├── resources/
│   ├── css/
│   │   └── app.css
│   ├── js/
│   │   └── app.js
│   ├── views/
│   │   ├── components/                  # Composants Blade
│   │   ├── layouts/
│   │   │   ├── front.blade.php
│   │   │   ├── member.blade.php
│   │   │   └── admin.blade.php
│   │   ├── front/                       # Pages publiques
│   │   │   ├── home.blade.php
│   │   │   ├── predictions/
│   │   │   ├── directory/
│   │   │   ├── pages/
│   │   │   └── blog/
│   │   ├── member/                      # Espace abonné
│   │   │   ├── dashboard.blade.php
│   │   │   ├── predictions/
│   │   │   ├── history/
│   │   │   ├── subscription/
│   │   │   └── invoices/
│   │   ├── directory-submission/        # Soumission annuaire
│   │   │   ├── submit.blade.php
│   │   │   ├── payment.blade.php
│   │   │   ├── success.blade.php
│   │   │   └── status.blade.php
│   │   ├── admin/                       # Backoffice
│   │   │   ├── dashboard.blade.php
│   │   │   ├── users/
│   │   │   ├── predictions/
│   │   │   ├── subscriptions/
│   │   │   ├── directory/
│   │   │   ├── content/
│   │   │   └── settings/
│   │   ├── emails/                      # Templates emails
│   │   └── invoices/                    # Template PDF facture
│   └── svg/
├── routes/
│   ├── web.php
│   ├── admin.php
│   ├── member.php
│   └── api.php
├── storage/
│   └── app/
│       ├── public/
│       │   ├── logos/                   # Logos annuaire
│       │   ├── predictions/             # Images pronostics
│       │   └── invoices/                # PDF factures
│       └── private/
├── tests/
├── artisan
├── composer.json
├── package.json
├── phpunit.xml
└── .env.example
```

---

## 🗄️ Schéma de base de données

### Tables principales

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                              USERS & AUTH                                    │
├─────────────────────────────────────────────────────────────────────────────┤
│ users                                                                        │
│ ├── id (PK)                                                                  │
│ ├── name                                                                     │
│ ├── email (unique)                                                           │
│ ├── email_verified_at                                                        │
│ ├── password                                                                 │
│ ├── avatar                                                                   │
│ ├── phone                                                                    │
│ ├── locale (fr/en)                                                           │
│ ├── timezone                                                                 │
│ ├── role (admin|member|user)                                                 │
│ ├── email_notifications                                                      │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ password_reset_tokens                                                        │
│ failed_jobs                                                                  │
│ personal_access_tokens                                                       │
└─────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────┐
│                         SUBSCRIPTIONS & PLANS                                │
├─────────────────────────────────────────────────────────────────────────────┤
│ subscription_plans                                                           │
│ ├── id (PK)                                                                  │
│ ├── name (Silver|Gold|Platinum)                                              │
│ ├── slug (unique)                                                            │
│ ├── description                                                              │
│ ├── price_monthly (centimes)                                                 │
│ ├── price_yearly (centimes)                                                  │
│ ├── features (JSON)                                                          │
│ ├── prediction_access_level (1|2|3)                                          │
│ ├── can_access_archive (bool)                                                │
│ ├── can_access_stats (bool)                                                  │
│ ├── priority_notifications (bool)                                            │
│ ├── is_active                                                                │
│ ├── display_order                                                            │
│ ├── stripe_price_id_monthly                                                  │
│ ├── stripe_price_id_yearly                                                   │
│ ├── paypal_plan_id_monthly                                                   │
│ ├── paypal_plan_id_yearly                                                    │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ subscriptions                                                                │
│ ├── id (PK)                                                                  │
│ ├── user_id (FK)                                                             │
│ ├── subscription_plan_id (FK)                                                │
│ ├── type (monthly|yearly)                                                    │
│ ├── status (active|cancelled|expired|pending)                                │
│ ├── gateway (stripe|paypal)                                                  │
│ ├── gateway_subscription_id                                                  │
│ ├── current_period_start                                                     │
│ ├── current_period_end                                                       │
│ ├── cancelled_at                                                             │
│ ├── cancel_at_period_end (bool)                                              │
│ ├── trial_ends_at                                                            │
│ ├── amount_paid                                                              │
│ ├── currency                                                                 │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
└─────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────┐
│                         PRONOSTICS & COURSES                                 │
├─────────────────────────────────────────────────────────────────────────────┤
│ racecourses                                                                  │
│ ├── id (PK)                                                                  │
│ ├── name                                                                     │
│ ├── slug (unique)                                                            │
│ ├── country                                                                  │
│ ├── city                                                                     │
│ ├── track_type (plat|obstacle|trot)                                          │
│ ├── description                                                              │
│ ├── website                                                                  │
│ ├── is_active                                                                │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ races                                                                        │
│ ├── id (PK)                                                                  │
│ ├── racecourse_id (FK)                                                       │
│ ├── name                                                                     │
│ ├── race_number                                                              │
│ ├── race_date                                                                │
│ ├── race_time                                                                │
│ ├── distance                                                                 │
│ ├── prize_money                                                              │
│ ├── ground_condition                                                         │
│ ├── participants (JSON)                                                      │
│ ├── result (JSON) - après course                                             │
│ ├── status (upcoming|live|finished)                                          │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ predictions                                                                  │
│ ├── id (PK)                                                                  │
│ ├── race_id (FK, nullable)                                                   │
│ ├── racecourse_id (FK)                                                       │
│ ├── title                                                                    │
│ ├── slug (unique)                                                            │
│ ├── type (simple|combine|tierce|quarte|quinte|multi)                         │
│ ├── content                                                                  │
│ ├── teaser_content (aperçu gratuit)                                          │
│ ├── is_premium (bool)                                                        │
│ ├── access_level (1|2|3) - correspond aux plans                              │
│ ├── confidence_level (low|medium|high)                                       │
│ ├── odds                                                                     │
│ ├── horses_selected (JSON)                                                   │
│ ├── stake_recommended                                                        │
│ ├── result_status (pending|won|lost|partial)                                 │
│ ├── gain_loss                                                                │
│ ├── published_at                                                             │
│ ├── expires_at (pour les pronostics temporaires)                             │
│ ├── author_id (FK)                                                           │
│ ├── views_count                                                              │
│ ├── meta_title                                                               │
│ ├── meta_description                                                         │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ prediction_views                                                             │
│ ├── id (PK)                                                                  │
│ ├── prediction_id (FK)                                                       │
│ ├── user_id (FK, nullable)                                                   │
│ ├── ip_address                                                               │
│ ├── user_agent                                                               │
│ ├── viewed_at                                                                │
│ └── created_at                                                               │
└─────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────┐
│                    ANNUAIRE SITES HIPPIQUES                                  │
├─────────────────────────────────────────────────────────────────────────────┤
│ directory_plans                                                              │
│ ├── id (PK)                                                                  │
│ ├── name (Standard|Premium|Sponsorisé)                                       │
│ ├── slug (unique)                                                            │
│ ├── description                                                              │
│ ├── price_monthly (centimes)                                                 │
│ ├── price_quarterly (centimes)                                               │
│ ├── price_yearly (centimes)                                                  │
│ ├── features (JSON)                                                          │
│ │   ├── badge_type                                                           │
│ │   ├── priority_position                                                    │
│ │   ├── homepage_banner                                                      │
│ │   ├── category_top                                                         │
│ │   └── highlighted_color                                                    │
│ ├── is_active                                                                │
│ ├── stripe_price_ids (JSON)                                                  │
│ ├── paypal_plan_ids (JSON)                                                   │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ directory_categories                                                         │
│ ├── id (PK)                                                                  │
│ ├── name                                                                     │
│ ├── slug (unique)                                                            │
│ ├── description                                                              │
│ ├── icon                                                                     │
│ ├── display_order                                                            │
│ ├── is_active                                                                │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ directory_listings                                                           │
│ ├── id (PK)                                                                  │
│ ├── directory_plan_id (FK)                                                   │
│ ├── directory_category_id (FK)                                               │
│ ├── user_id (FK) - soumettant                                                │
│ ├── name                                                                     │
│ ├── slug (unique)                                                            │
│ ├── url                                                                      │
│ ├── description                                                              │
│ ├── logo                                                                     │
│ ├── country                                                                  │
│ ├── city                                                                     │
│ ├── email                                                                    │
│ ├── phone                                                                    │
│ ├── social_links (JSON)                                                      │
│ ├── status (pending|approved|rejected|expired)                               │
│ ├── rejection_reason                                                         │
│ ├── submitted_at                                                             │
│ ├── paid_at                                                                  │
│ ├── approved_at                                                              │
│ ├── expires_at                                                               │
│ ├── auto_renew (bool)                                                        │
│ ├── renewal_subscription_id                                                  │
│ ├── views_count                                                              │
│ ├── clicks_count                                                             │
│ ├── average_rating                                                           │
│ ├── reviews_count                                                            │
│ ├── meta_title                                                               │
│ ├── meta_description                                                         │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ directory_payments                                                           │
│ ├── id (PK)                                                                  │
│ ├── directory_listing_id (FK)                                                │
│ ├── directory_plan_id (FK)                                                   │
│ ├── duration (monthly|quarterly|yearly)                                      │
│ ├── amount                                                                   │
│ ├── currency                                                                 │
│ ├── gateway (stripe|paypal)                                                  │
│ ├── gateway_payment_id                                                       │
│ ├── gateway_subscription_id                                                  │
│ ├── status (pending|completed|failed|refunded)                               │
│ ├── paid_at                                                                  │
│ ├── refunded_at                                                              │
│ ├── refund_reason                                                            │
│ ├── invoice_generated                                                        │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ directory_reviews                                                            │
│ ├── id (PK)                                                                  │
│ ├── directory_listing_id (FK)                                                │
│ ├── user_id (FK)                                                             │
│ ├── rating (1-5)                                                             │
│ ├── comment                                                                  │
│ ├── is_approved (bool)                                                       │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
└─────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────┐
│                         FACTURATION & INVOICES                               │
├─────────────────────────────────────────────────────────────────────────────┤
│ invoices                                                                     │
│ ├── id (PK)                                                                  │
│ ├── user_id (FK)                                                             │
│ ├── invoiceable_type (Morph)                                                 │
│ ├── invoiceable_id (Morph)                                                   │
│ ├── invoice_number (unique)                                                  │
│ ├── type (subscription|directory)                                            │
│ ├── status (draft|sent|paid|overdue|cancelled)                               │
│ ├── amount_excl_tax                                                          │
│ ├── tax_rate                                                                 │
│ ├── tax_amount                                                               │
│ ├── amount_incl_tax                                                          │
│ ├── currency                                                                 │
│ ├── description                                                              │
│ ├── due_date                                                                 │
│ ├── paid_at                                                                  │
│ ├── payment_method                                                           │
│ ├── pdf_path                                                                 │
│ ├── notes                                                                    │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
└─────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────┐
│                         CONTENU & SEO                                        │
├─────────────────────────────────────────────────────────────────────────────┤
│ pages                                                                        │
│ ├── id (PK)                                                                  │
│ ├── title                                                                    │
│ ├── slug (unique)                                                            │
│ ├── content                                                                  │
│ ├── template                                                                 │
│ ├── is_published                                                             │
│ ├── meta_title                                                               │
│ ├── meta_description                                                         │
│ ├── meta_keywords                                                            │
│ ├── og_image                                                                 │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ blog_posts                                                                   │
│ ├── id (PK)                                                                  │
│ ├── author_id (FK)                                                           │
│ ├── title                                                                    │
│ ├── slug (unique)                                                            │
│ ├── excerpt                                                                  │
│ ├── content                                                                  │
│ ├── featured_image                                                           │
│ ├── is_published                                                             │
│ ├── published_at                                                             │
│ ├── views_count                                                              │
│ ├── meta_title                                                               │
│ ├── meta_description                                                         │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
│                                                                              │
│ settings                                                                     │
│ ├── id (PK)                                                                  │
│ ├── key (unique)                                                             │
│ ├── value                                                                    │
│ ├── type (string|text|boolean|json)                                          │
│ ├── group                                                                    │
│ ├── created_at                                                               │
│ └── updated_at                                                               │
└─────────────────────────────────────────────────────────────────────────────┘
```

---

## 🔄 Flux de référencement payant de l'annuaire

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                    FLUX DE RÉFÉRENCEMENT PAYANT                              │
└─────────────────────────────────────────────────────────────────────────────┘

    ┌──────────────┐
    │   VISITEUR   │
    │  (Propriétaire│
    │   de site)   │
    └──────┬───────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  1. ACCÈDE À LA PAGE DE SOUMISSION                      │
    │     /annuaire/soumettre                                  │
    │     - Formulaire complet avec :                          │
    │       • Nom du site                                      │
    │       • URL                                              │
    │       • Description                                      │
    │       • Catégorie                                        │
    │       • Pays/Ville                                       │
    │       • Logo                                             │
    │       • Coordonnées                                      │
    └─────────────────────────────────────────────────────────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  2. CHOIX DE LA FORMULE                                  │
    │     - Standard : Listing simple                          │
    │     - Premium : Mise en avant + badge                    │
    │     - Sponsorisé : Homepage + top catégorie              │
    │                                                          │
    │     - Durée : Mensuel / Trimestriel / Annuel             │
    │     - Prix calculé dynamiquement                         │
    └─────────────────────────────────────────────────────────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  3. CRÉATION DE LA FICHE (status: pending)               │
    │     - Enregistrement en BDD                              │
    │     - Upload du logo                                     │
    │     - Génération slug temporaire                         │
    └─────────────────────────────────────────────────────────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  4. REDIRECTION VERS PAIEMENT                            │
    │     - Choix : Stripe (CB) ou PayPal                      │
    │     - Création session/paiement                          │
    │     - Enregistrement directory_payments (pending)        │
    └─────────────────────────────────────────────────────────┘
           │
           ├───► ┌─────────────┐
           │     │   STRIPE    │
           │     │   ou        │
           │     │   PAYPAL    │
           │     └──────┬──────┘
           │            │ Webhook
           │            ▼
           │     ┌─────────────┐
           │     │  PAIEMENT   │
           │     │  RÉUSSI     │
           │     └──────┬──────┘
           │            │
           ◄────────────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  5. CONFIRMATION PAIEMENT                                │
    │     - Webhook reçu                                       │
    │     - Mise à jour directory_payments (completed)         │
    │     - Mise à jour directory_listings (paid_at)           │
    │     - Calcul expires_at selon durée                      │
    │     - Déclenchement event DirectoryPaid                  │
    └─────────────────────────────────────────────────────────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  6. NOTIFICATION ADMIN                                   │
    │     - Email à l'admin : nouvelle fiche à valider         │
    │     - Notification dans le backoffice                    │
    │     - La fiche reste en status: pending                  │
    └─────────────────────────────────────────────────────────┘
           │
           ▼
    ┌──────────────┐
    │    ADMIN     │
    └──────┬───────┘
           │
           ▼
    ┌─────────────────────────────────────────────────────────┐
    │  7. VALIDATION ADMIN                                     │
    │     Backoffice : /admin/directory/pending                │
    │                                                          │
    │     ┌─────────────────┐    ┌─────────────────┐          │
    │     │    ✅ VALIDER   │    │    ❌ REJETER   │          │
    │     │                 │    │                 │          │
    │     │ • status:       │    │ • status:       │          │
    │     │   approved      │    │   rejected      │          │
    │     │ • approved_at   │    │ • rejection_    │          │
    │     │ • expires_at    │    │   reason        │          │
    │     │ • visible       │    │ • email avec    │          │
    │     │   publiquement  │    │   motif         │          │
    │     │                 │    │ • remboursement │          │
    │     │                 │    │   possible      │          │
    │     └─────────────────┘    └─────────────────┘          │
    └─────────────────────────────────────────────────────────┘
           │
           ▼ (si validé)
    ┌─────────────────────────────────────────────────────────┐
    │  8. PUBLICATION                                          │
    │     - Fiche visible dans l'annuaire public               │
    │     - Email de confirmation au soumettant                │
    │     - Génération facture PDF                             │
    │     - Position selon formule choisie                     │
    └─────────────────────────────────────────────────────────┘
           │
           │
           ▼ (cron quotidien)
    ┌─────────────────────────────────────────────────────────┐
    │  9. GESTION EXPIRATIONS                                  │
    │     Scheduler Laravel : daily                            │
    │                                                          │
    │     7 jours avant expiration:                            │
    │     ├── Email de relance                                 │
    │     │                                                    │
    │     Jour de expiration:                                  │
    │     ├── status: expired                                  │
    │     ├── Masquage public                                  │
    │     └── Email de fin d'abonnement                        │
    │                                                          │
    │     Si auto_renew = true:                                │
    │     └── Nouveau paiement automatique                     │
    └─────────────────────────────────────────────────────────┘
```

---

## 🔐 Middlewares

| Middleware | Description | Utilisation |
|------------|-------------|-------------|
| `auth` | Utilisateur authentifié | Espace membre |
| `auth:admin` | Admin authentifié | Backoffice |
| `subscribed` | Abonnement actif | Pronostics VIP |
| `subscribed.level:gold` | Niveau d'abonnement minimum | Accès différencié |
| `verified` | Email vérifié | Actions sensibles |
| `locale` | Définition de la langue | Toutes les routes |

---

## 📦 Packages Composer requis

```json
{
    "require": {
        "php": "^8.2",
        "laravel/framework": "^11.0",
        "laravel/breeze": "^2.0",
        "laravel/cashier-stripe": "^15.0",
        "laravel/sanctum": "^4.0",
        "laravel/socialite": "^5.0",
        "mcamara/laravel-localization": "^2.0",
        "artesaos/seotools": "^1.3",
        "spatie/laravel-sitemap": "^7.0",
        "spatie/laravel-permission": "^6.0",
        "spatie/laravel-medialibrary": "^11.0",
        "barryvdh/laravel-dompdf": "^3.0",
        "srmklive/paypal": "^3.0",
        "laravel-notification-channels/telegram": "^5.0",
        "predis/predis": "^2.0"
    }
}
```

---

## ⚙️ Configuration des services de paiement

### Stripe
- Clés API dans `.env`
- Webhook endpoint: `/webhooks/stripe`
- Événements écoutés:
  - `invoice.payment_succeeded`
  - `invoice.payment_failed`
  - `customer.subscription.created`
  - `customer.subscription.updated`
  - `customer.subscription.deleted`
  - `checkout.session.completed`

### PayPal
- Clés API dans `.env`
- Webhook endpoint: `/webhooks/paypal`
- Événements écoutés:
  - `BILLING.SUBSCRIPTION.CREATED`
  - `BILLING.SUBSCRIPTION.ACTIVATED`
  - `BILLING.SUBSCRIPTION.UPDATED`
  - `BILLING.SUBSCRIPTION.EXPIRED`
  - `BILLING.SUBSCRIPTION.CANCELLED`
  - `BILLING.SUBSCRIPTION.PAYMENT.FAILED`
  - `PAYMENT.SALE.COMPLETED`

---

## 📋 Prochaines étapes

1. ✅ Architecture globale (ce document)
2. 🔄 Migrations de base de données
3. 🔄 Modèles Eloquent et relations
4. 🔄 Configuration authentification
5. 🔄 Système de pronostics
6. 🔄 Intégration paiements
7. 🔄 Système d'annuaire
8. 🔄 Backoffice admin
9. 🔄 Multilingue
10. 🔄 SEO
