PetPal is a comprehensive pet management system designed to help pet owners keep track of their pets' information, health records, medications, appointments, and more. This application provides a user-friendly interface for managing all aspects of pet care.
PetPal allows pet owners to store and manage detailed information about their pets, including:
- Basic pet details (name, species, breed, etc.)
- Health records and veterinary visits
- Medication tracking
- Appointment scheduling
- Multi-owner pet management
The system is built with a .NET Core backend API and is designed to be used with a frontend client application (not included in this repository).
- User Authentication: Secure registration and login system
- Pet Management: Add, view, update, and delete pets
- Multi-Owner Support: Share pet profiles with family members or co-owners
- Health Records: Track veterinary visits and health information
- Medication Management: Record and track pet medications
- Appointment Scheduling: Manage veterinary and other pet-related appointments
- Role-Based Access Control: Admin and regular user roles with appropriate permissions
- Backend: .NET 7.0, ASP.NET Core
- API Style: Minimal API
- Database: PostgreSQL
- ORM: Entity Framework Core
- Authentication: ASP.NET Identity with cookie authentication
- Object Mapping: AutoMapper
- Data Format: JSON
Before you begin, ensure you have the following installed:
- .NET 7.0 SDK
- PostgreSQL
- Git
- A code editor (recommended: Visual Studio Code or Visual Studio)
Clone the project to the directory of your choice, and then:
cd pet-pal-server
-
Create a connection string user secret. Remember to modify it by putting your password in there before running the commands.
dotnet user-secrets init dotnet user-secrets set 'PetPalDbConnectionString' 'Host=localhost;Port=5432;Username=postgres;Password=your_password;Database=PetPal'
-
Apply the database migrations:
cd PetPal.API dotnet ef database update
There is a launch.json
and tasks.json
file already in the repostitory, so you can immediately start the program in debug mode.
- The API will be available at
http://localhost:5000
The API provides the following main endpoint groups:
POST /auth/register
- Register a new userPOST /auth/login
- Log in a userPOST /auth/logout
- Log out a user
GET /user/pets
- Get all pets for the current userGET /pets/{id}
- Get a specific pet by IDPOST /pets
- Create a new petPUT /pets/{id}
- Update a petDELETE /pets/{id}
- Delete a petPOST /pets/{petId}/owners
- Add an owner to a petDELETE /pets/{petId}/owners/{ownerId}
- Remove an owner from a pet
GET /pets/{petId}/healthrecords
- Get all health records for a petGET /healthrecords/{id}
- Get a specific health recordPOST /pets/{petId}/healthrecords
- Create a new health recordPUT /healthrecords/{id}
- Update a health recordDELETE /healthrecords/{id}
- Delete a health record
GET /pets/{petId}/appointments
- Get all appointments for a petGET /appointments/{id}
- Get a specific appointmentPOST /pets/{petId}/appointments
- Create a new appointmentPUT /appointments/{id}
- Update an appointmentDELETE /appointments/{id}
- Delete an appointment
This project is licensed under the MIT License - see the LICENSE file for details.