Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarkartanmay393/demo-ecommerce
Contains Express REST API of E-Commerce system
https://github.com/sarkartanmay393/demo-ecommerce
expressjs nodejs postgres sequelize-orm swagger-ui
Last synced: 19 days ago
JSON representation
Contains Express REST API of E-Commerce system
- Host: GitHub
- URL: https://github.com/sarkartanmay393/demo-ecommerce
- Owner: sarkartanmay393
- Created: 2024-02-23T19:24:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-24T19:57:36.000Z (11 months ago)
- Last Synced: 2025-01-01T04:47:43.496Z (22 days ago)
- Topics: expressjs, nodejs, postgres, sequelize-orm, swagger-ui
- Language: TypeScript
- Homepage: https://dub.sh/api-docs-1
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js E-commerce API
This project is a RESTful API for e-commerce operations, designed to support product and category listing, cart management, and order processing. Built with Node.js and Express, it utilizes PostgreSQL for data persistence and JWT for user authentication.
## Demo
- API: http://ec2-65-1-148-245.ap-south-1.compute.amazonaws.com:8080/
- Docs: http://ec2-65-1-148-245.ap-south-1.compute.amazonaws.com:8080/docs/## Features
- **User Authentication**: Register and log in users, issuing JWT for subsequent requests.
- **Category & Product Listing**: Browse categories and view products by category.
- **Product Details**: Access detailed information about products.
- **Cart Management**: Users can add products to their cart, update item quantities, and remove items.
- **Order Processing**: Place orders and view past order history and details.## Getting Started
### Prerequisites
- Node.js
- PostgreSQL### Installation
1. Clone the repository:
```
git clone https://github.com/sarkartanmay393/ECommerce-Backend.git
```2. Install NPM packages:
```
cd ECommerce-Backend
npm install
```3. Set up your PostgreSQL database and note your credentials.
```
npm run migration-up
```4. Create a `.env` file in the root directory and add your database configuration and JWT secret key:
```
JWT_SECRET=
```5. Run the database migrations (make sure to create your migration files as per your ORM documentation).
6. Start the dev server:
```
npm run dev
```## Usage
Refer to the Swagger documentation for detailed endpoint information. By default, the Swagger UI is accessible at `http://localhost:3000/docs`.
## Built With
- [Node.js](https://nodejs.org/) - The runtime environment
- [Express](https://expressjs.com/) - The web framework
- [PostgreSQL](https://www.postgresql.org/) - The database
- [Sequelize](https://sequelize.org/) - The ORM used
- [JWT](https://jwt.io/) - Used for user authentication## Authors
- **Tanmay Sarkar** - _Initial work_ - [sarkartanmay393](https://twitter.com/sarkartanmay393)