PROJET FINAL

🗞️ Blog PHP MVC

Application complète en architecture MVC — authentification, CRUD articles, API JSON et interface admin.

🎯 Compétences mobilisées

Module 01 — BasesVariables, conditions, boucles, match()
Module 02 — FonctionsType hints, closures, arrow functions
Module 03 — Tableauxarray_map/filter/reduce, regex
Module 04 — FormulairesCSRF, XSS, validation
Module 05 — SessionsAuth, login/logout sécurisé
Module 06 — POOMVC, Repository, Traits
Module 07 — PDOCRUD, requêtes préparées
Module 08 — API RESTEndpoints JSON, JWT

📁 Architecture MVC

solution/ ├── public/ │ └── index.php ← Point d'entrée unique (front controller) ├── src/ │ ├── Core/ │ │ ├── Database.php ← Singleton PDO │ │ └── Router.php ← Routeur HTTP │ ├── Controllers/ │ │ ├── AuthController.php │ │ ├── PostController.php │ │ └── ApiController.php │ ├── Models/ │ │ ├── User.php │ │ └── Post.php │ └── Views/ │ ├── layout.php │ ├── home.php │ ├── post-show.php │ ├── admin/ │ └── auth/ └── app.php ← Version demo tout-en-un (sans config MySQL)

⚙️ Fonctionnalités

▶ Lancer le projet

cd formation-php/projet-final/solution
php -S localhost:8000 -t public
# Ouvrir http://localhost:8000

# Admin : admin / admin123
# Avec XAMPP : placer dans htdocs/blog-mvc/

Ou utiliser app.php (version tout-en-un) : php -S localhost:8000 app.php

✅ Lancer la démo

▶ Blog démo (app.php) php -S localhost:8000 app.php