Senteur is a school project: a small web shop focused on perfumes, built with plain PHP (no full framework), MySQL, and Docker so the same environment runs everywhere.
The goal is to show you can structure a PHP app clearly (routing, controllers, models, views), persist data in a relational schema, and ship something a teacher can run with one command.
- A Docker stack: Nginx (web server) → PHP-FPM (app) → MySQL (database).
- A custom “mini framework” folder under
src/Core/(router, request/response, database helper — to be wired as you implement features). - MVC-style folders: controllers, models, services, views.
- A database schema in
docker/mysql/init.sql(brands, products, variants, images, users, reviews, etc.).
| Layer | Technology |
|---|---|
| Language | PHP 8.3 (see docker/php/Dockerfile) |
| Web server | Nginx |
| App server | PHP-FPM |
| Database | MySQL 8 |
| Containers | Docker Compose |
Prerequisites: Docker with Compose, ports 8080 and 3306 free (or change mappings in docker-compose.yml).
-
Clone the repository and enter the project directory.
-
Copy environment file:
cp .env.example .env
Adjust values if you change database credentials in Compose.
-
Start containers:
docker compose up --build
-
- Nginx listens on host 8080 and forwards PHP to the
appcontainer. - Until routing and views are implemented, you may see an empty page with HTTP 200 — that still means Nginx and PHP-FPM are working.
- Nginx listens on host 8080 and forwards PHP to the
-
Stop:
Ctrl+C, or in another terminal:docker compose down.
MySQL note: init.sql runs only when MySQL initializes a new data volume. If you change the schema later, you may need to reset the volume or apply migrations manually — see docs/PROJECT_STRUCTURE.md.
Defined in .env (see .env.example):
APP_ENV,APP_DEBUG— local development flags (you can read them inbootstrap.phplater).DB_*— hostmysqlmatches the Compose service name; use these when you connect with PDO inDatabase.php.
Entity-relationship overview of the Senteur schema.
-
Interactive: https://dbdiagram.io/d/SenteurSQLDiagram-69c288c3fb2db18e3bf07cf6
-
Local files:
docs/diagrams/SenteurSQLDiagram.pngdocs/diagrams/SenteurSQLDiagram.svg
The diagram is generated from the current schema defined in
docker/mysql/init.sql.
senteur/
├── docker/ # Docker-only: Nginx config, PHP Dockerfile, MySQL init SQL
├── public/ # Web root (index.php, assets, uploads)
├── src/
│ ├── Core/ # Router, Request, Response, Database, base Controller
│ ├── Controllers/
│ ├── Models/
│ ├── Services/
│ ├── Views/
│ ├── routes.php
│ └── bootstrap.php
├── docs/
│ └── PROJECT_STRUCTURE.md # Deeper folder-by-folder explanation
├── .env.example
├── docker-compose.yml
└── README.md
More detail: docs/PROJECT_STRUCTURE.md
This is a School project, so it has no License.
