This is the backend REST API for the DogCare Center β a full-service pet care platform for dog owners. It supports dog management, grooming/bath appointments, snack ordering, laundry bookings, dog runs, and more.
- Node.js
- MongoDB
- Postman (for testing)
git clone https://github.com/yourusername/dogcare-center-api.git
cd dogcare-center-api
npm install
npm run dev.envfile setup:
PORT=5000
MONGO_URI=mongodb://localhost:27017/dogcare
JWT_SECRET=your-secret-keyAuthentication is required for most endpoints via JWT.
POST /api/auth/login
{
"username": "john123",
"password": "password"
}POST /api/auth/register
{
"username": "john123",
"password": "password",
"email": "john@example.com"
}POST /api/members
{
"userId": "userObjectId",
"name": "John Doe",
"fname": "John",
"lname": "Doe",
"dateOfBirth": "1990-05-10",
"gender": "Male"
}GET /api/members/user/:username
POST /api/dogs
{
"name": "Lucky",
"breed": "Shih Tzu",
"age": 4,
"weight": 5,
"notes": "Allergic to beef",
"userId": "userObjectId"
}GET /api/dogs/member/:userId
POST /api/laundry
{
"dogName": "Lucky",
"items": [
{ "item": "Dog Clothes", "quantity": 2 },
{ "item": "Towel", "quantity": 1 }
],
"notes": "Use hypoallergenic detergent",
"status": "Pending",
"paid": false,
"totalCost": 120
}POST /api/grooming
{
"userId": "userObjectId",
"dogId": "dogObjectId",
"services": ["Haircut", "Basic Bath"],
"preferredDate": "2025-07-20"
}POST /api/wash-dry
{
"userId": "userObjectId",
"dogId": "dogObjectId",
"type": "Assisted Service",
"preferredDate": "2025-07-22"
}POST /api/dog-run
{
"userId": "userObjectId",
"dogId": "dogObjectId",
"preferredDate": "2025-07-19"
}POST /api/snacks
{
"userId": "userObjectId",
"dogId": "dogObjectId",
"items": [
{ "name": "Dried Beef Strips", "quantity": 2, "unitPrice": 50 }
],
"totalCost": 100
}POST /api/cafe
{
"userId": "userObjectId",
"dogId": "dogObjectId",
"items": [
{ "name": "Dogccino", "quantity": 1, "unitPrice": 50 }
],
"totalCost": 50,
"notes": "Serve chilled"
}βββ models/
β βββ Dog.js
β βββ Member.js
β βββ User.js
β βββ ...
βββ controllers/
βββ routes/
βββ middleware/
βββ app.js
βββ server.js
- All POST endpoints require
Content-Type: application/jsonand a validAuthorization: Bearer <token>header. - Use Postman Collection (coming soon) for easy testing.
For questions or contributions, please contact Pan or open an issue.