MediCare is a comprehensive medicine shopping application designed to provide users with a seamless experience in purchasing medicines and healthcare products. Built on a Spring Boot backend, this application offers a range of functionalities to cater to the diverse needs of users looking for medicinal products.
BASE IP ADDRESS :https://medicare.up.railway.app/
- User Authentication: Register new users and authenticate login credentials securely.
- Browse Medicines: Access a wide range of medicines with detailed information.
- Product Details: View comprehensive details of each medicine, including dosage, price, and availability.
- Shopping Cart: Add, update, or remove items from the cart for easy purchasing.
- Checkout Process: Secure payment gateways and order confirmation.
/api/auth/signup
- POST: Register a new user./api/auth/signin
- POST: User login to the application./api/auth/forget_password
- POST: Request to reset the password./api/auth/verify_OTP
- POST: Verify the One-Time Password (OTP) for password reset./api/auth/update_Password
- POST: Update the password after successful verification.
- POST
/api/Admin/create
- Description: Add a new item to the database.
- Method:
POST
- Body:
Product
object with item details.
- PUT
/api/Admin/update
- Description: Update item data in the database.
- Method:
PUT
- Body:
ProductRequest
object with item ID and updated details.
- POST
/api/Admin/delete
- Description: Delete an item from the database.
- Method:
POST
- Body:
ProductRequest
object with item ID.
- GET
/api/Public/getItem
- Description: Retrieve all items from the database.
- Method:
GET
- GET
/api/Public/filterByDiscount
- Description: Filter products by a specific discount percentage.
- Method:
GET
- Parameters:
discount
(double): Discount percentage.
- GET
/api/Public/filterProductByDiscount
- Description: Filter a particular product by a specific discount percentage.
- Method:
GET
- Parameters:
discount
(double): Discount percentage.product
(string): Name of the product.
- GET
/api/Public/filterByCategory
- Description: Filter products by category.
- Method:
GET
- Parameters:
category
(string): Category name.
- GET
/api/Public/filterByRangeDiscount
- Description: Filter products by a range of discount percentages.
- Method:
GET
- Parameters:
minDiscount
(double): Minimum discount percentage.maxDiscount
(double): Maximum discount percentage.
- GET
/api/Public/filterProductByRangeDiscount
- Description: Filter a particular product by a range of discount percentages.
- Method:
GET
- Parameters:
minDiscount
(double): Minimum discount percentage.maxDiscount
(double): Maximum discount percentage.product
(string): Name of the product.
- GET
/api/Public/filterByPopularity
- Description: Filter products by popularity (based on the number of buyers).
- Method:
GET
- GET
/api/Public/filterProductByPopularity
- Description: Filter a particular product by popularity (based on the number of buyers).
- Method:
GET
- Parameters:
product
(string): Name of the product.
- POST
/api/addCart
- Description: Add an item to the cart.
- Method:
POST
- Body:
CartRequest
object with item ID, username, and quantity.
- PUT
/api/deleteCartItem
- Description: Remove an item from the cart.
- Method:
PUT
- Parameters:
cartId
(string): Cart item ID.
- PUT
/api/increaseItemInCart
- Description: Increase the quantity of an item in the cart.
- Method:
PUT
- Parameters:
cartId
(string): Cart item ID.increment
(int): Quantity to increment.
- PUT
/api/decreaseItemInCart
- Description: Decrease the quantity of an item in the cart.
- Method:
PUT
- Parameters:
cartId
(string): Cart item ID.decrement
(int): Quantity to decrement.
- PUT
/api/removeCart
- Description: Endpoint to remove all items from the cart.
- Method: PUT
- Parameters:
cartId
(string): Cart item ID.
- Response: Returns a message response indicating the success of the operation.
200 OK
with the message response body.
- GET
/api/getCart
- Description: Retrieve cart items for a specific user.
- Method:
GET
- Parameters:
userId
(string): UserId to fetch cart items.
- POST
/api/order
- Description: Buy a product and create an order.
- Method:
POST
- Body:
OrderRequest
object with item ID, quantity, user details, and order information.
- GET
/api/showOrder/{userId}
- Description: Show the products that bought by user.
- Method:
GET
- Path Variable:
userId
(string): UserId to fetch cart items.
- POST
/api/payment/{orderId}
- Description: Endpoint to create a payment link for the specified order.
- Method: POST
- Path Variable:
orderId
(string): The ID of the order for which the payment link is to be created.
- Request Body: None
- Response: Returns a payment link response containing the payment link ID and URL.
201 Created
with the payment link response body.
- PUT
/api/payment/updatePayment
- Description: Endpoint to update the payment status for an order.
- Method: PUT
- Parameters:
payment_id
(string): The ID of the payment.order_id
(string): The ID of the order associated with the payment.
- Response: Returns an update payment response indicating the success of the operation.
200 OK
with the update payment response body.
- Token-based authentication ensuring secure user access.
- Consistent error handling for invalid requests and security breaches.
- Utilization of appropriate HTTP status codes for error responses.
- Clear and descriptive error messages for enhanced user understanding.
- Spring Boot: Backend framework for robust application development.
- Java: Primary programming language for implementing backend logic.
- RESTful APIs: Architecture for communication between client and server.
- MongoDB: No SQL Database management systems for data storage.
- Spring Security: Implementation of security features and authentication.
- Clone Repository: Clone the repository from GitHub.
- Configure Database: Set up a MongoDB database and configure database properties in
application.properties
. - Run Application: Use Maven to build and run the Spring Boot application.
- Access Endpoints: Utilize the provided endpoints for various functionalities.
- Register/Login: Create a new account or log in using existing credentials.
- Browse Medicines: Explore available medicines and view details.
- Add to Cart: Select desired medicines and add them to the cart.
- Checkout: Complete the purchase process by placing an order securely.
Contributions are most welcome! If you'd like to contribute to the project, please fork the repository and create a pull request.