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:
-
Superadmin
- email: emilia@rezero.com
- password: emilia
-
Admin
- email: rem@rezero.com
- password: rem
-
Member
- email: subaru@rezero.com
- password: subaru
Here are the steps to run the project locally.
-
Clone the repository
git clone https://github.com/ccrsxx/rental-car-backend.git
-
Change directory to the project
cd rental-car-backend
-
Install dependencies
npm i
-
Check your credentials on
.env.development
. Make sure you have the correct credentials for your PostgreSQL database. -
Create DB if not exists
npm run db:create
-
Run migrations
npm run db:migrate
-
Run seeders
npm run db:seed
-
Run the app
npm run dev