Bobbi Brown Cosmetics is a global premium beauty brand that empowers women to embrace and enhance their individual beauty. The website of bobbi-brown provides all the beauty products that are offered by the company.
This is a rest API for getting details of some products that is offered by the orginal website. Its has login/logout functionalities along side Authentication for the user from the token which is generated useing JWT(JSONWEBTOKEN). Can add/remove product to the cart of specific user profile this part is also in the backend. The sum of total amount of the products & no. of product in cart is also provided.
This was a collaborative project of six member to create a clone of bobbi-brown website. This Project was made as a part of construct week curriculum of MASAI School.
-
Node
-
Express
-
MongoDB (For Storage)
-
Heroku (For Deployment)
GET /product
GET /product/${page}
Parameter | Type | Description |
---|---|---|
page |
string |
Required. Filter the product data as per pages |
GET /product/product/${product_id}
Parameter | Type | Description |
---|---|---|
product_id |
string |
Required. Get full details of the product |
GET /search/${keyword}
Parameter | Type | Description |
---|---|---|
keyword |
string |
Required. Product that are related to the keyword as sent as a result |
POST /register
Body | Type | Description |
---|---|---|
name |
string |
Required |
email |
string |
Required. Email should be Unique |
password |
string |
Required (No password specification as such) |
POST /login
Body | Type | Description |
---|---|---|
email |
string |
Required. |
password |
string |
Required |
GET /cart/getcart
Header | Type | Description |
---|---|---|
Authentication Token |
string |
Required (which need to be get the user detail) |
POST /cart/add/${product_id}
Parameter | Type | Description |
---|---|---|
product_id |
string |
Required. ProductId from the the products |
Header | Type | Description |
---|---|---|
Authentication Token |
string |
Required (which need to be get the user detail) |
Remove specific single Product / Decrease the Quanitiy of specific Product from Specific (Logged In) User Cart.
POST /cart/remove/${product_id}
Parameter | Type | Description |
---|---|---|
product_id |
string |
Required. ProductId from the the products |
Header | Type | Description |
---|---|---|
Authentication Token |
string |
Required (which need to be get the user detail) |
POST /cart/delete/${product_id}
Parameter | Type | Description |
---|---|---|
product_id |
string |
Required. ProductId from the the products |
Header | Type | Description |
---|---|---|
Authentication Token |
string |
Required (which need to be get the user detail) |
POST /cart/removeall
Header | Type | Description |
---|---|---|
Authentication Token |
string |
Required (which need to be get the user detail) |
To run this project, you will need to add the following environment variables to your .env file
DB
: MongoDB database Link.
KEY
: JSONWEBTOKEN key for hashing that password.
PORT
: Which is given by Heroku.
After makeing all the changes to the cart we are return whole user instead of only cart that issue.