Skip to content

ccrsxx/rental-car-backend

Repository files navigation

Simple CRUD application for rental cars

All the documentation for the API can be found on Swagger.

The API is deployed on https://api-rental-car.risalamin.com or backup server at https://dev.risalamin.com, you can hit the endpoints directly from there.

Here's the ERD for the database:

List of available users

  1. Superadmin

  2. Admin

  3. Member

Development

Here are the steps to run the project locally.

  1. Clone the repository

    git clone https://github.com/ccrsxx/rental-car-backend.git
  2. Change directory to the project

    cd rental-car-backend
  3. Install dependencies

    npm i
  4. Check your credentials on .env.development. Make sure you have the correct credentials for your PostgreSQL database.

  5. Create DB if not exists

    npm run db:create
  6. Run migrations

    npm run db:migrate
  7. Run seeders

    npm run db:seed
  8. Run the app

    npm run dev