Requirements


Functional Requirements:


  • Allow reservation of a parking spot.
  • Process payment for the reservation.
  • Enable parking of a car in the reserved spot.
  • Support early departure before reservation time expires.
  • Gate check-in/out.
  • Handle no show.



Non-Functional Requirements:


    List the key non-functional requirements (eg low latency, scalability, reliability, etc.)...


API Design



High-Level Design

  • FrontEnd
    • authentication: register/SignIn/SignOut
    • payments: Topup
    • actionable: ReserveSpot
  • Cameras
    • startCount
    • endCount
  • BackEnd
    • topUp
      • tops up the account balance
        • there should be some predefined flow like applePay, etc.
    • reserve
      • creates new reservation, returns reservation_id(not much needed though)
    • startTimer
      • triggered on entering the parking
      • assumes the planet numbers are read from the camera
    • endTimer
      • reads from Reservations starttime
      • modifies the credit
  • Database
    • User
      • uid
      • plate_number
      • ...
      • credits($)
    • Reservations
      • timestamp
      • reservation_id
      • user_id
      • start_time
      • end_time


Detailed Component Design

Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.