https://github.com/gokul1630/ecommerce_backend
Express.js Backend For E-Commerce Applications
https://github.com/gokul1630/ecommerce_backend
api ecommerce express nodejs rest-api
Last synced: 2 months ago
JSON representation
Express.js Backend For E-Commerce Applications
- Host: GitHub
- URL: https://github.com/gokul1630/ecommerce_backend
- Owner: gokul1630
- Created: 2022-07-22T06:35:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-23T10:05:02.000Z (almost 4 years ago)
- Last Synced: 2025-06-05T21:47:54.961Z (about 1 year ago)
- Topics: api, ecommerce, express, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ecommerce Backend
[](https://www.codefactor.io/repository/github/gokul1630/ecommerce_backend)
# Run This Repo Locally
### You need to create a .env file with below contents in root of the project
#### look `.env.sample` for More details
```
JWT_SECRET=
EXPIRES_IN=
MONGO_URL=
```
### use this commands to generate `secret key`
```
node
require('crypto').randomBytes(64).toString('hex')
```
## Then run below commands to start the server
```
npm install && npm start
```
# Features
- Products listing
- Fetch Products by Categories
- Cart Functionality
- Used jsonwebtoken for Authentication
- Separate Login/SignUp for Users and Owners
- Password is Encrypted with Bcrypt
- more features on the way...
# Documentation for Available Routes
- [User](https://github.com/gokul1630/backend_ecommerce/blob/main/docs/user.md)
- [Owner](https://github.com/gokul1630/backend_ecommerce/blob/main/docs/owner.md)
- [Products](https://github.com/gokul1630/backend_ecommerce/blob/main/docs/products.md)
- [Category](https://github.com/gokul1630/backend_ecommerce/blob/main/docs/category.md)
- [Cart](https://github.com/gokul1630/backend_ecommerce/blob/main/docs/cart.md)
# Packages Used
- express (main framework for this backend)
- bcrypt (to encrypt & decrypt the password)
- jsonwebtoken (to protect routes from unauthorised access)
- mongoose (ODM for connecting the MongoDB with this backend)
- cors (to resolve cross orgin resource issues)
- dotenv (to load env files)
# Todo
- rate limiter
- pagination
- passport authentication
- rebase whole code to oops pattern with Typescript
- improve code quality