How andresvillamil/api-citas-springboot works
Main Components
• API Layer: This represents the HTTP endpoints and controllers. Include components for CitaController, DoctorController, and PacienteController.
• Service Layer: Show the business logic components (e.g., CitaService, DoctorService, and PacienteService along with their respective implementations). This layer processes incoming requests from the controllers.
• Repository/Data Access Layer: Represent the data access objects like CitaRepository, DoctorRepository, and PacienteRepository that interact with the database (MySQL as suggested by the README).
• Domain/Entities: Display the domain models (e.g., Cita, Doctor, Paciente, including any composite keys such as CitaId) that represent the data structures.
• Database: Although not directly part of the Java code, show the MySQL database interacting primarily with the repository layer.
• Configuration & Resources: Indicate configuration files such as application.properties which control settings for the Spring Boot application.
• Tests: Optionally, include a block for the testing layer (e.g., ApiCitasApplicationTests) to address quality assurance aspects.
Relationships and Interactions
• Database (MySQL) as the underlying data store connected to the repositories.
• Optionally, indicate that layers such as configuration and resources (application.properties) influence all layers if needed.
Architectural Patterns and Design Principles
• Separation of concerns: each layer has clearly defined responsibilities.
• Mention dependency injection as a key pattern used by Spring Boot, even if it’s abstract, to help illustrate component interactions.
Technologies and Frameworks
• Spring Boot: Central to the API implementation.
• MySQL: The chosen relational database for persistent storage.
• Maven: For build and dependency management (the pom.xml and mvnw files indicate Maven is used).
• Additionally, the project includes a testing framework (likely JUnit through the Spring Boot test annotations).
Detailing
• Since the project includes directories like Pruebas-api with screenshots, you might also annotate that these are used for testing the API endpoints, which reinforces the separation between the application layers and testing procedures.
• MVC structure provided by the package names under src/main/java/com/citas/apicitas/ (dividing by controllers, entities, repositories, etc.).