Try it in 60 seconds

  1. Open https://rebook-by9u.onrender.com and click Open the live demo (each visitor gets a private studio; the first load can take a minute or two on free hosting).
  2. Type or pick: "Maya has the flu and can't teach Monday" → Understand disruption → Plan recovery.
  3. Review the plan on the timeline (or the List view on a phone): 9 bookings kept, 16 moved, 6 refunded. Try Move… on a class.
  4. Approve and refund → Confirm approval and refund → six real PayPal sandbox refunds complete against the original payments (three at a time, about 7 seconds, with live progress).
  5. Open Message customers → open a Private choice link → tell the assistant what works ("anything after 6 this week, otherwise refund me") or choose Keep, another class, Refund, or keep the money as studio credit for any class.
  6. Under Studio tools → Cover pay, click Open cover link → Yes, I’ll cover it → back in the console click Pay Alex Rivera 35.00 with PayPal (a sandbox PayPal payout). 6b. Back under Refund results, click Verify with PayPal: Rebook asks PayPal (through the PayPal Agent Toolkit, read-only) whether every refund and the payout match its own records.
  7. Bonus: paste a messy message like "Fwd from Maya: so sorry, fever since last night, can't teach today" and confirm what the AI read.
  8. Dashboard → Ask Recovery analyst: "What did Monday's disruption cost us?" or "Add a bar chart of revenue by class type".
  9. Own a studio? Try it on your own week (link on the home page, or /import): load your booking export (or Use a sample week), check what Rebook read, and rehearse a bad morning on your real schedule. Video (2:26): https://youtu.be/rySTej0lxbM · Code: https://github.com/harsha31bs07-blip/rebook

Inspiration

Small studios run on a handful of instructors. When one is sick, the owner loses the morning: calling and texting everyone, juggling a spreadsheet, refunding payments one by one, and hoping nobody leaves for good. The tools I looked at (Glofox, Momence, Mindbody plus sub-finder apps) either cancel the class and hand back credits or help find a substitute; none re-plans the week around each customer and moves the money back to the original payment.

Who it's for and why it matters

Who it's for. Boutique class studios (pilates, yoga, spin, barre, dance) with a handful of instructors and one to three rooms, the kind that runs on Mindbody, Momence or Glofox. There are estimated to be over 40,000 standalone yoga and pilates studios in the US alone (MMCG, 2026 outlook, an industry estimate), and boutique attendance is back near pre-pandemic levels with average class prices up about 6% to $21.32 (Mariana Tek, 2026 Boutique Fitness Industry Report).

The bad morning is routine. Members of Club Pilates on Reddit describe instructor swaps several times a month, sometimes with no warning and an app that isn't updated (r/ClubPilates). A sick instructor can leave an owner well under an hour to find a substitute, tell every client and keep the class running, and many teams still do it with group texts, spreadsheets and Slack (Zipper's comparison of sub tools, vendor blog). Instructors themselves say last-minute requests wear teammates out (IDEA Fit), and boutique CEOs name a shortage of skilled trainers as a top challenge (Athletech News), so the substitute is often not there.

Cancelling costs money and members. When the studio cancels, customers are owed their money or credit back: studio policies promise a full refund (ClassFit) and ClassPass returns credits automatically (ClassPass help), which for a small studio means refunds handled one by one. And members notice: in a member survey reported by Health Club Management, 46% said they would be more likely to quit or stop attending if their preferred class was cancelled (Health Club Management, a 2014 survey sponsored by Les Mills).

What exists today stops at the substitute. Studios already pay for sub-finder apps that plug into Mindbody (for example Sub Guru and SubSync), or use the basic substitution features inside their booking system. They find a person for one class. Rebook also re-plans the week when there is no person (another room, another time, a refund only when nothing fits), lets each customer choose what happens to their own booking, and settles the money: refunds to the original payment and the substitute's pay.

