How santiago01011/tdl_auth_api works
Project type and purpose
• This is a standalone backend microservice (“Auth API with JWT”) built in Java/Spring Boot. Its sole responsibility is to handle user registration (with email verification), login, and JWT‐based session management for external client applications.
File structure
• Top‐level build and config:
• pom.xml, mvnw, .mvn/wrapper → Maven project
• Dockerfile, .dockerignore → containerization
• DB-SCRIPTS/INIT and DB-SCRIPTS/FUNC → SQL initialization and helper functions for PostgreSQL
• Source code layout (src/main/java/com/ToDoList/auth):
• config → application wiring, HTTP security (SecurityConfig, JwtAuthenticationFilter), JWT utilities
• controller → REST endpoints (AuthController)
• service → business logic (AuthService, JwtService)
• repository → data access via Spring Data JPA (UserRepository, PendingUserRepository)
• model → JPA entity definitions (User, PendingUser)
• exception → centralized error handling (ApiExceptionHandler, custom exceptions)
• Resources (application.properties) hold DB and SMTP connection settings.
README for additional insights
• Describes authentication flows (registration → email → verification → activation; login → credential check → JWT issuance).