Server: Node, Express, MongoDB, Mongoose, JWT
Modules: nodemailer, bcryptjs,express-validator,multer,sharp,helmet,hpp,compression,hpp,toobusy-js,xss-clean
- Authentication & Authorization
- Post CRUD operations
- Categories, SubCategories, Brands, Products, Users, Logged Users
- Coupons, Addresses, Cart, Order
- Reviews functionality
- Search (fields,price,sort,reviews,keyword,filtering)
- Multi Vendors
- Orders for each seller are shown separately
- Local Storage
- improve images
- Log out if the password is changed
- Permissions (Admin,vendor,user)
- Wishlist && vendor profile
- Deactive User
- Verify Rest Code on email
- Forget Password
- Coupons work on the products of its owner
- More to explore!
Clone the project
git clone https://github.com/aashahin/Twilight-Nodejs-Multi-vendor-ecommerce-cms.git
Go to the project directory
cd my-project
Install dependencies
npm install
Start the server
npm run server
To run this project, you will need to add the following environment variables to your config.env file
PORT=5000
NODE_ENV=development
BASE_URL=https://example.com
MONGO_URL=mongodb://localhost:0000/ecommerces
SECRET_KEY='as#ewronh$%@65*-'
EXPIRESIN=90d
HOST_MAIL="smtp.example.com"
PORT_MAIL=465
SECURE_MAIL=true
USER_MAIL="[email protected]"
PASSWORD_MAIL="password"
FROM_MAIL="Shaheen Team <[email protected]>"
Some endpoints may require authentication for example. To create a create/delete/update product, you need to register your API client and obtain an access token.
The endpoints that require authentication expect a bearer token sent in the Authorization header
.
Example:
Authorization: Bearer YOUR TOKEN
POST /api/v1/auth/signup
The request body needs to be in JSON format.
POST /api/v1/auth/login
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | no |
email |
string |
Your email | yes |
password |
string |
Your password | yes |
GET /api/v1/users/get-me
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | yes |
GET /api/v1/users/
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | yes |