- Clone the repository:
git clone https://github.com/ChaitanyGhadigaonkar/full-stack-assignment
- Navigate to the project directory:
cd full-stack-assignment
- Install dependencies:
cd Frontend && yarn
cd Backend && yarn
Please check the database.sql for the database setup and for admin we have to update the user to admin manually using sql query.
This project requires the following environment variables: look for the .env.example for backend
PORT
PG_PASSWORD
JWT_SECRET
CLOUDINARY_CLOUD_NAME
CLOUDINARY_API_KEY
CLOUDINARY_API_SECRET
Describes the backend routes for the full-stack-assignment project.
POST /api/users/register
: Register a new user.POST /api/users/login
: Log in an existing user.GET /api/users/logout
: Log OutPOST /api/users/forgot-password
: Forgot passwordPOST /api/users/reset-password
: Reset password
GET /api/cabs
: Get all cabsGET /api/cabs/:id
: Get cab with id
-
GET /api/bookings
: Get all bookings of logged in user -
POST /api/bookings
: Create a new booking -
GET /api/bookings/:id
: Get booking with id -
PUT /api/bookings/:id
: Update booking with id -
DELETE /api/bookings/:id
: Delete booking with id
-
GET /api/admin/bookings
: Get all bookings of all users -
POST /api/admin/bookings
: Create booking -
PUT /api/admin/bookings/:id
: Update booking like status, source and destination -
DELETE /api/admin/bookings/id
: Delete Booking -
GET /api/admin/users
: Get all users -
POST /api/admin/users
: Create new user -
PUT /api/admin/users/:id
: Update users role -
DELETE /api/admin/users/id
: Delete users -
POST /api/admin/cabs
: Create new cab -
PUT /api/admin/cabs/:id
: Update cab details -
DELETE /api/admin/cabs/id
: Delete cab