How anasaeq10/pfa-4iir-project works
Project Type and Purpose
• This is a monolithic, full-stack Spring Boot web application for an “Association des étudiants” platform.
• It follows an MVC pattern: browser-based UI (Thymeleaf + static assets), Spring MVC controllers, business services, JPA repositories, and a MySQL database.
• It also integrates Spring Security for auth and an EmailService for outbound SMTP notifications.
High-Level Container Identification
• User’s Browser (Client)
• Spring Boot Application
• Static Resource Server (CSS/JS under /static)
• Thymeleaf Template Engine (renders HTML under /templates)
• Spring MVC DispatcherServlet + SecurityFilterChain
• Controllers (/controller)
• Services (/service, including EmailService)
• Repositories (/repository)
• Configuration (/config: SecurityConfig, MvcConfig)
• MySQL Database (persistent store)
• External SMTP Mail Server (Mailtrap or similar)
Relationships and Data Flow
• Browser → HTTP(S) → DispatcherServlet
• DispatcherServlet → SecurityFilterChain (auth checks)
• DispatcherServlet → Controller (e.g., AuthController, DocumentController)
• Controller → Service → Repository → MySQL
• Service (EmailService) → External SMTP
• Repository → JPA EntityManager → MySQL
• Controller returns Model + View → Thymeleaf → HTML → Browser
• Static assets (CSS) served directly by Spring Boot’s resource handler
Architectural Patterns and Principles
• Layered Architecture (Presentation → Controller → Service → Repository → Database)
• Dependency Injection (Spring @Autowired)
• Separation of Concerns (each layer has a distinct responsibility)
• Security as a cross-cutting concern (Spring Security filters)
• Template-based MVC (Thymeleaf)