Skip to content

[FEATURE] Real-Time Event Availability Tracker with Seat Booking Lock #40

@Saranyadharani

Description

@Saranyadharani

Title: [FEATURE] Real-Time Event Availability Tracker with Seat Booking Lock

Difficulty: Hard | Level 3

Problem:
Current booking system allows overbooking. Users can book seats even after event capacity is reached, causing double-booking conflicts.

Solution:
Implement real-time seat availability with temporary lock mechanism:

  • WebSocket/SSE for live seat count updates
  • 10-minute temporary lock when user starts booking
  • Automatic release if booking not completed
  • Visual seat map showing available/booked/locked seats
  • Queue system for waitlisted users

Files Modified:

  • app/api/events/[id]/book/route.ts (add locking logic)
  • app/api/events/[id]/availability/route.ts (new endpoint)
  • app/components/BookingModal.tsx (add seat map UI)
  • app/hooks/useWebSocket.ts (new file for real-time updates)
  • database/models/Booking.ts (add lock fields)

Technical Requirements:

  • WebSocket or Server-Sent Events for live updates
  • MongoDB atomic operations for seat decrement
  • TTL indexes for automatic lock expiration
  • Race condition handling with transactions

Expected Outcome:
Zero overbooking incidents with smooth user experience.

Labels: feature, Hard, SSoC26, Level 3

@niharika-mente Please assign this under SSOC'26

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions