How romstab/multi-tenant-ai-booking-pwa works
BookAI is a multi-tenant appointment-booking SaaS delivered as a browser PWA with Vercel API handlers and Firebase-backed tenant data. Customers choose a business, service, date and slot, then submit a booking; staff and owners manage schedules and bookings through authenticated tools. The README also describes AI, waitlists/CRM, reminders, no-show processing, SMS, themes, trials and super-admin functions. Some of these implementations were not sampled, so their internal links are omitted; documented capability links are identified as such.
Main entry points: create-booking.js Booking API · business.js Business API · booking.html Public booking · emailService.js Email transport
Components 27
Booking
- Public booking
booking.html - Booking API
api/create-booking.js - Slot helpers
app.js - Appointments
- Manage booking
manage-booking.html
Business operations
- Owner dashboard
dashboard.html - Staff workspace
staff-home.html - Business API
api/business.js - Business helpers
business.js - AI integration
api/gemini.js - Waitlist and CRM
api/business.js
Identity and platform
- Membership and permissions
api/authz.js - Client auth helpers
authz.js - Super-admin API
api/admin.js - Super-admin auth
api/admin-auth.js - Tenant data
Notifications
- Confirmation email
template/bookingConfirmationTemplate.js - Reminder processor
api/cron-reminders.js - No-show processor
api/cron-noshow.js - Email transport
services/emailService.js - SMS API
api/sms.js
Web experience
- Firebase services
firebase-config.js - PWA runtime
service-worker.js
Other components
- Customer
- Super admin
- Email provider
- SMS provider
Connections 25
- Customer → Public booking: selects service
README.md - Public booking → Booking API: submits booking
- Booking API → Membership and permissions: checks access
api/create-booking.js - Booking API → Tenant data: reads and writes
- Booking API → Slot helpers: uses time helpers
- Booking API → Appointments: records appointments
- Manage booking → Booking API: requests changes
- Owner dashboard → Business API: manages business
- Staff workspace → Business API: manages work
- Business API → Membership and permissions: resolves membership
api/business.js - Business API → Tenant data: reads and writes
- Business API → Waitlist and CRM: handles CRM actions
api/business.js - Owner dashboard → AI integration: requests AI
- Client auth helpers → Firebase services: uses Firebase auth
- Super admin → Super-admin auth: authenticates
README.md - Super-admin auth → Super-admin API: issues admin token
- Super-admin API → Tenant data: manages tenants
- Booking API → Confirmation email: builds email
api/create-booking.js - Booking API → Email transport: sends email
api/create-booking.js - Reminder processor → Email transport: sends reminders
api/cron-reminders.js - Reminder processor → Tenant data: reads and updates
api/cron-reminders.js - No-show processor → Tenant data: processes bookings
- Email transport → Email provider: delivers mail
services/emailService.js - SMS API → SMS provider: sends SMS
README.md - PWA runtime → Public booking: caches shell
service-worker.js