Skip to content

Car rental api developed during the Ignite bootcamp from Rocketseat

License

Notifications You must be signed in to change notification settings

cunhaedu/rentx-api

Repository files navigation

logo

Rentx

Car rental API developed during Ignite bootcamp from Rocketseat.

📌 Content Table

🚀 Features

  • Car specifications CRUD
  • Car categories CRUD
  • Car CRUD
  • Car rental
  • Users CRUD

📖 Api Documentation

Once you got this application running on your machine you can go to localhost:3000/api_docs to see the full api documentation built with swagger

📕 Application Requirements

Check out the REQUIREMENTS page to see the full application requirements such as Business Rules and function and non-function requirements

📋 Database model

model

🚦 API Status Codes

Check the following status codes in this API:

Status Code Description
200 OK
201 CREATED
400 BAD REQUEST
422 UNPROCESSABLE ENTITY
404 NOT FOUND
500 INTERNAL SERVER ERROR

👷 First steps

To clone this project via HTTPS, you can run the following command:

git clone https://github.com/cunhaedu/rentx-api.git

Create your environment variables based on the examples of .env.example

cp .env.example .env

🏃 Getting Started without Docker

Install dependencies

yarn install

Or

npm install

Setup a database

Install Postgres to create a database, then you should modify the .env with your credentials

Run the transactions in order to configure the database schema:

yarn typeorm migration:run

Run the following command in order to start the application in a development environment:

yarn dev:server

Once you have following all these previous commands your application will be available in localhost on Port 3000

🏃 Getting Started with Docker

To run this application with Docker you need to have Docker and docker-compose installed in your machine. Furthermore, you also need an account in Docker Hub in order to run docker commands

Once you have docker configured in your machine run the following commands:

docker build -t rentx .
docker-compose up

🏃 Build

Run the following command in order to convert the .ts file to .js file in a folder called dist:

yarn build

Run the following command in order to start the application in a production environment:

yarn start

🚀 Technologies

This project use the following technologies:

📕 License

This project is under MIT License.See the LICENSE file for more details.

About

Car rental api developed during the Ignite bootcamp from Rocketseat

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages