How rsvinicius/priori-task-api works
Main Components
• API Entry Point: Represent the PrioriTaskApplication as the main entry point.
• Controllers: Include components like AuthController and TaskController that define REST endpoints.
• Repositories: Create components such as UserRepository, TaskRepository, and CategoryRepository. These interact directly with the PostgreSQL database.
• Configuration: Include configuration blocks for EmailConfig, ThymeleafConfig, GlobalExceptionHandler, and WebSecurityConfig.
• Scheduler: Include the Quartz scheduler component, represented by the ReminderJob and associated ScheduleUtils and ScheduleService components.
• Database: Represent PostgreSQL, along with Flyway-managed database migrations (the SQL scripts in src/main/resources/db/migration).
• Email Template: Show Thymeleaf templates (ReminderEmail.html) and the Email service integration.
• Utility/Helpers: Optionally include a component for utilities like DateUtils and validators.
Relationships and Data Flow
• From Services, display the interaction with the Repository layer when persisting or retrieving data from PostgreSQL.
• That the Security module is integrated with Controllers and Services (for authorization/authentication purposes).
Architectural Patterns
• Layered (or N-tier) architectural pattern: Clearly separate the presentation (controllers), business logic (services), and data access (repositories).
• Integration with external services: The email service and scheduler are distinct yet integrated parts.
• Security Concern: Emphasize the use of JWT for stateless authentication within the API layer.
• Use of external configuration: Config files and environment-specific properties (application.yaml) are used to configure components like database connections and email settings.
Relevant Technologies
• Spring Boot & Kotlin for the application framework.
• PostgreSQL (with Flyway for migrations) for the database.
• Docker & Docker Compose for containerized database deployment.
• Quartz Scheduler for scheduling jobs.
• Apache Commons Email and Thymeleaf for email generation/notification.
• Spring Security & JWT for authentication/authorization.
Final Touches
• Specific details like filenames (e.g., “PrioriTaskApplication.kt” for the startup), key configuration classes, and scheduling jobs as labeled nodes.
• Clarity by spacing out components logically (grouping related items together, like all security classes in one area).