Files
projet-cms/README.md
2025-11-01 21:00:44 +00:00

79 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Mini-Projet CMS Simplifié
BTS CIEL 2ᵉ année Module Développement Web
Un blog minimaliste sans framework : HTML5, CSS3, PHP (PDO), MySQL.
Design noir & or, responsive, sécurisé.
🎯 Objectifs pédagogiques
CRUD complet (Create, Read, Update, Delete)
Authentification sécurisée (sessions, mots de passe hachés)
Requêtes préparées PDO (protection injections SQL)
Containerisation Docker (MySQL + PHP/Apache)
Gestion de version Git / Gitea
📦 Stack technique
Table
Copy
Techno Rôle
HTML5 / CSS3 Structure & mise en forme (thème noir & or)
PHP 8.2 Logique métier, sessions, PDO
MySQL 8.0 Persistance (tables articles & utilisateur)
Docker 1 clic = MySQL + PHP prêts
Git / Gitea Versionning & livraison
🗂️ Arborescence
Copy
cms-simplifie/
├── docker-compose.yml # MySQL + PHP/Apache
├── README.md # Ce fichier
├── sql/
│ └── dump.sql # Structure + admin par défaut
└── src/
├── index.php # Accueil (10 derniers articles)
├── article.php # Détail dun article
├── login.php # Connexion admin
├── dashboard.php # Back-office
├── ajouter.php # Créer article
├── modifier.php # Éditer article
├── supprimer.php # Supprimer article
├── logout.php # Déconnexion
├── includes/
│ ├── db.php # Connexion PDO sécurisée
│ ├── header.php # En-tête HTML commun
│ └── footer.php # Pied de page commun
└── css/
└── style.css # Thème noir & or
🔐 Sécurité
Mots de passe : password_hash() / password_verify() (bcrypt)
Requêtes : 100 % PDO + prepared statements
Sessions : régénération dID à la connexion
Variables denvironnement via docker-compose.yml (pas de .env en clair)
🚀 Lancement rapide (Docker)
Cloner
bash
Copy
git clone https://gitea.votre-ecole.fr/votre-nom/cms-simplifie.git
cd cms-simplifie
Démarrer les services
bash
Copy
docker-compose up -d
Importer la base
Host : localhost:3306
User : cmsuser / Pass : cmspassword
Importer sql/dump.sql (DBeaver ou CLI)
Servir le front
bash
Copy
php -S localhost:8000 -t src
Visiter
Public : http://localhost:8000
Admin : http://localhost:8000/login.php
🔑 Identifiants par défaut
Table
Copy
Login Mot de passe
admin admin123
(hash dans sql/dump.sql ; régénérer avec docker-compose exec web php -r "echo password_hash('admin123', PASSWORD_DEFAULT);")