If User has stayed more than registered time slot than we can charge them based on 15 minutes or 30 minutes calculator
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
There are multiple APIs
1) User Inquiry for available slot and price based on specific time
2)Book/Hold reservation
3)Pay for Reservation
Now when car comes to our parking lot we have to save in and out and other details of that car
updateGateCarDetails which contains car intime outtime and car details and payment status
Apart from that we can have webhook for payment status updates.
one more API to free the slots wher car has not showed up.
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
HLD starts with User browsing for fetching details it will directly go to our caching layer and while booking we will redirect user requests to postgres Server and payment Requests to payment gateway and from payment gateway based on webhook we will update status in our Database.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
Key component: