Backend to an e-commerce platform that empowers businesses to sell products online and enables customers to login, browse, shop, give reviews and make secure online purchases. This application aims to provide a seamless shopping experience with a focus on user-friendly design, product management, and payment processing.
-
User: User can register, login, logout, update profile, and update password.
-
Order: User can update, get, and create Order.
-
Products: Admin can update, get, and create Product.
-
Review: User can update, get, and create Reviews.
- JavaScript
- Node
- Express
- dotenv
- mongoose
- nodemon
- cors
- bcryptjs
- express-async-error
- helmet
- joi
- swagger-ui-express
- jsonwebtoken
- http-status-code
- morgan
- clone the repository
git clone [email protected]:olawuwo-abideen/ecommerce.git
- navigate to the folder
cd ecommerce.git
Open a terminal window session, or the equivalent on your machine, and enter the following command to install all the Node modules needed to run the app:
npm install
After doing an npm install
enter the following npm start
command:
npm start
Set up the environment variables:
Create the .env file and setup the MongoDB URL.
The server will start running on the specified port (default: 3000) and establish a connection to the MongoDB database.
This will start the app and set it up to listen for incoming connections on port 3000. Open up your browser of choice and go to the url
http://localhost:3000
to start using the app.
The following API endpoints are available:
-
BaseUrl https://localhost:3000/
-
POST /api/v1/register
- Register a new user -
POST /api/v1/login
- User login -
GET /api/v1/logout
- User logout -
GET /api/v1/showMe
- Show authenticated user -
PATCH /api/v1/updateUser
- Update User Profile -
PATCH /api/v1/updateUserPassword
- User update Password
GET /api/v1/showAllMyOrders
- Show all user orderGET /api/v1/:id
- Get an orderPATCH /api/v1/:id
- update an order
GET /api/v1/:id/reviews
- Get user reviewPATCH /api/v1/:id/reviews
-Update user reviewDELETE /api/v1/:id/reviews
- Delete user review
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
👤 Olawuwo Abideen
- GitHub: @Olawuwo Abideen
- Twitter: @Olawuwo Abideen
- LinkedIn: @Olawuwo Abideen