Coding Challenge: TicketBoss - Event Ticketing
API
Problem Statement
Build "TicketBoss" – a tiny event-ticketing API with optimistic concurrency control for real-time seat
reservations.
Background
Your city is hosting a tech meet-up with 500 seats. You must expose a JSON API that lets external partners
reserve seats in real time. Over-selling is not allowed, but partners must get an instant accept/deny
response (no queued "you'll hear back later").
Functional Requirements
Expose atleast below 4 api endpoints:
Note: The seed data and api endpoints are given as an example. You can choose to follow any other
naming conventions if you want.
1. Event Bootstrap
On first start-up, seed the database with:
{
"eventId": "node-meetup-2025",
"name": "[Link] Meet-up",
"totalSeats": 500,
"availableSeats": 500,
"version": 0
}
2. Reserve Seats
Endpoint: POST /reservations/
Request Body:
json
{
"partnerId": "abc-corp",
"seats": 3
}
Responses:
**201 Created →**
json
{
"reservationId": "reservationId", // unique reservation id
"seats": 3,
"status": "confirmed"
}
**409 Conflict →**
json
{
"error": "Not enough seats left"
}
**400 Bad Request → **if seats ≤ 0 or > 10 (max per request)
3. Cancel Reservation
Endpoint: DELETE /reservations/:reservationId
Responses:
204 No Content on success (seats go back to the pool)
404 Not Found if reservationId unknown or already cancelled
4. Event Summary
Endpoint: GET /reservations/
Response: 200 OK →
json
{
"eventId": "node-meetup-2025",
"name": "[Link] Meet-up",
"totalSeats": 500,
"availableSeats": 42,
"reservationCount": 458,
"version": 14
}
Submission Guidelines
1. Code Repository: Create a new public GitHub repository and share the url.
2. Project Structure & Documentation
Include a [Link] file with:
Setup Instructions: How to install dependencies and run the application
API Documentation: List all endpoints, their methods, parameters, request/response examples
Technical Decisions: Brief explanation of your architecture choices, storage method, and any
assumptions
Use a standard [Link] project structure with a proper [Link]
3. Code Quality
Write clean, readable, and well-organized code
Use consistent formatting and meaningful variable names
Include basic error handling and validation
4. Evaluation Criteria
Functionality: Does the API meet all core requirements?
Code Quality: Is the code clean, modular, and maintainable?
API Design: Are the endpoints RESTful and intuitive?
Error Handling: Are edge cases and errors properly handled?
Validation: Is user input validated effectively?
Documentation: Is the README clear and comprehensive?