An open API service indexing awesome lists of open source software.

https://github.com/abogadatos/elitegoods-ecommerce

Free-to-use API providing essential backend functionality for an e-commerce application, built with NestJS, TypeScript, PostgreSQL as part of the SoyHenry Bootcamp.
https://github.com/abogadatos/elitegoods-ecommerce

api-rest backend database nestjs postgresql swagger typescript

Last synced: about 2 months ago
JSON representation

Free-to-use API providing essential backend functionality for an e-commerce application, built with NestJS, TypeScript, PostgreSQL as part of the SoyHenry Bootcamp.

Awesome Lists containing this project

README

          


Nest Logo

๐ŸŒŸ Welcome to EliteGoods API ๐ŸŒŸ


A modern, secure, and scalable NestJS-based e-commerce API designed to deliver high performance and ease of use for managing product and user data.

## ๐Ÿš€ Overview

This project is a **NestJS**-powered backend API for **EliteGoods**, a scalable and secure e-commerce platform with features like user authentication, product management, and order processing. The API includes detailed **Swagger** documentation, making it easy for developers to explore and integrate with the endpoints.

## โœจ Key Features

- **RESTful API** with NestJS
- **User Authentication & Authorization** (JWT-based)
- **Product & Category Management**
- **Order Management**
- **Comprehensive Swagger Documentation** ๐Ÿ“œ

## ๐Ÿ›  Prerequisites

- **Node.js** and **npm**
- **PostgreSQL** for database
- **Thunder Client / Postman** (recommended for API testing)

## ๐Ÿ— Installation

To get started with the project, follow these steps:

1. Clone the repository:
```bash
git clone https://github.com/nechodev/EliteGoods-Ecommerce
```
2. Navigate to the project directory:
```bash
cd EliteGoods-Ecommerce
```
3. Install the required dependencies:
```bash
npm install
```

# ๐ŸŒ Environment Setup

## ๐ŸŒฑ Environment Variables

Before running the application, create a `.env` file in the root directory and populate it with the following variables:

| Variable | Description | Example Value |
| ----------------------- | ----------------------------------------------------- | ----------------------- |
| `DB_HOST` | Database host address. | `localhost` |
| `DB_PORT` | Database connection port. | `5432` |
| `DB_USERNAME` | Database username. | `postgres` |
| `DB_PASSWORD` | Database password. | `your_password_here` |
| `DB_NAME` | Name of the database to connect to. | `your_database_name` |
| `CLOUDINARY_CLOUD_NAME` | Cloudinary cloud name for image storage. | `your_cloud_name` |
| `CLOUDINARY_API_KEY` | Cloudinary API key for accessing Cloudinary services. | `your_api_key` |
| `CLOUDINARY_API_SECRET` | Cloudinary API secret for authentication. | `your_api_secret` |
| `JWT_SECRET` | Secret key for signing JWT tokens. | `your_jwt_secret` |
| `JWT_EXPIRES_IN` | Duration for which the JWT token is valid. | `1h` |
| `AUTH0_SECRET` | Secret used for Auth0 integration. | `your_auth0_secret` |
| `AUTH0_AUDIENCE` | Audience for Auth0 token verification. | `http://localhost:3000` |
| `AUTH0_CLIENT_ID` | Client ID for your Auth0 application. | `your_auth0_client_id` |
| `AUTH0_BASE_URL` | Base URL for your Auth0 application. | `http://localhost:3000` |

> **Note:** Make sure to replace placeholder values with your actual configuration values.

## ๐Ÿ”ฅ Running the App

To start the application:

```
# development
$ npm run start

# watch mode
$ npm run start:dev

# production
$ npm run start:prod

```

## ๐Ÿงช Testing

The application includes tests to ensure reliability and performance.

```
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## ๐Ÿ“š API Documentation

Navigate to http://localhost:3000/docs for the full API documentation.

## ๐Ÿ”‘ Usage

Sign Up / Log In to generate your authentication token.
Authenticate by including Authorization: Bearer in the header of your requests.

## ๐Ÿ’– Support

Contributions are welcome! This project is licensed under the MIT License.

## ๐ŸŒŸ Stay Connected

NestJS Official Website
Twitter - @nestframework

## ๐Ÿ“ License

This project is MIT licensed.