This is a Spring Boot backend application designed to manage Margarita's veterinary clinic. The system supports the management of Guardians and their Pets (pets) through CRUD operations.
In this project we have worked with several new valuable insights into building a structured and maintainable backend application using Spring Boot.
-
Data Transfer. Objects (DTOs): DTOs help decouple the data layer from the presentation layer. Instead of exposing entire entities, we use DTOs to transfer only necessary data between the client and server.
-
Service Layer: The service layer handles business logic, keeping controllers clean and focused solely on handling HTTP requests.
-
Mappers: Mappers convert between DTOs and entities, ensuring data transformation.
-
Guardian Management 🧑⚕️
- Add, update, delete, and retrieve owners.
- Validation for unique phone numbers and proper formatting.
-
Pet Management 🐶
- Add, update, delete, and retrieve patients.
- Associate patients with owners.
-
Appointment Management 🐱
- Add, update, delete, and retrieve appointments.
- Associate appointments with pets.
-
Statistics 📊
- Counts and show the total amount saved of pets, owners and dates within the system.
-
Validation and Error Handling
- Proper checks to ensure required fields are populated.
- Error messages for invalid data or non-existent IDs.
-
Frontend Integration
- Connected with a React.js frontend to provide a user-friendly interface for managing the clinic’s data.
- Environment Management
- Test: Configuration for running unit and integration tests.
- Development:
- Utilizes Docker to create a PostgreSQL database in a container.
- Production:
- Backend deployed on Render.com using Docker.
- Connected to a PostgreSQL database hosted and managed within Render.com.
- Production: PostgreSQL Dockerized and hosted on Render.com.
- Backend Framework: Spring Boot
- Database: MySQL
- ORM: Hibernate/JPA
- Build Tool: Maven
- REST API: CRUD operations using Spring Controllers
- Framework: React.js
- Docker: For containerizing the PostgreSQL database in development and production environments.
- Render.com: Hosting the backend and production PostgreSQL database.
- Java 17+
- Maven
- MySQL Database
- IntelliJ IDEA (Optional but recommended)
|--- utils
|--- src
|--- main
|--- java
|---com.example.veterinary_clinic
|--- controllers
|--- GuardianController
|--- PetController
|--- AppointmentController
|--- StatisticsController
|--- dtos
|--- AppointmentRequestDTO
|--- AppointmentResponseDTO
|--- GuardianRequestDTO
|--- GuardianResponseDTO
|--- PetRequestDTO
|--- PetResponseDTO
|--- StatisticsResponseDTO
|--- entities
|--- Appointment
|--- Guardian
|--- Patient
|--- exceptions
|--- mappers
|--- AppointmentMapper
|--- GuardianMapper
|--- PetMapper
|--- repositories
|--- AppointmentRepository
|--- GuardianRepository
|--- PetRepository
|--- services
|--- AppointmentService
|--- GuardianService
|--- PetServices
|--- StatisticsService
|--- VeterinaryClinicApplication
|--- test
|--- java
|---com.example.veterinary_clinic
|--- controller
|--- OwnerControllerTest
|--- services
|--- GuardianServiceTest
|--- VeterinaryClinicApplicationTests



