Built with partners
MassageBook
A context-aware AI booking assistant for a US massage marketplace.
Building a complex, context-aware AI booking bot. It handles full conversations with users, helping them book, cancel or reschedule massage appointments in natural language.
- Partner
- MassageBookOne of the largest massage therapy marketplaces in the U.S.
- Sector
- Massage therapy marketplaceUsed by tens of thousands of independent therapists and wellness studios
- Services
- Product Architecture
- Product Design & Prototyping
- Front-end Development
- Back-end Development
- AI Integration
Watch the trailer
About MassageBook
MassageBook is one of the largest massage therapy marketplaces in the U.S., used by tens of thousands of independent therapists and wellness studios. The platform makes it easy for people to find local massage services and book them online. But as the company scaled, so did the complexity of user interactions, especially on mobile, where people expect fast, frictionless booking without digging through filters or drop-downs.

The problem
MassageBook came to us with a vision: an AI-powered booking assistant that could handle full conversations with users, helping them book, cancel or reschedule appointments in natural language.
This wasn't a generic chatbot request. It had to run in three environments: on business websites for individual providers, inside MassageBook's native apps, and on MassageBook.com for marketplace-wide queries.
The real challenge, and where the value was created, came from three tough areas: real-time logic, ambiguity in user intent, and large-scale system integration.


A conversational flow with logic behind every step
We started by designing a flow that worked across five core booking scenarios. Most users didn't arrive knowing all the details, so the bot always asked for location first as the anchor point, then whether they had a specific provider in mind or wanted suggestions, then clarified service type, date, time and staff.
The flow had to move flexibly depending on how the user phrased things, not ask the same questions in order. “I want a massage near downtown Chicago on Tuesday around 3” lets the bot infer location, date and time. “When’s Sarah G. next free?” makes it isolate the staff name and cross-reference her schedule.
This meant tracking variables in-session across a conversation and narrowing options dynamically without re-asking.

Understanding messy input in real time
People don't use clean, category-aligned language. Users asked for things like “back massage”, “pain relief”, “relaxation therapy” or “not too deep but not soft either”.
MassageBook had hundreds of service categories. “Deep Tissue”, “Sports Massage”, “Trigger Point Therapy” and “Myofascial Release” could all fit what a user meant by “back massage”.
We built a custom matching algorithm that interprets the input, finds the closest matches, and suggests or auto-selects options depending on confidence. If uncertain, the bot politely asks a clarifying question or offers choices.


Real-time availability search at scale
This was probably the hardest technical piece. We had to access and filter real-time availability data for over 30,000 businesses, and availability wasn't binary. It depended on location, provider schedules, service duration, existing bookings and type of service.
MassageBook provided a set of APIs, but we still needed to build a middle layer on top of them.
We implemented smart caching, request batching and a queueing system to avoid rate limits and reduce latency. When a user asks “What do you have this Thursday evening?” the bot responds within a second or two, not ten seconds or minutes.
Smart suggestions, login and payment
One of the most powerful parts of the system is how it chooses what to suggest. It doesn't just sort by distance or time. The bot weighs signals like provider rating, how often a service is booked, past user preferences and even cancellation rates to recommend options that feel high quality, not just “close by”. If there’s a better option slightly further away, it gets bumped up in the results, so the user always gets the best fit, not just the fastest.
So returning users could view or manage bookings, we set up a lightweight but secure authentication system using Twilio for SMS-based login. If the user already had a profile, the bot could pull up past appointments and stored payment methods.
We added a fallback password login for users who didn't want SMS, and handled the final payment step by redirecting to MassageBook's existing payment gateway. The result is a seamless flow from question to confirmation in one uninterrupted conversation.


Results and impact
The AI booking bot is now fully integrated across the MassageBook platform: on individual business websites, within the mobile and desktop apps, and directly on the MassageBook.com marketplace.
These benefits will translate into real business value: lower operational overhead, faster and more intuitive booking journeys, more revenue captured through better conversion, and happier users who don't need to fight the interface to get what they need.
This isn't just a chatbot. It's a deeply integrated AI assistant that understands how people talk, what they want, and how to turn that into action across a complex service marketplace.


Tech specs
The bot relies on a hybrid approach: LLMs for linguistic nuance, and custom-built logic for structured booking flows.
- Frontend
- Next.jsApp directory support and server-side rendering
- Frontend
- ReactResponsive, component-based UI
- Frontend
- Tailwind CSSUtility-first styling with custom animations
- Frontend
- React Hook FormConversational input and validation
- Frontend
- Lucide + React IconsLightweight icon rendering
- Backend & AI Integration
- Custom-built agent runnerManaged through vite-node, powering the chatbot logic
- Backend & AI Integration
- LangChainUsed selectively for more abstract user queries and prompt composition
- Backend & AI Integration
- OpenAI API (via LangChain)Used selectively for complex or vague phrasing, fallback prompts and natural language understanding
- Backend & AI Integration
- tRPCFully typesafe API communication between frontend and backend
- Backend & AI Integration
- ExpressLightweight server for API middleware and external integration
- Backend & AI Integration
- PrismaDatabase access and model handling, generated on build
- Backend & AI Integration
- Fuse.jsLightweight fuzzy search for service and location disambiguation
- Data layer & logic
- Custom matching algorithmTrained to classify vague input like “back pain” into relevant categories
- Data layer & logic
- Ranking engineWeighs provider rating, popularity and distance to suggest optimal options, not just the nearest
- Data layer & logic
- Real-time availability queryingAggregates and filters data across 30k+ vendors
- Data layer & logic
- Smart fallback handlingKeeps the bot going even if some data sources fail
- Infrastructure
- TwilioSecure SMS-based authentication
- Infrastructure
- SuperJSONSerialising data across frontend and backend calls
- Infrastructure
- ZodRuntime type validation
- Infrastructure
- Environment validation layerSafe deployment across staging and production
- Dev Experience & Tooling
- TypeScriptEnd-to-end typing for safety and dev speed
- Dev Experience & Tooling
- ESLint + Prettier + HuskyCode quality enforcement and pre-commit checks
- Dev Experience & Tooling
- Tailwind MergeClean and efficient class handling
- Dev Experience & Tooling
- PostCSSExtended CSS features and builds

Need something like MassageBook built and kept running?
Got a market and a problem worth a company? Build it with us →
