How saraaiss/exos-diriges-postits works
Project type and purpose
• This is a simple full-stack web application for managing “post-it” notes.
• The frontend is a static single-page interface; the backend is a PHP service exposing HTTP routes and persisting data in a SQL database.
File structure
• Top-level directories:
– postits-fe: contains HTML pages (index, login, user registration), JavaScript, CSS, and a configuration folder for caching rules.
– postits-be: contains a Dockerfile, Docker Compose config, PHP source code, routing, SQL scripts for initial data and schema, and server configuration files.
• The src/controllers directory holds a PostitController, likely implementing CRUD operations.
• router.php and routes.php define the entry point and HTTP endpoints.
• db directory holds db-structure.sql and db-data.sql for schema and sample data.
README
• The README only gives the project name; no architectural details are provided. Rely on file tree for structure and purpose.
Main components
• Frontend Application
– Static assets: HTML, CSS, JavaScript
– Runs in user browser
• Backend Service
– HTTP server (PHP, configured via .htaccess or js-no-cache.conf)
– Entry point: router.php
– Route definitions: routes.php
– Business logic: PostitController.php
• Database
– Relational database (MySQL or similar) initialized via db-structure.sql and db-data.sql
• Container Orchestration
– Docker Compose defines two services: web (PHP/Apache) and db
– Dockerfile builds the PHP service environment
• Optional external elements
– Browser cache configuration via js-no-cache.conf
Relationships and interactions
• The user’s browser loads index.html (or login/register) from the frontend server.
• JavaScript issues AJAX calls to the backend service’s HTTP endpoints.
• The backend service receives HTTP requests via router.php, dispatches to PostitController, and performs CRUD operations on the database.
• Docker Compose ensures the backend service and database service can communicate over a private network.
Architectural patterns and design principles
• Separation of concerns: static frontend vs. dynamic backend
• MVC-style routing: router → controller → model (database)
• Infrastructure as code: Dockerfile and docker-compose.yml for reproducible environments
• Configuration management: separate conf files for caching rules
Detail
• Layer—UI, API, data store, and container orchestration.
• Don’t split hairs—represent each logical component separately to reflect clear responsibilities.