List functional requirements for the system (Ask the chat bot for hints if stuck.)...
List non-functional requirements for the system...
Define what APIs are expected from the system...
Public Endpoints
POST Request - User provides paking_space_id and reservation_id is serializable which gets generated after a third party service (Stripe) validates user has paid through a token.
Request:
{
"reservation_id":"124916",
"parking_space_id": "12",
"parking_lot_id" : "2",
"name" : "Stephen"
}
Response:
{
"receipt_id": "1206",
"expiration_time": "2024-10-01 14:00:00"
}
DELETE Request - User provides reservation_id so that they may cancel their current parking space reservation
Request:
{
"reservation_id": "124916"
}
Response:
204 HTTP Status code
Internal Endpoints
GET Request - Used to calculate how many free spaces we might have available in a parking lot to display on our web app or outside the garage. Calculation can be done through a series of SQL transformations like COUNT on a specified parking lot and doing a query on status of each spot.
Request:
{
"parking_lot_id":"2"
}
Response:
{
"available_spaces": "13"
}
Gate Checking Service API Requests
UPDATE Request - Used to detail when car has arrived to its reserved parking space and update existing record. Service exists to address no show appointments and free up potential spaces.
Request:
{
"reservation_id": "124916",
"time_arrived": "2024-10-01 12:00:00"
}
Response:
204 HTTP Response
UPDATE Request - Used to detail and update existing record on when car left
Request:
{
"reservation_id": "124916",
"time_left": "2024-10-01 13:00:00"
}
Response:
204 HTTP Response
(Handled by third party - Stripe, Token generated upon completion of payment to proceed with reservation)
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...
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...
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...
Tables:
Parking_Lot_Tbl
Schema
parking_space_id (int: Primary Key - Unique)
parking_lot_id (int)
reservation_id(int)
space_type: (varchar)
address: (varchar)
city: (varchar)
country: (varchar)
time_arrived: (datetime)
time_left: (datetime)
available: (boolean)
Transaction_Tbl
Schema
reservation_id(int: Primary Key - Unique)
receipt_id (int)
name: (varchar)
parking_space_id: (int)
space_type: (varchar)
date: (datetime)