This application is a backend API made using Java SpringBoot. The application can onboard users and drivers. It has functionality to find drivers for a user, based on certain conditions. Ride fare calculation is also done in the backend.
- Java SpringBoot
- To create the entire backend API
- Postman
- Git
- To maintain different versions of the source code
- Robust Exception Handling is done for all API endpoints
- Prevents creation of users or drivers with the same phone number
- Separation of concerns divides the application into different parts: Controllers, Services, Repository.
- Loose coupling is ensured by using Dependency Injection.
- Clean code is written by using proper variable names and comments wherever necessary. Code reusability is also taken into account. New features can easily be accomodated.
- Almost everything is implemented according to the business requirements provided. The differences present are only there to make the application more durable and scalable.
- For example, phone number is used as a primary key instead of name, because multiple users can have the same name.
add_user(String userName, long userPhoneNumber, long xCoordinate, long yCoordinate)
update_user(long userPhoneNumber, String userNewName, long userNewPhoneNumber)
update_userLocation(long userPhoneNumber, long xCoordinate, long yCoordinate)
add_driver(String driverName, String driverGender, long driverAge, long driverPhoneNumber, String vehicleDetails, long xCoordinate, long yCoordinate, boolean available, long driverEarning)
update_driverLocation(long driverPhoneNumber, long xCoordinate, long yCoordinate)
change_driver_status(long driverPhoneNumber, boolean available)
find_total_earning()
find_ride(long userPhoneNumber, long sourceXCoordinate, long sourceYCoordinate, long destXCoordinate, long destYCoordinate)
choose_ride(long userPhoneNumber, long driverPhoneNumber)
calculateBill(long userPhoneNumber)