A Java-based ride-sharing application featuring a bidding system where customers request rides by setting their preferred fare, and drivers can place competitive bids.
This application uses a client-server architecture to create a ride-sharing platform where:
- Customers can request rides and set their desired fare
- Available drivers can view ride requests and offer their own fare
- Customers can select from driver bids
- Both parties can track ride status through completion
- Account registration and login
- Create ride requests with pickup/dropoff locations and suggested fare
- View incoming bids from drivers
- Accept preferred driver bid
- Track current ride status
- Account registration and login
- View available ride requests
- Make fare offers for rides
- Track assigned rides
- Update ride status (started, completed)
The application uses:
- Socket-based communication: Server handles multiple clients concurrently
- Multi-threaded design: Each client connection runs in a separate thread
- In-memory data storage: User accounts and rides managed through ConcurrentHashMaps
- Java JDK 8 or higher
- Maven
- Clone the repository:
git clone https://github.com/HanaATawfik/Uber-like-Application.git
- Navigate to the project directory:
cd Uber-like-Application
- Build with Maven:
mvn clean install
- Start the server:
java GreetingServer <port_number>
- Start client application(s):
java GreetingClient <server_host> <server_port>
- Ride Request: Customer creates a request including pickup/dropoff locations and suggested fare
- Driver Bidding: Available drivers view pending requests and can offer their own fare
- Bid Selection: Customer views all bids and selects their preferred driver
- Match Confirmation: When a bid is accepted, the ride status changes to "matched"
- Ride Progress: Driver updates ride status to "started" when picking up customer
- Completion: Driver marks ride as "completed" when reaching the destination
- GreetingServer: Main server class handling client connections
- Customer: Stores customer account information
- Driver: Manages driver data including availability status
- Ride: Tracks ride details, status, and associated bids
- Bid: Stores information about driver offers
- GreetingClient: Handles user interface and communication with the server
- User registers/logs in through client application
- Requests and responses are exchanged through socket connections
- Server maintains user session data and processes requests
- All changes to ride status are broadcast to relevant parties
This project is a functional demonstration of a ride-sharing application with bidding capabilities. Future enhancements may include:
- Persistent data storage with a database
- Map integration for route planning
- Rating system for drivers and passengers
- Payment processing integration
- Mobile application interface