fdolzanes1 / nest-api-rental

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Car Rental

Badge em Desenvolvimento

Description

The car rental system is a web application developed in Node.js, using the Nest.js framework and the Prisma ORM to connect to a PostgreSQL database.

Entity Relationship Model

Stack

  • Node.js
  • Nest.js
  • Prisma
  • Postgres
  • JWT
  • RBAC
  • Passport
  • Swagger
  • TDD
  • Deploy

Installation

# install dependencies
$ npm install

Running the database

# docker
$ docker-compose up -d

Running the app

# migrating your database
$ npm run prisma:migrate

# seeding your database
$ npm run prisma:seed

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Running Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Endpoints

The API exposes the following endpoints from the base URL localhost:3000/api:

/car

  • GET /car
  • GET /car/:id
  • GET /car/:id/specifications
  • POST /car
  • PUT /car/:id
  • DELETE /car/:id

/categories

  • GET /categories
  • GET /categories/:id
  • POST /categories
  • PUT /categories/:id
  • DELETE /categories/:id

/specifications

  • GET /specifications
  • GET /specifications/:id
  • POST /specifications
  • PUT /specifications/:id
  • DELETE /specifications/:id

/users

  • GET /users
  • GET /users/:id
  • PUT /users/:id
  • DELETE /users/:id

/auth

  • POST /register
  • POST /login
  • POST /forget
  • POST /reset
  • POST /verify
  • POST /verify-guard

/rentals

  • Under development

Software Developer

Fabiano Dolzanes

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About


Languages

Language:TypeScript 99.0%Language:JavaScript 1.0%