Skip to content

southernersvlc/backendVeterinaryClinic

Repository files navigation

Veterinary Clinic Application 🐾

CI

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.


What we have learned

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.


Features ✨

  • 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.

Infrastructure and Deployment

  • 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.

Database Setup

  • Production: PostgreSQL Dockerized and hosted on Render.com.

Diagrams

erDiagramMargarita.png umlClinicVet.png

EndPoints

guardians endpoints.png pets endpoints.png

Technologies Used ⚙️

  • Backend Framework: Spring Boot
  • Database: MySQL
  • ORM: Hibernate/JPA
  • Build Tool: Maven
  • REST API: CRUD operations using Spring Controllers

FrontEnd

  • Framework: React.js

Deployment

  • Docker: For containerizing the PostgreSQL database in development and production environments.
  • Render.com: Hosting the backend and production PostgreSQL database.

Getting Started 🚀

Prerequisites

  1. Java 17+
  2. Maven
  3. MySQL Database
  4. IntelliJ IDEA (Optional but recommended)

📦 Files Structure

|--- 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

💻 Technology Stack:


🌐 Authors

  • Mònica Simó
    GitHub LinkedIn
  • Sergi Asins
    GitHub LinkedIn
  • Paola Perdomo
    GitHub LinkedIn
  • Miguel Reyes
    GitHub LinkedIn

About

Sistema de Veterinaria Clinica

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors