How codeurjc-daw-2024-25/webapp12 works
• Client/UI Layer:
• Browsers/Clients: Represent front-end users, including non registered users, registered users, and administrators.
• Front-end Assets: Illustrate that the presentation layer is served using Thymeleaf templates and static resources (CSS, JS, images).
• Backend Application Server:
• Controllers: Group all web controllers, REST controllers, and API endpoints (e.g., ActivityRestController, UserRestController, ReviewRestController, etc.).
• Services: Represent the business logic layer (e.g., ActivityService, UserService, EmailService, Recommendation algorithm).
• Repositories: Show the data access layer that interacts directly with the database (ActivityRepository, ReviewRepository, UserRepository, etc.).
• Security Module:
• CSRF and RepositoryUserDetails services.
• Database:
• External Services and Tools:
• Email SMTP: Show the integration with Gmail’s SMTP server for sending emails.
• PDF Generation: Mention the component responsible for generating PDFs upon activity enrollment.
• API Documentation: Represent the API docs (api-docs.yaml / api-docs.html) accessible externally.
Relationships and Data Flow
• Within the backend, map the flow:
– Controllers receive incoming requests and delegate tasks to the appropriate Service layers.
– Services process the business logic (including interactions with security, email, PDF generation, and recommendation algorithms).
– Services then interact with the Repository layer to persist or retrieve data from the MySQL database.
• That the Security Module (JWT filtering and authentication checks) runs before requests reach sensitive areas of the Controllers.
• That static assets (stored under the ‘static’ and ‘templates’ directories) are served as web pages.
• Integration with external SMTP for email notifications and with Docker for deployment.
Architectural Patterns and Design Principles
• Layered Architecture: Separate components into presentation, business, data and security layers.
• RESTful API: Show that the backend exposes endpoints that follow REST conventions.
• Security by Design: Emphasize the use of JWT and Spring Security to handle authentication and authorization.
• Containerization: Illustrate how Docker and Docker Compose are used to build and run the application, facilitating easy deployment.
• MVC for Web Pages: Indicate that the front-end pages utilize the MVC structure (with controllers handling requests, templates rendering views, and static assets supporting the UI).
Detail and Clarity
• Be meticulous in capturing every key module described above.
• Don’t hesitate to break down larger components (like the backend) into sub-components if needed.