Return to Studio Index
CASE STUDY 01 // PRODUCTION SYSTEM
COMMERCE & OPERATIONAL AUTOMATION // NEXT.JS + WHATSAPP CLOUD API

Engineering an autonomous booking, upfront deposit & WhatsApp notification pipeline for a high-volume studio.

Client / Domain Mehendi & Bridal Artistry Studio
Engineering Scope Solo Full-Stack Architect & Engineer
Sprint Timeline 3-Week Delivery Cycle
Live Production Link mehendistudio.in
Next.js 14 TypeScript Tailwind CSS Payment Gateway WhatsApp Cloud API 24/7 AI Chatbot Node.js Webhooks
https://mehendistudio.in/book/bridal-package
SSL ACTIVE
SELECT CALENDAR DATE & TIME

Bridal Couture Package (₹4,500 Deposit)

3 ARTISTS ON DUTY
Click an available time slot below to test the reservation lock:
09:00 AM
11:30 AM ✓
02:00 PM
04:30 PM
07:00 PM (Booked)
08:30 PM
Lock held for 10:00 mins
MS
Mehendi Studio (Verified)
Official WhatsApp Business

The business bottlenecks that were strangling studio capacity.

In high-demand wedding seasons, client inquiries surge dramatically. The studio's previous manual workflow was leaking revenue and draining staff energy.

BOTTLENECK_01

The DM Black Hole

Over 40% of potential brides inquiring on Instagram and WhatsApp waited hours for a human response during peak sessions. By the time staff replied with pricing and slot availability, clients had already booked competing studios.

BOTTLENECK_02

Calendar Collisions

Multiple staff members manually promised overlapping slots across Instagram DMs, personal WhatsApp chats, and phone calls. Double-booking conflicts caused severe client friction during peak wedding dates.

BOTTLENECK_03

No-Deposit Ghosting

Without an automated upfront deposit system, clients frequently cancelled bookings last-minute or failed to show up, leaving senior artists idle on high-value dates with zero compensation.

How the autonomous pipeline processes bookings without human intervention.

The system removes all human friction from the appointment lifecycle: from client selection to temporary slot locking, payment verification, and instant WhatsApp dispatch.

STAGE 01
Client Browser
Next.js 14 SSR UI loads date/time availability matrix in <800ms.
10-Min Lock
STAGE 02
Payment Gateway
Razorpay/Stripe modal collects advance deposit. Slot locked against race conditions.
Signed Webhook
STAGE 03
Secure Webhook Listener
Verifies cryptographic payload signature and flags slot as permanently confirmed.
Cloud API
STAGE 04
WhatsApp Cloud API
Dispatches instant client confirmation, receipt, map pin & prep guide.
Admin Push
STAGE 05
Studio Admin Alert
Real-time booking alert delivered to studio owner dashboard and artist calendar.

Engineering decisions & code architecture.

Temporary Reservation Lock to Prevent Race Conditions

When two clients simultaneously attempt to book the same wedding slot on auspicious festival dates, traditional booking forms fail with race conditions. Ajay engineered an atomic 10-minute temporary session lock in TypeScript. If the payment gateway modal is closed or abandoned, the lock cleanly releases back to the availability pool without database corruption.

SLOT_RESERVATION_LOCK.TS
export async function lockAppointmentSlot(
  slotId: string, 
  userId: string
): Promise<ReservationLockResult> {
  const existingLock = await cache.get(`lock:${slotId}`);
  if (existingLock && existingLock.userId !== userId) {
    return { success: false, reason: 'SLOT_OCCUPIED' };
  }

  // Set atomic lock for 600 seconds (10 mins)
  await cache.set(
    `lock:${slotId}`, 
    { userId, lockedAt: Date.now() }, 
    { ttlSeconds: 600 }
  );

  return { success: true, expiresAt: Date.now() + 600000 };
}

Transactional WhatsApp Cloud API Message Dispatch

Rather than forcing clients to check email inbox spam folders, the application directly connects to Meta's WhatsApp Cloud API. Webhook listeners trigger an authenticated WhatsApp template message containing dynamic variables: client name, booking slot, payment transaction hash, studio Google Maps pin, and bridal prep advice.

WHATSAPP_DISPATCH_PAYLOAD.JSON
{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "template",
  "template": {
    "name": "mehendi_booking_confirmation",
    "language": { "code": "en" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "Priya" },
          { "type": "text", "text": "Bridal Couture Package" },
          { "type": "text", "text": "Sunday, 24 Oct @ 11:30 AM" },
          { "type": "text", "text": "TXN_9921 (₹4,500 Paid)" }
        ]
      }
    ]
  }
}

24/7 Conversational AI Client Assistant

A custom, lightweight chatbot embedded directly on the website answers 80%+ of repetitive customer questions—including pricing breakdown per hand/feet design, organic henna stain safety, artist travel policies, and appointment preparation instructions. The bot gently qualifies the bride and routes her straight into the booking calendar with zero human friction.

AI_AGENT_CONTEXT_SPEC.JSON
{
  "agent_identity": "Mehendi Studio Assistant",
  "operating_hours": "24/7",
  "knowledge_base": [
    "Bridal Couture Package: ₹12,000 (Advance: ₹4,500)",
    "Arabic Fusion Style: ₹5,500 (Advance: ₹2,000)",
    "Organic Henna: 100% natural, stains dark in 48 hrs",
    "Location: Studio Suite #4, Hazratganj, Lucknow"
  ],
  "conversion_objective": "Route qualified queries to /book calendar"
}

Real business results delivered in production.

Factual operational impact achieved after deploying the Next.js booking engine and WhatsApp automation pipeline.

100%
AUTOMATED SCHEDULING

Zero manual calendar updates needed by studio management. Bookings process autonomously 24 hours a day.

0
DOUBLE-BOOKINGS

Atomic slot locking eliminated human scheduling conflicts on peak wedding weekends entirely.

100%
UPFRONT DEPOSITS

Every appointment slot is secured with advance payment before calendar reservation is confirmed.

<800ms
PAGE LOAD SPEED

Next.js 14 architecture delivers sub-second load times across Indian mobile cellular networks (Lighthouse 98+).

NEXT PRODUCTION CASE STUDY // 02 OF 04

Barber's Salon — Multi-Chair Booking & Python FastAPI Platform

High-throughput salon appointment platform with service catalogs, stylist profile matrices, and role-based revenue analytics.

Inspect Barber's Live Platform ↗ View All Studio Projects →

Need a booking engine, custom web application, or automated WhatsApp pipeline for your business?

Discuss your requirements directly with Ajay. No agency middlemen, no junior hand-offs, no dropped context.

Initiate Project Briefing WhatsApp Direct Line