Tickets Reservation System Kata
Your startup company is creating big online tickets reservation system for many events (concerts, sports). Your role is to design subsystem responsible for online reservation.
You know that there will be interactive map for each event, and users will be able to reserve and buy tickets by selecting places on the map and then providing their personal details.
You must create subsystem responsible for online tickets reservation.
{
"event": {
"id": "dasasds-12387213-asdasd",
"salesStartDate": "1231232132132",
"salesEndDate": "1231232132132"
},
"categories":[
{
"code":"ST",
"name":"STANDARD",
"price":{
"value":144.99,
"currency":"USD"
}
},
{
"code":"GD",
"name":"GOLDEN",
"price":{
"value":399.99,
"currency":"USD"
},
"restriction": {
"maximumTicketsPerReservation": 3
}
}
],
"tickets":[
{
"sector":"A",
"rows":10,
"seatsInRow":12,
"categoryCode":"ST"
},
{
"sector":"B",
"rows":10,
"seatsInRow":12,
"categoryCode":"ST"
},
{
"sector":"C",
"rows":10,
"seatsInRow":12,
"categoryCode":"GD"
}
]
}
Create endpoint for fetching info about all tickets for event. There should be distinction for free tickets and occupied tickets. Additionaly ticket should have info about price, category, section, row and seat. This info will be used on UI interactive map.
Create endpoint for ticket reservation creation. Reservation took place when user go into reservation mode. If user has no reservation, then reservation is created and be valid for 10 minutes. If user already has reservation, then we should inform user about it.
{
"userId":"asd2sa21fbhf234t5",
"eventId":"1234sdfjher3adt"
}
{
"ticketId": "1231233-12323-132213",
"dateTime": "12312341142",
"person": {
"firstName": "Adam",
"lastName": "Robinson",
"dateOfBirth": "14/06/1976"
}
}
Create endpoint for remove ticket from reservation (update reservation).
Create endpoint for finalize reservation. This endpoint will be triggered from another subsystem responsible for payments just after transaction finalization. So the only responsibility here is to turn reservation tickets into SOLD state. After that, reservation can not be updated anymore.
Create endpoint for reservation info - actual tickets list and total price.