Date: October 15, 2025
Feature: Mockup Booking System with Razorpay Payment Gateway
A complete end-to-end booking system for professional therapy sessions with:
- Multi-step booking flow
- Session mode selection (Video/Phone/Chat)
- Date and time slot selection
- User details collection
- Mockup Razorpay payment gateway
- Booking confirmation
Location: components/booking/booking-dialog.tsx
-
Session Mode Selection
- Video Call (₹1,500)
- Phone Call (₹1,200)
- Text Chat (₹1,000)
- Interactive radio buttons with pricing
-
Date Selection
- Calendar component
- Only future dates (next 30 days)
- Disabled past dates
-
Time Slot Selection
- 10 available time slots
- 9:00 AM to 7:00 PM
- Click to select
-
User Details Form
- Full Name (required)
- Email (required)
- Phone Number (required)
- Notes (optional)
- Icon-enhanced inputs
-
Price Summary
- Session fee breakdown
- 18% GST calculation
- Total amount display
-
Authentic Razorpay Design
- Official Razorpay branding (#0C2C6C blue)
- Razorpay logo placeholder
- Security badges
-
Payment Methods
-
💳 Credit/Debit Card
- Card number input
- Cardholder name
- Expiry date (MM/YY)
- CVV
-
📱 UPI
- UPI ID input
- Orange-green gradient icon
-
🏦 Net Banking
- Bank selection dropdown
- Major Indian banks listed
-
-
Order Summary
- Professional name
- Session date and time
- Total amount
- Professional title
-
Security Features
- "256-bit SSL encryption" badge
- Green checkmark icon
- Professional appearance
-
Payment Processing
- Loading spinner
- "Processing..." state
- 2-second mock delay
- Confirmation Screen
- Green checkmark icon
- "Booking Confirmed!" message
- Session details summary
- Auto-close after 3 seconds
Location: components/ui/calendar.tsx
- Built with
react-day-pickerv9.8.0 - Custom styling to match app theme
- Accessible navigation
- Responsive design
- Disabled dates support
Location: app/professional-support/page.tsx
- "Book Session" button on each professional card
- Opens booking dialog with professional details
- Passes professional data to dialog
- State management for dialog visibility
1. User clicks "Book Session" on any professional card
↓
2. Booking dialog opens - Step 1: Details
- Select session mode (Video/Phone/Chat)
- Pick date from calendar
- Choose time slot
- Fill in personal details
- Review price (session fee + GST)
- Click "Continue to Payment"
↓
3. Razorpay Payment Screen - Step 2: Payment
- View order summary
- Select payment method
- Enter payment details
- Click "Pay ₹[amount]"
- See processing spinner (2 seconds)
↓
4. Success Screen - Step 3: Confirmation
- See green checkmark
- View booking details
- Auto-close after 3 seconds
- Form resets for next booking
| Session Mode | Price | GST (18%) | Total |
|---|---|---|---|
| Video Call | ₹1,500 | ₹270 | ₹1,770 |
| Phone Call | ₹1,200 | ₹216 | ₹1,416 |
| Text Chat | ₹1,000 | ₹180 | ₹1,180 |
-
components/booking/booking-dialog.tsx (608 lines)
- Main booking dialog component
- Three-step booking flow
- Razorpay payment mockup
- Success confirmation
-
components/ui/calendar.tsx (68 lines)
- Calendar component using react-day-picker
- Custom styling and theming
- Accessible navigation
- app/professional-support/page.tsx
- Added BookingDialog import
- Added state management for booking
- Added handleBookSession function
- Connected "Book Session" button
- ✅ Gradient backgrounds for session mode cards
- ✅ Icon-enhanced form inputs
- ✅ Interactive time slot buttons
- ✅ Razorpay official blue (#0C2C6C)
- ✅ Smooth transitions and hover effects
- ✅ Responsive grid layouts
- ✅ Loading spinner animation
- ✅ Green success checkmark
- ✅ Price breakdowns with borders
- ✅ Multi-step progress (Details → Payment → Success)
- ✅ Back button on payment screen
- ✅ Form validation before proceeding
- ✅ Auto-close after success
- ✅ Form reset after completion
- ✅ Disabled past dates in calendar
- ✅ Visual feedback for selections
- ✅ Secure payment indicators
react-day-picker: ^9.8.0 (already installed)date-fns: ^4.1.0 (already installed)- Shadcn UI components (Dialog, Calendar, Button, etc.)
- Lucide React icons
// Booking flow state
const [step, setStep] = useState<BookingStep>("details")
// Form state
const [selectedDate, setSelectedDate] = useState<Date | undefined>()
const [selectedTime, setSelectedTime] = useState<string>("")
const [sessionMode, setSessionMode] = useState<SessionMode>("video")
const [name, setName] = useState("")
const [email, setEmail] = useState("")
const [phone, setPhoneNumber] = useState("")
const [notes, setNotes] = useState("")
// Payment state
const [processing, setProcessing] = useState(false)
const [paymentMethod, setPaymentMethod] = useState<"card" | "upi" | "netbanking">("card")const SESSION_PRICES = {
video: 1500,
phone: 1200,
chat: 1000,
}
const sessionPrice = SESSION_PRICES[sessionMode]
const gst = Math.round(sessionPrice * 0.18)
const totalAmount = sessionPrice + gst-
Open Professional Support Page
Navigate to: http://localhost:3001/professional-support -
Select a Professional
- Scroll through the professional cards
- Click "Book Session" on any professional
-
Test Booking Details (Step 1)
- Try each session mode (Video/Phone/Chat)
- Verify price updates
- Select different dates from calendar
- Try selecting past dates (should be disabled)
- Pick various time slots
- Fill in your details
- Leave required fields empty and try to continue (should show alert)
- Fill all fields and click "Continue to Payment"
-
Test Payment Gateway (Step 2)
- Verify Razorpay branding appears
- Try each payment method:
- Card: Enter card details
- UPI: Enter UPI ID
- Net Banking: Select a bank
- Click "Back" to return to details
- Click "Pay ₹[amount]"
- Watch processing spinner (2 seconds)
-
Test Success Screen (Step 3)
- Verify green checkmark appears
- Check booking details are correct
- Wait for auto-close (3 seconds)
- Verify dialog closes and form resets
-
Test Another Booking
- Click "Book Session" again
- Verify form is reset
- Verify you can book again
- Full-width dialog (max-width: 2xl)
- Three-column time slot grid
- Side-by-side payment forms
- Adjusted dialog width
- Three-column time slot grid
- Stacked payment forms
- Full-screen dialog
- Three-column time slot grid (smaller)
- Single column forms
- Scrollable content
Note: This is a mockup implementation. For production:
- ✅ Visual security badges
- ✅ SSL encryption indicator
- ✅ Professional payment UI
- ✅ No real payment processing
- Integrate real Razorpay SDK
- Server-side payment verification
- Webhook handling
- Payment status tracking
- Refund management
- Transaction logging
- PCI compliance
- Secure API endpoints
-
Backend Integration
- Save bookings to Convex database
- Real-time availability checking
- Conflict prevention
- Email notifications
-
Real Razorpay Integration
- Razorpay SDK implementation
- Order creation API
- Payment verification
- Webhook handlers
-
Booking Management
- View upcoming bookings
- Reschedule/cancel functionality
- Booking history
- Payment receipts
-
Notifications
- Email confirmations
- SMS reminders
- Calendar invites
- Professional notifications
-
Professional Availability
- Real-time calendar sync
- Custom availability settings
- Break time management
- Vacation mode
-
Video Session Integration
- Zoom/Google Meet links
- In-app video calls
- Session recording options
- Screen sharing
-
Payment Features
- Multiple payment methods
- Discount codes
- Subscription packages
- Wallet system
-
Analytics
- Booking conversion rates
- Popular time slots
- Revenue tracking
- Professional performance
-
Mock Payment Only
- No real payment processing
- Always shows success
- No payment verification
-
No Backend Persistence
- Bookings not saved
- No booking history
- No conflict checking
-
Static Availability
- All time slots always available
- No professional calendar integration
- No capacity limits
-
No Email Notifications
- No confirmation emails
- No reminder emails
- No calendar invites
- Calendar import may show warning initially (resolves after reload)
- Select element accessibility (title attribute added)
const handleBookSession = (professional: Professional) => {
setSelectedProfessional(professional)
setBookingDialogOpen(true)
}
<Button onClick={() => handleBookSession(prof)}>
Book Session
</Button>import { Calendar } from "@/components/ui/calendar"
<Calendar
mode="single"
selected={selectedDate}
onSelect={setSelectedDate}
disabled={(date: Date) => date < new Date()}
className="rounded-md border"
/>const handlePayment = () => {
setProcessing(true)
// Simulate payment processing
setTimeout(() => {
onSuccess()
}, 2000)
}All features implemented and working:
- Booking dialog opens on button click
- Session mode selection with pricing
- Date picker with future dates only
- Time slot selection
- User details form with validation
- GST calculation and display
- Razorpay payment UI mockup
- Multiple payment methods
- Payment processing animation
- Success confirmation screen
- Auto-close and form reset
- Responsive design
- Professional details passed correctly
- No TypeScript errors (after reload)
- Accessible UI components
The booking system is fully functional with a professional Razorpay payment mockup! Users can:
- Select professionals
- Choose session types and times
- Enter their details
- Go through a realistic payment flow
- Receive booking confirmation
Next Steps: Integrate with backend (Convex) and real Razorpay API for production use.
For issues or questions:
- Check TypeScript server is running
- Reload VS Code window if imports show errors
- Clear browser cache if styling issues
- Check console for any runtime errors
- Verify all dependencies are installed
Last Updated: October 15, 2025
Status: Mockup Complete - Ready for Backend Integration