Princing:
Parking space types:
What the User can do:
Infrastructure:
How the system works:
b. Get ticket online
Similar to hourly with the difference that the customer needs to pay in advance the estimated time they want to park for
This system should cover about 400 parking spots which could easily end up in thousands or tens of thousands of operations per day
Endpoints:
Ticket:
User:
PaymentMethod:
Prices:
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...
mobile client:
remove server:
src/
api/
client/
ticket/
createTicket
payTicket - dedicated endpoint for payment
validateTicket
user/
upsertUser
upsertPaymentMethod
auth/
loginUser
logoutUser
proxies/
payment_providers/
provider_proxy/
services/
payment_providers/
syncFromProviderService - syncs data related to payment transactions
ticket/
markOverstayTicketsService -> called from a job
validateTicketService
calculateTicketAmountService
upsertService
user/
upsertService
paymentMethod/
upsertService
deleteService
models/
ticket
user
vehicle
paymentMethod
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...
Regular operation - pay as you go:
--- creating ticket ---
--- paying ticket ---
--- at gate ---
CalculateTicketAmountService
Opted for a design that does not necessarily link tickets to users to maximize profit by allowing non signed in users to pay for tickets at the facility
At the same time, there can be a one to many relationship between User and Ticket for users how create an account and use the mobile app to transact
One major failure scenario that can arise, is when there is no communication with the server is blocked; in this scenario, a more advanced on premise server that constantly syncs to the payment provider and database can be implemented
Implement ability to work offline, maybe by requiring a CC when getting the ticket at the gate; this way, the customer can still scan the ticket and a log of the exit time is kept which will later be synced with the backend