📖 See Full API Endpoints Summary
A RESTful backend API built with Node.js, Express, and Prisma ORM to power a comprehensive pet care platform. This service supports pet profile management, health records, reminders, and a social forum for pet owners.
PetUniverse Connect is a centralized backend system designed to support a multi-platform (web and mobile) experience for pet lovers. It handles secure user authentication, data storage, and dynamic API routes for pet-related services.
- Supports user authentication (sign-up/login) via JWT
- Manages pet profiles
- Hosts a community forum for posts and comments
- Handles directory of nearby pet services (planned)
- Serves curated pet articles via API (planned)
- Modular, scalable code structure
- Secure authentication with bcrypt & JWT
- Relational data management with Prisma ORM & MySQL
- Follows REST principles and best practices
| Module | Functionality Description |
|---|---|
| Auth | Register, login, password encryption, JWT handling |
| Pets | CRUD for pet profiles |
| Forum | Post and reply to pet-related discussions |
| Bookings | Book and manage vet appointments |
Both the main API and the reminders microservice are already deployed and accessible online:
- Base URL:
https://your-main-app.onrender.com - Description: This is the primary backend for authentication, pets, vets, forum, and bookings.
- How to test: Use the provided Postman collection or access endpoints directly (see API Usage section below).
- Base URL:
https://your-reminders-app.onrender.com - Description: This service handles appointment reminders and notification scheduling.
- How to test: Use the endpoints described in the microservice's own README or contact the team for details.
Replace the above URLs with your actual Render deployment URLs before submission.
git clone https://github.com/mo-renike/petUniverse-backend.gitcd petUniverse-backendnpm installCreate a .env file based on .env.example:
DATABASE_URL=mysql://username:password@localhost:3306/petuniverse
JWT_SECRET=your_super_secret_key
PORT=3000npx prisma generate
npx prisma migrate dev --name initnpm run dev- Auth
- POST
/api/auth/register - POST
/api/auth/login - POST
/api/auth/forgot-password - POST
/api/auth/reset-password
- POST
- Pets
- GET
/api/pets - POST
/api/pets - GET
/api/pets/:id - PUT
/api/pets/:id - DELETE
/api/pets/:id
- GET
- Vets
- GET
/api/vets - GET
/api/vets/:id - POST
/api/vets
- GET
- Community Forum
- GET
/api/posts - POST
/api/posts - POST
/api/comments/:postid
- GET
- Bookings
- POST
/api/bookings - GET
/api/bookings - PATCH
/api/bookings/:id/status - PATCH
/api/bookings/max-appointment
- POST
Example POST Request:
POST /api/pets
Content-Type: application/json
{
"name": "Buddy",
"type": "Dog",
"age": 3
}Example Response:
{
"id": 1,
"name": "Buddy",
"type": "Dog",
"age": 3,
"ownerId": 7
}Returns appropriate status codes and messages:
400for invalid inputs401for unauthorized access500for internal server errors
Example Error:
{
"error": "Missing required field: name"
}- Use Postman to test endpoints (see included Postman collection file).
- Unit testing (Jest + Supertest) coming soon.
You can host both the main API and the reminders microservice on Render:
- Root Directory:
/(project root) - Build Command:
npm install - Start Command:
npm run startornode index.js - Environment Variables:
DATABASE_URL(your MySQL connection string)JWT_SECRETPORT(e.g., 8080)
- URL: Provided by Render after deployment (e.g.,
https://your-main-app.onrender.com)
- Root Directory:
/appointment_book_Reminders - Build Command:
npm install - Start Command:
npm run startornode server.js - Environment Variables:
- Set as needed for this service (e.g.,
PORT,DATABASE_URL, etc.)
- Set as needed for this service (e.g.,
- URL: Provided by Render after deployment (e.g.,
https://your-reminders-app.onrender.com)
To add a new service on Render:
- Go to your Render dashboard.
- Click "New +" → "Web Service".
- Connect your GitHub repo.
- Set the root directory for the service (see above).
- Set the build and start commands.
- Add environment variables.
- Deploy!
Each service will have its own URL and can be managed independently.
- Morenike Oyewole – Backend Lead
- Ojo-Kelly Oluwaseyi
- Oluwagbenga Adedire
- Olasupo Eniola Halimah
- Ndong Joseph Scripture Fang
- Onyeanusi Chiedozie Arthur
- Olapade Ajose Olorunfemi
For academic capstone use only. Not licensed for commercial deployment.