allow users to pick parking spots with duration and dates
process payment user id or car id for reservation
car id based verification or qr code scanning based entry and exit
An database storing these values for the duration and fast enough for access
monthly/weekly plans allowing user to pay one time for daily reservations on fixed times
No double booking the same spots
ensure uptime
ensure capacity to service users during peak hours,
utilizing token bucket system
GET /lots/{lotId}/availability?startTime=...&endTime=... — tells the user if spots are free with their id using which a simple gui shows the location of spotPOST /reservations — temporarily locks a spot (say for 10 mins while the user pays)PUT /reservations/{id}/confirm — finalizes after payment4 Confirm Exit Get /reservations/carid/end time and confirms it if an inconsistency of more than 30 minutes penalizes.
5 allow manual staff entries for manual offline ticketing. same as user api but does not verify payment keeping it as staff verified
Mobile and web app
api gateway
reservation functions
transaction function
database storing each reservation with car number and time with function to quickly return free spots or verify user, wipes out every transaction older than 7 days
qr generation function generates qr tickets fetching from database
payment provider allowing upi payments credit card debit card offline cash
cash flow calculated as per user payments
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.