Estimate the scale of the system you are going to design...
1 garage has 10 floors, 100 parking per floor
Total 1000 parking per garage
10,000 Garages worldwide
total parking 10 Million
10 M users daily park once
Define what APIs are expected from the system...
External APIs
GET /garage/loc={}lat&long -> returns closest garages
GET /garage/:garageId -> [parking space availaible per vehicle type]
POST /garage/:garageID/vehicleType&time={start&end} -> reservationId
POST /reservation/book/:reservationId -> Book
PUT /reservation/book/:reservationId/extendTime -> Rebook to extend
Garage Table
garageId PK
location
floors
spaces compact
spaces regular
..
Rate Table
garageId, vehicle Type, day, time -PK
rate per hour
booking table
reservationID PK
userId
date
time
vehicleType
spotTypeInventory
garageId
spotType
date
totalInventory
TotalReserved
spot
garageId
spotTypeId
floor
user table
userId
address
location
payment
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?