This is an Online cab booking application called Safar, which provides REST API services for booking cabs and managing users with two roles: admin and user, through interactive API services.
- User Module
- Cab Managment Module
- Driver Managment Module
- Booking Managment Module
- Wallet Managment Module
- HTML
- JavaScript
- CSS
- Spring Boot
- Maven
- Spring Data Jpa
- Hibernate
- Spring Security
- Mysql
- Lombok
- Swagger
Gihub Link-> https://github.com/akt0001c/Safar.git
Netlify Link-> https://loquacious-kheer-25b7f3.netlify.app/
- Features
- Prerequisites
- Getting Started
- Usage
- API Endpoints
- Database Configuration
- Testing
- Contributing
- Contributors
- User registration and authentication.
- Booking cabs for rides.
- Driver registration and management.
- Wallet system for managing payments.
- Viewing ride history.
- Admin functionality for managing drivers and ride history.
Before you begin, ensure you have met the following requirements:
- HTML, JavaScript, CSS knowledge.
- Spring Boot, Maven, Spring Data JPA, Hibernate, Spring Security, and MySQL.
- Lombok and Swagger for API documentation.
To get started, follow these steps:
- Clone the project:
https://github.com/akt0001c/Safar.git
- Configure the database in
application.properties
. - Build and run the application.
- Visit the API documentation at
http://localhost:8888/swagger-ui/
to explore available endpoints. - Use the provided API endpoints for user registration, cab booking, driver management, and more.
POST /users
: Register a new user.POST /users/saveCabBooking
: Book a cab.GET /users/{email}
: Retrieve user details by email.GET /users
: Retrieve a list of all users.PATCH /users/{email}
: Update user details by email.DELETE /users/{email}
: Delete a user by email.GET /users/role/{role}
: Retrieve users by role.GET /users/hello
: Test endpoint for Spring Security.
POST /cabBooking
: Book a cab.PATCH /cabBooking/{cabBookingId}
: Update a cab booking.GET /cabBooking/cancel/{cabBookingId}
: Cancel a cab booking.GET /cabBooking/history
: View booking history for a user.GET /cabBooking/completeTrip/{cabBookingId}
: Complete a cab trip.GET /ADMIN/cabBooking/history
: View booking history for all cab bookings.
POST /ADMIN/driver
: Insert a new driver.GET /ADMIN/drivers
: Retrieve a list of all drivers.PATCH /ADMIN/driver/{email}
: Update driver details by email.PATCH /ADMIN/driver/{email}/{name}
: Update driver's name by email.DELETE /ADMIN/driver/{driverEmail}
: Delete a driver by email.GET /ADMIN/driver/bestdrivers
: Retrieve a list of the best drivers.GET /ADMIN/driver/{driverEmail}
: Retrieve driver details by email.
POST /WALLET/addMoney
: Add money to a user's wallet.PATCH /WALLET/changeStatus
: Change the status of a wallet.POST /WALLET/createWallet/{email}
: Create a wallet for a user.GET /WALLET/getWallet
: Retrieve a user's wallet.GET /WALLET/WalletDetails
: Retrieve the wallet details of the logged-in user.
Configure your database settings in application.properties
:
server.port=8888
# Database specific properties
spring.datasource.url=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=
spring.datasource.password=
# ORM software specific properties
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
- mvn test
- mvc test for controllers
- Ankit Choubry
- Aman Kumar
- Susheel Kumar
- Dhanushpriyan
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push the changes to your fork.
- Create a pull request explaining your changes.
For any questions or suggestions, feel free to contact us at [email protected] or [email protected] .