Skip to content

BooraKaushik/SARK-Product-Review-Site-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SARK Product Review Site - Backend

This Project is Developed as a part of course CS5610. It is Developed by Kaushik Boora, Rahul Reddy Baddam, Sai Sriker Reddy Vootukuri and Abhishek Kumar. This Repository contains the code for the Backend of SARK Product review site.

About

SARK Product review site is a website where users can lookup for products and rate them, developed using NodeJS, ExpressJS, JWT, MongoDB technologies on the Backend. The site essentially uses a Free Open API service that provides product information. This product Information can be stored on Database. This site assumes there are 3 types of users, Customer, Dealer and Admin. For the Frontend Code of this project Please visit SARK Product Review Site - Frontend

Features

This Project Provides the following RESTful APIs,

API Name Path HTTP Verb Description
Create User /api/users POST Creates a User by taking in info such as first name, last name, email etc. Example body:
{
"confirmPassword": "Kaushik@123",
"dateOfBirth": "2022-04-11",
"email": "[email protected]",
"firstName": "Kaushik",
"lastName": "Boora",
"password": "Kaushik@123",
"phone": "(857) 230-5227",
"type": "Customer",
"address":{
"addressLine": "10 Buckley Ave Apt 1",
"addressLine2": " mnbh",
"city": "Jamaica Plain",
"state": "Massachusetts",
"zipcode": "02130-2293"}
}
Login /api/login POST Logs a user in and sends JWT token back to the user. For authenticated routes this token must be sent in header for authorizaion. Example body:
{
"email":"[email protected]",
"password":"Kaushik@123"
}
Unique Email /api/uniqueEmail POST This API checks if a given username is already in the DB.
Update User Info /api/updateusers PUT This API updates the user information.
Fetch All Users /api/all-users POST This is an authenticated route, Reqires the id of the user sent in the body. All user info is returned if the user requesting data is an admin.
Remove a particular user /api/remove-users DELETE This is an authenticated route, Reqires the id of the requesting user sent as id and id of user to be deleted as delid in the body. A user is deleted if the user requesting is an admin.
Add a review /api/add-review POST This is an authenticated route and requires user id sent in the body
Add a like /api/add-like POST This is an authenticated route and requires user id sent in the body
etc..

Running the project

Follow the below steps to run the project

  1. Clone the Directory.
  2. Make sure the MongoDB instance is running.
  3. In a terminal move to the cloned directory. Execute the following command npm start. This will start the Backend on port 4300.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •