Live2024

Cafe Theatre — Booking & E-commerce Portal

A booking and e-commerce portal for a cafe with multiple private theatre screens — users book theatres for group movies or private functions, order cakes, flowers, food platters, and party packages, all from a single platform with real-time availability and slot management.

Node.jsTypeScriptReactPostgreSQLRedisRazorpayAWS

Category

Enterprise

Year

2024

Status

Live

The Problem

A small cafe operates multiple private theatre screens — intimate 10–30 seat rooms where groups can watch movies, celebrate birthdays, host baby showers, or run small corporate events. The business model combines theatre bookings with food, cakes, decorations, and party packages.

Before the portal, everything ran on phone calls and WhatsApp. A customer would message asking about availability, the staff would check a paper register, quote a price, negotiate add-ons (cake, flowers, food platter), and manually block the slot. Double bookings happened regularly. Pricing was inconsistent — different staff quoted different rates. There was no way for customers to browse available slots, see what add-ons were available, or book and pay online. The cafe was leaving money on the table because the booking friction was too high, especially for impulse and last-minute bookings.

They needed a portal where customers could see real-time availability, pick a screen, choose a time slot, add food and party extras, pay online, and get an instant confirmation — no phone calls, no waiting.

What I Built

A complete booking and e-commerce platform that handles theatre reservations, event bookings, and food/party item ordering in a single flow.

Theatre & Screen Management:

  • Multiple theatre screens configured in the system, each with its own capacity, features (screen size, sound system, decor style), and photos
  • Screen categories — standard (10-seat, casual), premium (20-seat, better sound and seating), and party rooms (30-seat, open layout with standing space for functions)
  • Each screen has configurable time slots — morning, afternoon, evening, and late night, with different durations and pricing per slot
  • Blackout dates for maintenance, private events, or holidays
  • Screen-specific amenities listed — Bluetooth connectivity, HDMI input (bring your own content), streaming apps pre-installed, mic and speaker setup for karaoke or presentations

Booking System:

  • Real-time availability calendar — customers see which screens have open slots for their chosen date at a glance
  • Slot selection — pick a screen, pick a time slot, see the price instantly. Pricing varies by screen type, day of week (weekday vs weekend), and time of day (evening and weekend slots premium-priced)
  • Booking types:
    • Group Movie — book a screen for a private movie screening. Customers can pick from the cafe’s movie library or bring their own content via USB/HDMI
    • Birthday / Celebration — book a screen with party decorations, includes basic decor setup. Add-on cakes, flowers, balloons, and custom banners available
    • Corporate Event — book for team outings, presentations, or small workshops. Projector and mic setup included
    • Food Party — book primarily for the food experience. Screen available but the focus is on food platters, buffet setup, and group dining
  • Slot locking — when a user starts checkout, the slot is temporarily held for 10 minutes to prevent double bookings. If payment is not completed, the slot releases back to available
  • Booking confirmation with all details — screen, date, time, duration, add-ons, total price — sent via email and available in the user’s account

Food & Party E-commerce:

  • Full product catalog alongside the booking flow — customers add items to their order while booking a theatre slot
  • Cakes — multiple flavors, sizes (half kg, 1 kg, 2 kg), eggless options, custom message on cake. Photos of each cake variant. Pricing by size and flavor
  • Flowers — bouquets, table arrangements, and screen decoration packages. Seasonal availability reflected in the catalog
  • Food Platters — pre-configured party platters: snack platters, sandwich trays, pizza combos, finger food assortments, mini meals. Each platter shows serving count (“feeds 8–10 people”)
  • Beverages — soft drinks packages, mocktail jugs, tea/coffee service for corporate bookings
  • Party Extras — balloon bunches, banners (“Happy Birthday”, “Congratulations”), confetti poppers, photo props, party caps
  • Combo Packages — admin-configured bundles: “Birthday Bash” (screen + cake + flowers + balloons + snack platter at a bundled discount), “Movie Night” (screen + 2 pizza combos + soft drinks), “Corporate Package” (screen + tea/coffee service + sandwich platter)
  • Items are added to cart alongside the theatre booking — single checkout for everything
  • Minimum order lead time per category — cakes need 24-hour advance order, flowers need 12 hours, food platters need 4 hours. The system enforces this based on the booking time

Pricing & Slot Management (Admin):

  • Admin dashboard to configure all pricing: base rates per screen per slot, weekend/weekday multipliers, holiday surcharges
  • Dynamic pricing rules — admin can set higher rates for peak demand periods (Friday evenings, Saturday nights, festival seasons)
  • Slot duration management — admin defines available slots per screen per day, with buffer time between bookings for cleanup and setup
  • Bulk slot management — block entire days or date ranges for private events or maintenance
  • Product pricing — admin manages the food and party catalog: add/edit/remove items, set prices, mark items as available/unavailable, upload photos
  • Combo package builder — admin creates bundled packages by selecting a screen type + items, sets the bundle price (typically 10–20% below individual pricing)

User Experience:

  • Browse screens with photos, capacity, and features
  • Select date → see available slots across all screens → pick one → add food and party items → checkout
  • Guest checkout supported — no account required for one-time bookings. Account creation optional for booking history and faster rebooking
  • Razorpay payment integration — UPI, credit/debit cards, net banking, and wallets
  • Booking management — users can view upcoming bookings, download invoice, and cancel (with cancellation policy: full refund 48+ hours before, 50% refund 24–48 hours, no refund under 24 hours)
  • Rebooking — past customers can rebook the same screen and add-ons with one click

Admin Portal:

  • Booking dashboard — today’s bookings at a glance, upcoming bookings by screen, calendar view with color-coded booking types
  • Booking detail — customer info, screen, time, all add-on items ordered, payment status, special requests
  • Revenue reporting — daily/weekly/monthly revenue breakdown by screen, by booking type, by add-on category
  • Customer list — booking history per customer, total spend, frequency
  • Inventory alerts — when cake orders exceed a daily threshold, when a popular platter is running low on ingredients (manual flag system)
  • Cancellation and refund management — admin can process refunds, apply partial credits, or reschedule bookings

Technical Challenges

  • Slot availability and double-booking prevention — The core concurrency challenge. Two users viewing the same available slot must not both be able to book it. Implemented optimistic locking with a temporary slot hold at checkout initiation. A PostgreSQL advisory lock on the screen+date+slot combination ensures atomicity. If payment completes, the hold converts to a confirmed booking. If the hold expires (10-minute timeout), a background job releases it. Redis tracks active holds for instant availability checks without hitting the database.

  • Combined booking + e-commerce checkout — A single checkout contains a theatre booking (with slot reservation) and multiple product orders (with varying lead times and availability). Built a unified cart model where the theatre slot is the anchor item and food/party items attach to it. Validation runs across the entire cart — if a cake needs 24 hours lead time but the booking is tonight, the cart rejects the cake addition with a clear message, not the whole order.

  • Flexible pricing engine — Pricing depends on screen type, day of week, time of day, holiday calendar, and admin-defined surge rules. Built a layered pricing calculator: base rate → day multiplier → time multiplier → holiday surcharge → combo discount. Each layer is independently configurable by admin. The price shown to the user is always the final calculated price — no surprises at checkout.

  • Lead time enforcement across categories — Different products have different preparation requirements. The system checks each cart item’s lead time against the booking datetime and rejects items that cannot be fulfilled in time. This runs both on the frontend (items grayed out if lead time is insufficient) and the backend (validation at checkout to catch race conditions).

  • Cancellation and refund logic — Cancellations trigger different refund amounts based on time-to-booking. The theatre slot must be released back to available. Food orders that are already in preparation (within lead time window) may not be fully refundable. Built a cancellation engine that calculates refund per line item based on its category’s cancellation policy and current preparation status.

Architecture

  • Frontend — React application with a booking flow wizard: screen selection → date/slot picker → add-ons → cart review → payment. Responsive for mobile (most bookings happen on phones). Real-time slot availability via API polling.
  • API Layer — Node.js + TypeScript REST API. JWT authentication for registered users, session tokens for guest checkout. Request validation and rate limiting.
  • Booking Engine — Manages slot availability, temporary holds, booking confirmation, and cancellation. PostgreSQL advisory locks for concurrency. Redis for fast availability lookups and hold tracking.
  • E-commerce Module — Product catalog, cart management, pricing calculator, and order fulfillment tracking. Integrated with the booking engine so theatre and product orders share a single checkout.
  • Payment — Razorpay integration for all payment methods. Webhook receiver for payment confirmation. Refund API for cancellations.
  • Database — PostgreSQL for screens, slots, bookings, products, orders, users, and transaction logs. Indexes on slot lookups (screen + date + status) and booking queries.
  • Cache — Redis for slot availability state, active hold tracking, and session management.
  • Infrastructure — AWS deployment with Docker containers. RDS for PostgreSQL. ElastiCache for Redis. S3 for product and screen photos. CloudWatch for monitoring.

Results & Impact

  • Online bookings live — the cafe went from phone/WhatsApp-only to a fully self-service booking portal, capturing impulse and after-hours bookings they previously missed
  • Zero double bookings — slot locking and advisory locks eliminated the scheduling conflicts that plagued manual management
  • Increased average order value — the integrated food and party e-commerce upsells add-ons during the booking flow, increasing revenue per booking compared to walk-in add-on orders
  • Combo packages drive conversion — bundled pricing makes it easy for customers to pick a complete party package instead of assembling items individually
  • Admin control over pricing — dynamic pricing rules let the cafe maximize revenue on peak slots while offering competitive rates on off-peak times
  • Sole architect and developer — designed and built the full platform: booking engine, e-commerce catalog, pricing engine, payment integration, admin portal, and customer-facing booking flow

Stack Deep Dive

  • Node.js + TypeScript for the backend — booking engine, pricing calculator, and e-commerce logic in a single API
  • React frontend with a multi-step booking wizard — screen selection through payment in a smooth flow
  • PostgreSQL with advisory locks for slot concurrency and indexes tuned for availability queries
  • Redis for real-time slot availability, temporary booking holds, and session caching
  • Razorpay for payment processing — UPI, cards, net banking, wallets, and refund handling
  • AWS (ECS, RDS, ElastiCache, S3, CloudWatch) for managed cloud infrastructure
  • Docker for containerized deployment

Interested in working together?

Get in Touch