https://github.com/rajuniranjan/ecommerce_express_backend
https://github.com/rajuniranjan/ecommerce_express_backend
bcryptjs cors expressjs jwt-authentication mongodb nodejs nodemon
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rajuniranjan/ecommerce_express_backend
- Owner: RajuNiranjan
- License: mit
- Created: 2023-10-11T19:18:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T13:56:41.000Z (over 1 year ago)
- Last Synced: 2026-01-03T16:32:10.444Z (6 months ago)
- Topics: bcryptjs, cors, expressjs, jwt-authentication, mongodb, nodejs, nodemon
- Language: JavaScript
- Homepage: https://trendsetdb.vercel.app
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TREND_SET eCOMMERCE WEB APPLICATION
### URL
### [Live Demo](https://trendsetnext.vercel.app/)
### [Front End source code](https://github.com/RajuNiranjan/ecommerce_next_frontend)
## Table of Contents
- [Features](#features)
- [Technologies](#technologies)
- [API Endpoints](#api-endpoints)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Enveronmental Variables](#enveronmental-variables)
## Features
- User authentication (login/register)
- User profile management
- Address management
- Seller functionality
- Product management
## Technologies
- Node.js
- Express.js
- MongoDB
- JWT for authentication
- Bcrypt.js for password hashing
## API Endpoints
The API is structured as follows:
- **Root:** `/api`
- **Authentication:**
- `POST /auth/register` - Register a new user
- `POST /auth/login` - Login a user
- **User:**
- `GET /user` - Get user information
- `PATCH /user/:id` - Update user profile
- `GET /user/userInfo` - Get detailed user information
- **Cart:**
- `POST /cart` - Add a product to the cart
- `GET /cart/:userId` - Get products in the cart for a specific user
- `DELETE /cart/:userId/remove/:productId` - Remove a product from the cart
- **Wishlist:**
- `POST /wishlist` - Add a product to the wishlist
- `GET /wishlist/:userId` - Get wishlist items for a specific user
- `DELETE /wishlist/:userId/remove/:productId` - Remove a product from the wishlist
- **Address:**
- `POST /address` - Create a new address
- `GET /address` - Get user addresses
- `PATCH /address/:id` - Update a user address
- `DELETE /address/:id` - Delete a user address
- **Seller:**
- `POST /seller` - Become a seller
- `GET /seller` - Get seller information
- `GET /seller/:id` - Get seller information by ID
- `PATCH /seller/:id` - Update seller information
- `DELETE /seller/:id` - Delete seller account
- **Product:**
- `POST /product` - Create a new product
- `GET /product` - Get all products
- `GET /product/:id` - Get products by store ID
- `GET /product/category/:category` - Get products by category
- `GET /product/single_product/:id` - Get product details by ID
- `PATCH /product/:id` - Edit product details
- `DELETE /product/:id` - Delete a product
## Getting Started
## Installation
- clone the repository:
```
git clone https://github.com/RajuNiranjan/eCommerce_Express_backend
```
```
cd eCommerce_Express_backend
```
- To Install the Dependencies
```
npm install
```
- To Start The project
```
npm run dev
```
## Enveronmental Variables
- DB_URI = your mongodb uri
- JWT_SECRET_KEY = your_secret_key
- PORT = your_port_number
- ORIGIN = your_frontend_port