How caa900nbb-projectx/loginservice_found_it_backend works
Main Components
• Frontend/API Exposure: Although there isn’t a dedicated frontend, external clients (e.g., Postman, other UI apps) interact with the service via exposed REST endpoints.
• Web Layer: Represent the two controllers – the AuthenticationController and UserController – which handle login, registration, and user queries.
• Service Layer: Include AuthenticationService, UserService, EmailService, JwtService, and LogoutService. These provide business logic, email verification tasks, token generation, and security handling.
• Data Access Layer: Indicate the repository interfaces ITokenRepository and IUserRepository that interact with the data model.
• Domain/Model Layer: Illustrate the User and Token models, as well as DTO classes (LoginUserDto, RegisterUserDto, etc.) that are used for data exchange.
• Core Configuration & Security: Detail classes such as ApplicationConfiguration, EmailConfiguration, SecurityConfiguration, and JwtAuthenticationFilter – these handle the security setup, JWT filtering, and application environment settings.
• External Components:
• Database – PostgreSQL, as set up per the README.
• External Email Service – Configured via the provided EmailConfiguration with support for Gmail app passwords.
• That controllers delegate tasks to the Service Layer.
• Service Layer interacting with repositories to perform CRUD operations on the database.
Architectural Patterns
• Layered Architecture: Clearly separate controllers (presentation), services (business logic), and repositories (data access).
• Security and JWT: Emphasize the integration of a JwtAuthenticationFilter along with SecurityConfiguration, showing use of JWT for stateless authentication.
• Dependency Injection: Reflect how Spring Boot’s configuration classes (ApplicationConfiguration, EmailConfiguration) provide centralized management of dependencies.
Relevant Technologies
• Java (via Oracle Java SDK 23)
• Spring Boot (including Security and Web libraries)
• Gradle Build System (building and dependency management)
• Docker (Dockerfile and docker-compose for containerization, even if containerization is to be developed further)
• PostgreSQL (for persistence)
• SMTP Email Services (for sending verification emails)