- Exotic Cab Service Pvt.Ltd-
Introducing a cutting-edge project that I have recently developed - a RESTful API web service for an online cab booking platform. This project is designed to perform all the fundamental CRUD operations, along with user validation at every step. Whether you are a customer, driver, or administrator, this application has something for everyone.
Customers can register themselves with the application, and log in to get a valid session token. They can view the list of available cabs and book a trip, and only logged-in users can access their trip history, profile updates, and other features.
Drivers can log in to the application and update their information using their username and password. They can add and update their cab details and mark their availability according to the trip status. The driver can also end the trip, and the application generates a bill for the trip.
Admins have the administrator role of the entire application and can only be registered admins with a valid session token. They can add, update, and delete drivers or customers from the main database and access the details of different customers, drivers, and trip bookings.
- Authentication and validation for customers, drivers, and administrators is implemented through the use of session UUIDs.
Administrator
- The ability to act as the primary overseer of the entire application
- The capability to add, update, and delete drivers or customers from the main database
- Access to details pertaining to customers, drivers, and trip bookings
Customer
- The ability to register with the application and log in to receive a valid session token
- The capability to view a list of available cabs and book a trip
- The ability to access trip history, update profile information, and utilize other features, but only for logged-in users.
Driver
- The ability to log in to the application and update personal information using a username and password
- The capability to add and update cab details
- The ability to mark availability status according to the status of trips
- The ability to end a trip and have the application generate a bill for the completed trip.
- Spring Boot
- Spring Framework
- Spring Data JPA
- MySQL
- Hibernate
- Java
- Swagger UI
- Postman
- Login Module
- Admin Module
- Customer Module
- Driver Management Module
- Cab Management Module
- Booking Management Module
- Before running the API server, you have to update the database configuration inside the application.properties file
- Update the port number, username and password as per your local database configuration
server.port=8888
spring.datasource.url=jdbc:mysql://localhost:3306/cabdb;
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=root
https://localhost:8888/
http://localhost:8888/swagger-ui.html
POST /login
: Admin can login with username and password provided at the time of registationPOST /insert/{key}
: Register a new admin with proper data validation and admin sessionPUT /update/{key}
: Updates admin detailsDELETE /delete/{id}
: Deletes the admin with passed idGET /trips/{key}
: Get list of trips of all the tripsGET /tripsByCab/{type}
: Get list of trips by cab typesGET /tripsByDate/{date}
: Get list of trips by dateGET /tripsByCustomer/{id}
: Get list of all the customers trips by customer idGET /tripsByCustomer/{id}/{date}
: Get list of all trips for the day by id and date
POST /save
: Adding new customerPUT /update
: Updates customer detailsDELETE /delete/{id}
: Deletes logged in user on the basis of idGET /customer/{id}
: Getting customer on the basis of idPOST /validateCustome
: Checks valid coustomer
POST /driver
: Register a new driver with proper data validation and admin sessionPUT /driver
: Updates the driver detailsDELETE /driver/{driverId}
: Deletes driver on the basis of idGET /drivers
: Gets the best driver whose rating is over 4.5GET /driver/{id}
: Get driver details by idGET /listOfDrivers/{id}
: Gets list of all the drivers
POST /cab
: Register a new cabPUT /cab
: Updates the cab detailsDELETE /cab/{cId}
: Delete cab on the basis of cab idGET /cabs/{carType}
: Gets the list of cabs on the basis of cab typeGET /countofcabs/{carType}
: Gets the total number of cabs on the basis of cab type