This project is a backend-only RESTful API for tracking user subscriptions. It allows users to register, log in, and manage their subscription plans with full CRUD functionality.
All auth routes under:
/api/v1/auth
Description: Registers a new user account.
Request Body:
{
"userName": "JohnDoe",
"email": "john@example.com",
"password": "securePassword123"
}
Description: SignIn to your account.
Request Body:
{
"email": "john@example.com",
"password": "securePassword123"
}
Description: Logs out the current user session.
All subscription routes under:
/api/v1/subscription
Description:Adds a new subscription linked to the authenticated user. Request Body:
{
"name": "Netflix",
"price": 1500,
"currancy": "pkr",
"frequency": "monthly",
"category": "entertainment",
"paymentMethod": "Credit Card",
"status": "Active",
}Description: Retrieves all subscriptions only for the admin.
Description: Retrieves all subscriptions for a specific user by their ID.
Description: Updates an existing subscription by its ID. Request Body:
{
"name": "Netflix",
"price": 1500,
"currancy": "pkr",
"frequency": "monthly",
"category": "entertainment",
"paymentMethod": "Credit Card",
"status": "Active",
}Description: Deletes a subscription by its ID.
All user routes under:
/api/v1/users
Description: Retrieves all users, accessible only to admins.
Description: Retrieves a specific user by their ID only to admins.
Description: Cancels a specific user's subscription by their ID only to admins.
Description: Deletes a user and their subscription details by their ID, accessible only to admins.