Smart Scheduler
A production multi-tenant SaaS platform where small businesses get their own AI scheduling assistant. Customers book appointments through natural conversation via chat or phone.
The Problem
Small businesses — dental clinics, salons, consultants — lose customers because they can't answer the phone during busy hours. Missed calls mean missed appointments mean lost revenue.
Existing booking tools are either too expensive, too complex, or don't offer the conversational experience customers want. Most require customers to navigate a rigid form instead of just saying "I need an appointment Thursday afternoon."
The Solution
Smart Scheduler gives every business their own AI booking assistant that handles appointments through natural conversation — via a chat widget on their website or over the phone via Twilio.
Business owners sign up, configure their hours and services, choose a plan, and get a booking page they can share with customers. The AI handles the rest — checking availability, booking slots, sending reminders, and managing cancellations with automatic waitlist promotion.
Architecture & Technology
This is a real production system running on AWS, handling real customer interactions.
OpenAI GPT-4o
AI agent with function calling for real actions
Twilio Voice
Phone-based booking with speech-to-text
Stripe Billing
3 subscription tiers with billing portal
Python + FastAPI
Async backend with middleware-based auth
SQLite (per-tenant)
Complete data isolation between businesses
AWS ECS Fargate
Serverless containers with EFS persistence
How Multi-Tenancy Works
Tenant Isolation
Every business that signs up gets their own SQLite database stored on AWS EFS. No business can ever see another business's data — it's physically separated at the file level.
Middleware automatically resolves which tenant a request belongs to — either from the authenticated session (dashboard) or from the URL slug (public booking widget).
Subscription Billing
Three plans (Starter $49.99, Standard $99.99, Premium $150.99) with different appointment limits and feature access. Stripe handles all payment processing, and webhooks keep subscription status in sync.
Plan limits are enforced server-side — the AI agent checks appointment counts before booking, and feature gating controls access to waitlist management and voice booking.
Security & Reliability
Session-Based Auth
Httponly cookies with bcrypt password hashing and session expiry
Stripe Webhook Verification
Signature verification with idempotency tracking prevents duplicate processing
Rate Limiting
Per-endpoint rate limits on auth, chat, and booking to prevent abuse
Security Headers
HSTS, X-Frame-Options, Content-Type-Options, Referrer-Policy
Non-Root Containers
Docker containers run as unprivileged user with minimal attack surface
Automated CI/CD
GitHub Actions builds, tests, and deploys on every push to main
The Build Journey
Smart Scheduler didn't ship as one giant release. We built and deployed it in vertical slices.
Core Booking Engine
Single-tenant booking flow: business calendar, availability logic, appointment CRUD, and a public booking page. Proved the core workflow before adding complexity.
AI Agent Over Chat
Wired GPT-4o with function calling so the AI could actually check availability and create bookings — not just describe them. Added a chat widget for business websites.
Multi-Tenant + Billing
Converted the single-tenant app into a SaaS: per-tenant SQLite databases on EFS, Stripe subscriptions with three tiers, webhook handling, and plan-based feature gating.
Voice Booking + Waitlist
Added Twilio voice so customers could book by phone with the same AI agent. Added automatic waitlist promotion when appointments are cancelled.
Key Technical Challenges
Making the AI agent take real actions
A chatbot that only talks is useless — we needed the AI to actually create appointments. We built a function-calling layer where GPT-4o can invoke typed backend functions (check_availability, create_appointment, cancel_booking) and we enforce plan limits and data validation before the action executes. The model drives the conversation; our backend owns the source of truth.
True tenant isolation without over-engineering
Most SaaS apps use row-level security on a shared database. We chose per-tenant SQLite files on AWS EFS. It's physically impossible for one business to query another's data — there's nothing to query. Middleware resolves the tenant from either the auth session or the public slug, opens that tenant's database, and every request is scoped automatically.
Keeping Stripe and our database in sync
Webhook delivery is not reliable by default — retries, out-of-order events, and duplicates are normal. We verify signatures, store webhook IDs for idempotency, and reconcile subscription state from the Stripe API on read, not just on write. A business's plan status is always correct, even if a webhook is delayed.
See It Live
Smart Scheduler is live and accepting customers. Try the booking experience yourself.
Visit Smart Scheduler →Services Behind This Build
Want Something Like This?
We can build a SaaS platform, AI integration, or custom tool for your business using the same technology. Let's talk.
Get a Free Consultation