What Rebook changes, in numbers from the live demo. One instructor out for a Monday touches 31 bookings worth $712. Cancelling would hand all of it back. Rebook's plan keeps 25 of the 31 bookings (9 at the same time with a substitute, 16 moved) and $577 of the $712 (81%), refunds the other 6 through PayPal within seconds of one approval, sends each customer a private link to keep, move, take credit or a refund, and pays the substitute's cover fee with PayPal Payouts. The owner reviews every change before anything happens; the plan is ready in under a second. The changes then flow back to the booking system (a sync API, and a connector tested against Mindbody's sandbox), and customers' own AI assistants can book or rebook through the studio's MCP endpoint without ever paying on their behalf.

What it does

For the owner: describe what happened in plain words, or paste the message you got: a forwarded WhatsApp, Hinglish ("Maya bimaar hai, kal class nahi le paayegi") or shorthand. Rebook understands it (or asks a clarifying question instead of guessing; anything only the AI could read is shown back as "AI read this as…" for the owner to confirm), then a deterministic solver re-plans the week in well under a second: a qualified substitute first, then the same time the next day, then other valid moves, and a refund only when nothing fits that customer (each refund has a readable reason). When a quick first pass is not provably best, a bounded search tries other instructor, room and time assignments, and if it still cannot prove no plan keeps more bookings, the plan says so; tests compare it with a brute-force search over every valid plan. The owner reviews every change on a Bryntum timeline or a phone-friendly list, can move any class (validated live, with undo), confirms substitutes, and approves once. Money: approval issues real PayPal sandbox refunds to each original payment, three at a time, idempotent and confirmed by verified webhooks. Verify with PayPal re-checks every refund (through the PayPal Agent Toolkit) and cover payout (Payouts API) against PayPal, read-only, and shows match / differs / PayPal is ahead. A refund whose outcome is unknown is never replayed blindly: after a short safe window it is held as "Needs review" with its amount reserved, a background sweep reconciles with PayPal, and the owner sees a "Payments needing attention" list with a "Check with PayPal" action. Customers book and pay through PayPal (wallet or card fields). For customers: approval prepares a private link for every affected customer. Customers whose booking can be kept or moved can keep the new time, pick another class, take a refund, or keep the money as studio credit (spent at checkout on any class) in one tap, or just say what works and an assistant proposes one real option for them to confirm. Customers who are refunded get a receipt link instead. For the substitute: the cover instructor accepts on their own link, and once they accept, the owner pays the cover fee with a PayPal payout, whenever the studio chooses. If they say no, the class stops taking new bookings, the console names the next qualified instructor who is free then and suits everyone booked, and one click asks them instead; customers in that class get an updated message with the new name. Each instructor can have their own cover rate (per class, optionally plus a per-attendee bonus with a cap). Cover pay is tracked apart from customer money and follows whoever teaches. Your own week: an owner can import one week from their booking system's CSV export. Rules match the columns they can, the AI suggests the rest (it sees only column headers and class names, never customer details), and the owner checks every match before Rebook builds a private copy of their studio to rehearse on. Prices that aren't plain US dollars, ambiguous dates and cancelled or waitlisted rows are caught, not guessed. Customers on a class pack or membership get the visit back instead of a cash refund; Rebook tracks the imported pack balances and sends the balance changes back to the booking system. Waitlists: seats a recovery frees go to the class waitlist in order: each person gets a private link that holds the spot for up to 12 hours, and claims it through PayPal checkout (or their pack or membership); if they pass, the next person is asked. Mistakes can be undone: if the disruption turns out to be wrong ("Maya can teach after all"), one button previews a correction: every class that can still go back does, no new refunds are issued, money already settled stays recorded, the substitute's link closes, and customers get a "good news" update. If an original slot is now taken, the owner drags the restored class somewhere close on the timeline, and the correction is checked again: no customer is refunded or double-booked. Booking-system sync: a two-way sync API, authenticated with a private per-workspace key over HTTPS: the booking system (or Zapier, Make or a small connector) pulls every change Rebook made (class moves, cancellations, booking moves, refunds, pack visits returned, waitlist and checkout bookings) and marks each one applied, and pushes its own changes in (new and cancelled bookings, waitlist joins, pack balances, class capacity). A cancellation that arrives this way frees a seat, and the waitlist is offered it straight away. Inbound events never move money. A Mindbody connector runs on top of it, tested against Mindbody's sandbox studio: import a real Mindbody week, send the approved recovery back (instructor swaps, a class moved to a new time with its customers, on-time cancellations that return pack visits), and pick up bookings made in Mindbody. Imported weeks assume customer availability, and cash refunds for imported bookings are simulated; the connector does not refund Mindbody payments. Agent-ready studio: every studio is also a remote MCP server, so a customer can ask their own AI assistant to "book me a yoga class Tuesday evening" or to answer the studio's rebooking link. The agent finds the class and holds the seat, but never pays: it hands the person a PayPal approval link (Orders v2 with a return to the studio), and a refund through an agent needs the person's explicit confirmation. Follow-through: the outbox emails customers who booked through checkout (with delivered/bounced status), or opens WhatsApp or SMS with the message and link ready for the owner to send, and tracks who replied. Insight: an AG Studio dashboard and Recovery analyst explain what the disruption cost in refunds and kept revenue, from the same ledger; cover pay is tracked separately.

How I built it

  • Next.js 16 + React 19 + TypeScript, node:sqlite per-visitor demo workspaces on Render.
  • PayPal: JS SDK v6 (PayPal button + card fields) with Orders v2 create/capture and server-side capture verification; Payments v2 refunds with stable PayPal-Request-Id idempotency; Payouts for cover fees (recorded before the call, the request id doubles as the batch id so a lost response replays the same payout); Webhooks with signature verification updating the ledger; Transaction Search to resolve uncertain preparation outcomes; the PayPal Agent Toolkit (read-only refund lookups for Verify with PayPal, also a Recovery analyst tool); Orders, Payments and Transaction Search calls go through the APIMatic-generated PayPal Server SDK; Payouts and webhook signature verification use authenticated REST calls, because the SDK has no Payouts controller.
  • AI: Gemini interprets the owner's words (validated against the studio before use; negation, hypotheticals and unsupported ranges become clarifying questions), with Groq as a fast fallback and a rules parser as the last resort. A 177-case labelled evaluation corpus (incl. Indian English, typos and 94 must-ask cases) runs as an offline regression test. On the live Gemini + Groq chain it scored 174/177 (98.3%) with zero dangerous false positives; the three misses are typos where Rebook asks "Did you mean Maya Chen?" instead of guessing. A second, held-out set of 45 messy real-world messages (forwarded texts, Hinglish, third-person reports, 18 that must trigger a question) measures what the AI adds: rules alone read 22/45; with the model, Rebook read 43/45 with zero dangerous results (pinned Gemini + Groq models). The customer assistant scored 22/24 on 24 held-out requests (including prompt injection) with zero unsafe actions. Money never depends on the model: the solver, server validation, the ledger and PayPal decide every refund and payout, and the assistant's money wording comes from the server.
  • Bryntum Scheduler: recovery preview (ghosts, move arrows, unavailable time ranges), drag or keyboard Move with async server validation and undo, utilisation column, list fallback.
  • AG Studio: custom widgets (Recovery impact, Refund receipts, Week heatmap, Recovery metric), Rebook theme, saved report state, cross-filtering, and a Recovery analyst built on the Studio Agent Framework: direct tools answer common questions in one call, preset charts are placed through Studio's state API, and custom report edits delegate to the built-in Page/Widget agents.
  • WebMCP: page-scoped tools let a browser assistant prepare a recovery or a booking; approving money stays a human click.
  • Email: Brevo transactional API for customers who booked through checkout, with a send recorded before it goes out and delivery status read back.
  • Quality: 1,400+ automated tests (solver properties and snapshot, money recovery and refund safety, webhooks, accessibility, phone layout); a real-browser end-to-end run of the whole judge path against the live site (plan → six PayPal refunds → outbox → a customer's refund on a phone → the substitute accepts and is paid → dashboard → public card checkout) with axe accessibility audits at every step; a manually triggered "judge smoke" that creates a demo and checks for a real sandbox capture.

Challenges I ran into

  • A real-browser checkout failed only on the hosted site: Render's proxy changed the request origin, so my same-origin guard rejected every real customer. API tests could not see it; my own video recorder found it.
  • Free-tier AI is bursty. AG Studio's delegated agents send large, schema-heavy turns; Gemini 3 also rejected Studio-injected tool calls without "thought signatures". I added the documented signature placeholder, a Groq fallback sized to its token limits, direct analyst tools for common questions, and retries that only wait when the server knows a model frees up in seconds.
  • An independent review found the solver sometimes refunded customers it could have kept. The objective is now strictly "fewest refunds first", and a later review found one more case: the greedy pass gave the only versatile instructor to the wrong class. A budgeted branch and bound now runs whenever the greedy plan isn't provably optimal, checked against a brute-force oracle on 85 randomized small studios. Realistic customer constraints then made planning much slower; indexed feasibility checks and refund-first pruning brought it back to tens of milliseconds, with identical results on a full-plan snapshot.

Accomplishments that I'm proud of

  • From a sick-day message to an approved recovery with real PayPal refunds in about a minute, on a phone.
  • Being wrong is worse than asking: the interpreter refuses to plan from "Maya is not sick" and asks instead.
  • Every number on screen is traceable to the ledger, and updates when customers change their minds.

What I learned

Trust beats cleverness: owners need to see exactly who moves, who is refunded and why, and to approve once. And reliability on free tiers is an engineering problem: measure tokens, latency and failure modes instead of guessing.

What's next

Real studio pilots; Mindbody go-live with a real studio, then Glofox and Momence connectors; SMS delivery; owner sign-in and durable storage.

Built With

Share this project:

Updates

Submission history