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

https://github.com/samuel-ricardo/product-manager_api

NestJS API to manage products
https://github.com/samuel-ricardo/product-manager_api

Last synced: 3 months ago
JSON representation

NestJS API to manage products

Awesome Lists containing this project

README

        

# Product Manager





🚀 🟥 Discovery 🟥 🚀


Application developed with the purpose of studying the NestJS Ecosystem

#


|  
Overview   |   
Technologies   |   
Project   |  
Routes   |   
Run   |  
Author   |   

#


| :artificial_satellite: About:


This API is a tradicional CRUD that make the essentials operations like Create, Update and Delete Products that have relation with Category in MySQL database integrates using Prisma, all that using middlewares, Clean Architeture, Data Validations and more.



:building_construction: | Technologies and Concepts Studied:

>

- NestJS
- Prisma
- MySQL
- Typescript
- JS
- Test
- Jest
- Docker
- eslint
- prettier
- husky
- class-validator
- class-tranformer
- lint-sataged

> Among Others...


#


💻 | Application:

> API Example:

```bash
$ product_manager > api.http

### Category ###

###

GET http://localhost:3000/category

###

GET http://localhost:3000/category/1

###

POST http://localhost:3000/category
Content-Type: application/json

{
"name": "Category 1i2"
}

###

PATCH http://localhost:3000/category/1
Content-Type: application/json

{
"name": "Category 1 Updated"
}

###

DELETE http://localhost:3000/category/1

###

### Products ###

###

GET http://localhost:3000/products

###

GET http://localhost:3000/products/1

###

POST http://localhost:3000/products
Content-Type: application/json

{
"name" : "Product 1",
"price" : 100,
"categoryId": 1
}

###

PATCH http://localhost:3000/products/1
Content-Type: application/json

{
"name" : "Product 1 Updated",
"price" : 50
}

###

DELETE http://localhost:3000/products/1

###

```
#



👨‍💻 | How to use


### Open your Git Terminal and clone this repository

```git
$ git clone "[email protected]:Samuel-Ricardo/product-manager_API.git"
```

### Make Pull

```git
$ git pull "[email protected]:Samuel-Ricardo/product-manager_API.git"
```


This application use `Docker` so you dont need to install and cofigurate anything other than docker on your machine.

>


Navigate to project folder ` $ cd ./product_manager/ ` and run it using ` docker-compose `

```bash

# After setup docker environment just run this commmand on root project folder:

$ docker-compose up --build # For First Time run this command

$ docker-compose up # to run project

```

```bash

#Apps Running on:

$ API: http://localhost:3000
$ MySQL: http://localhost:3306

See more: ./product_manager/docker-compose.yaml

```


#


#


:octocat: | Author:

>

- Samuel Ricardo