System requirements


Functional:

  1. User Functions:
    • Reserve Parking Spot: Users can book parking spots in advance.
    • Check Availability: Users can check real-time availability of parking spots based on specific times and vehicle types.
    • Make Payment: Users can process payments to secure their reservations.
    • Check In/Out: Users can check in upon arrival and check out when leaving.
    • Cancel Reservations: Users should have the option to cancel their reservation if needed.
  2. Admin Functions:
    • Manage Parking Lots: Admins can add, update, or remove parking lots and their details.
    • View Usage Metrics: Admins can view statistics about usage, revenue, and occupancy rates.
    • Handle Exceptions: Admins can manage any issues like double bookings or payment failures.
  3. Notification System:
    • Users receive notifications for reservation confirmations, reminders, and payment status.
  4. Reports:
    • Generate reports on revenue, usage patterns, and peak usage times.


Non-Functional:

  1. Scalability: The system should be designed to handle a growing number of users and transactions as more parking lots are added. For example, if the number of parking lots doubles, the system should maintain performance without downtime.
  2. Availability: The system should ensure high availability, meaning users can access it at any time without interruptions. Aim for an uptime of 99.9% or better.
  3. Performance:
    • The response time for checking availability should be under a few seconds to enhance user experience.
    • Payment processing should also be efficient, ideally taking less than a minute.
  4. Security: User data, especially payment information, must be securely handled. Implement encryption, secure payment gateways, and regular security audits.
  5. Data Integrity: Ensure that the data remains consistent and accurate. For instance, avoid double bookings and maintain accurate records of reservations.
  6. Usability: The system should have an intuitive user interface that makes it easy for users to reserve, pay, and manage their parking spots.
  7. Maintainability: The codebase should be modular and easy to maintain or update as new features are added or requirements change.
  8. Disaster Recovery: Implement backup and recovery processes to restore the system quickly in case of failure.





Capacity estimation

Estimate the scale of the system you are going to design...






API design

Define what APIs are expected from the system...






Database design

Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...






High-level design

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...






Request flows

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...






Detailed component design

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...






Trade offs/Tech choices

Explain any trade offs you have made and why you made certain tech choices...






Failure scenarios/bottlenecks

Try to discuss as many failure scenarios/bottlenecks as possible.






Future improvements

What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?