Design the Low-Level System for a Car Rental Application (ZoomCar-like)

Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2024-04-05

Problem Statement

Designing the Low-Level Design (LLD) for a self-drive car rental application, similar to ZoomCar. The system should allow customers to search, book, and manage car rentals across different locations while handling vehicle availability, pricing, payments, and trip lifecycle.


Design the LLD for a car rental system like ZoomCar, covering users, cars, bookings, trip management, payments, and vehicle availability with data models, class design, and constraints to ensure consistency and reliability.


🔶 Functional Requirements


1.User Management
•Register, login, and manage user profiles.
•Upload and verify driver’s license & documents.
2.Car Search & Booking
•Search cars by location, time slot, car type, and price.
•View car details (model, seating, fuel type, rating, price).
•Real-time availability check.
•Book a car for a specific time period.
3.Pricing & Payments
•Dynamic pricing based on duration, car type, and demand.
•Payment gateway integration (cards, UPI, wallets).
•Refunds for cancellations.
4.Car Management
•Cars assigned to specific locations/hubs.
•Track car status (Available, Booked, In-use, Maintenance).
•Handle car check-in/check-out.
5.Trip Management
•Start and end a rental trip.
•Track trip duration, extra charges (late return, damage).
•Generate invoices.
6.Optional Extensions
•Loyalty programs & offers.
•GPS tracking of cars.
•Customer ratings & feedback.


🔶 Non-Functional Requirements


•Scalability: Handle thousands of concurrent bookings.
•Reliability: Ensure no double booking of the same car.
•Consistency: Strong consistency for car availability across locations.
•Extensibility: Easy to add new pricing rules or vehicle types.
•Security: Secure handling of user documents and payments.


🔶 Constraints


•Each car can only be assigned to one active booking at a time.
•Overlapping bookings must be strictly prevented.
•Car status transitions must be atomic.


🔶 Example Use Cases


1.A user searches for SUVs in Bangalore for 10 AM – 5 PM, sees available cars, and books one.
2.A customer cancels a booking, and the car status updates back to Available.
3.A trip starts at 9 AM and ends at 2 PM, invoice generated with base price + late fee.
4.A car is marked under Maintenance, so it doesn’t appear in search results.


Solution

Comments