Skip to content

BackCase study

BodyMed Hub

The system a physiotherapy clinic runs on: booking, payments, waitlist, insight and team, in one Hub.

Sole developer, for BodyMed Healthcare, named Rehabilitation Clinic of the Year 2026 at the Irish Healthcare Centre Awards.

Live since .

tests
438
API routes
90
scheduled jobs
9

39 pages · 8 architecture decision records · 20 modules live

The production code is private. The demo and its code are public, and run as a fictional clinic.

The Hub’s home screen in the public demo, signed in as the owner of a fictional clinic: a list of areas starting with Appointments, Online bookings, Waitlist and Machine clashes.

The Hub in the public demo. The clinic and everyone in it are made up.

What it replaced

What the clinic had before, and what does that job now.

  1. Before: Jane online booking, with no payment at bookingNow: Pay at booking, on Cliniko and Stripe
  2. Before: Manual phone paymentsNow: Pay links and saved cards
  3. Before: No equipment trackingNow: Machine-clash prevention
  4. Before: No fortnightly schedulesNow: Therapist shifts
  5. Before: A Kendlebell PDF and a 7-page documentNow: A role-based help centre
  6. Before: A shared admin keyNow: Roles, passkeys and approved devices
  7. Before: A Mailchimp sync that ignored consentNow: Consent-based newsletter opt-in

Module map

Everything the Hub does, grouped by who it is for. Live means the clinic uses it today.

21 modulesLive 20 in daily useBuilt 1 switched off for now

Patients, 05 modules

  • Booking siteLive

    Pay at booking. Returning patients skip the form. The dropdown treatment menu went live on 12 November 2026.

  • Manage my bookingLive

    Change or cancel under the 24-hour rule, up to 12 weeks ahead.

  • WaitlistLive

    One fair offer at a time when a slot opens.

  • Gift vouchersLive

    Redeemed online or at the desk. Online sales are paused.

  • Newsletter opt-inLive

    Consent-based.

Reception, 06 modules

  • Phone bookingLive

    A 2-hour pay link, a card on the call, or a saved card once the patient approves on their phone.

  • AppointmentsLive

    Diary holds, and rebook or refund.

  • Machine-clash preventionLive

    One shockwave machine and one laser. The Hub never double-books them, and clashes made straight in the diary are caught.

  • Help centreLive

    Role-based guides for staff.

  • Email templatesLive

    Editable in the Hub.

  • Emergency switchLive

    Sends booking back to Cliniko if it is ever needed.

Money, 04 modules

  • Past-appointment paymentsLive

    Take payment for an appointment that has already happened.

  • Not invoiced yetLive

    Paid bookings still waiting for an invoice.

  • Payment reconciliationLive

    Checked every morning at 06:00.

  • PDF invoices and credit notesBuilt

    Built, and switched off for now.

Team, 04 modules

  • TeamLive

    4 roles, passkeys and device approval.

  • TimesheetsLive

    Clocking in and weekly hours.

  • Weekly tasksLive

    The “Clinic Tree”.

  • Therapist shiftsLive

    Fortnightly schedules.

Insight, 02 modules

  • KPI dashboardLive

    Worked out every night at 01:30.

  • Therapist statsLive

    The month so far, for each therapist.

A tour of the demo

The public demo is the production interface running as a fictional clinic, Northbank Physio, with a pretend back end in the browser. Every name and figure in these screenshots is made up.

  1. The demo’s booking page at step 3 of 5, Choose a time, with a week of days, the free times that morning and a summary of the booking so far.

    Booking, on the patient’s side

    Five steps: treatment, practitioner, time, details, payment. The time is re-checked against the diary and held while they pay.

  2. The demo’s Online bookings page: a list of made-up patients’ appointments, each marked paid in full, with buttons to charge an extra and to refund or waive.

    Online bookings, on reception’s side

    Every online booking with its payment beside it. Reception can charge an extra, refund or waive a fee, and every action is logged.

  3. The demo’s phone booking page at step 5 of 5, Review and take payment, with Email them a payment link selected and a button to email the €80.00 payment link.

    Phone booking and a pay link

    Reception takes the caller through the same five steps, then takes their card on the call or emails a pay link. The time is held for 2 hours.

  4. The demo’s Waitlist page after a check for open times: 3 offers sent and 1 booked, and two made-up patients each holding an offered time with a button to take it back.

    Waitlist

    Patients waiting for a time. When one opens that suits them they get a link to book it, held for 2 hours. If they don’t take it, it goes to the next person.

  5. The demo’s Clinic KPIs page: a paragraph summing up last week for the fictional clinic, above a headline figure with its trend.

    KPI dashboard

    Last week against the clinic’s own last 8 weeks, starting with one paragraph in plain English. The figures here are invented for the demo.

  6. The demo’s Appointments page: a made-up patient under Paid, waiting for a new time, with buttons to book a time or refund €80.00.

    Appointments, and rebook or refund

    Find any patient and move or cancel their appointments. Anyone who paid but lost their time is listed here, with Book a time and Refund beside them.

  7. The demo’s Guides page, with guides grouped for owners and for reception.

    Help centre

    Guides for owners, reception, staff and patients. Every guide has the steps, and most have pictures with the button to press circled.

The demo still shows the earlier, card-based treatment picker. The live site has used dropdowns since 12 November 2026.

Architecture

Patients and staff use one application, and it talks to the service that owns each job.

How BodyMed Hub fits togetherPatients and Staff use BodyMed Hub, built with Next.js 15 + React 19 on Vercel, Dublin. It talks to Cliniko (the diary); Stripe (Checkout, Connect direct charges to each therapist’s own account, webhooks); Twilio (texts); Resend (email); MailerLite (newsletter); Upstash Redis (holds, limits); Postgres (staff accounts). It runs 9 scheduled jobs: every 5 min, waitlist, invoices, diary holds, saved-card approvals; every 15 min, vouchers; 01:30, kpis; 04:40, shifts; 06:00, reconciliation; 22:30, summary.PatientsStaffBodyMed HubNext.js 15 + React 19on Vercel, Dublin9 scheduled jobsEvery 5 minWaitlist, invoices, diary holds,saved-card approvalsEvery 15 minVouchers01:30KPIs04:40Shifts06:00Reconciliation22:30SummaryClinikothe diaryStripeCheckout, Connect direct charges to eachtherapist’s own account, webhooksTwiliotextsResendemailMailerLitenewsletterUpstash Redisholds, limitsPostgresstaff accountsHow BodyMed Hub fits togetherPatients and Staff use BodyMed Hub, built with Next.js 15 + React 19 on Vercel, Dublin. It talks to Cliniko (the diary); Stripe (Checkout, Connect direct charges to each therapist’s own account, webhooks); Twilio (texts); Resend (email); MailerLite (newsletter); Upstash Redis (holds, limits); Postgres (staff accounts). It runs 9 scheduled jobs: every 5 min, waitlist, invoices, diary holds, saved-card approvals; every 15 min, vouchers; 01:30, kpis; 04:40, shifts; 06:00, reconciliation; 22:30, summary.PatientsStaffBodyMed HubNext.js 15 + React 19on Vercel, Dublin9 scheduled jobsEvery 5 minWaitlist, invoices, diaryholds, saved-card approvalsEvery 15 minVouchers01:30KPIs04:40Shifts06:00Reconciliation22:30SummaryClinikothe diaryStripeCheckout, Connect direct charges toeach therapist’s own account, webhooksTwiliotextsResendemailMailerLitenewsletterUpstash Redisholds, limitsPostgresstaff accounts
A map of the Hub's production code drawn by the Graphify code-graph tool: thousands of small coloured dots, one per file, function or setting, joined by fine lines where one uses another, forming a dense glowing cluster on a dark background. Names are removed.
The same system at full scale: the Hub's production code mapped by Graphify, 3,306 parts and 11,681 connections, coloured by area. Names removed, as the code is private.

How it shipped

Planned from August 2026. The first piece shipped on 25 September, and the clinic went live five weeks later.

  1. AugPlanned from August 2026
  2. Booking site
  3. Manage booking
  4. Pay links
  5. Staff dashboard and help centre
  6. Guides, timesheets, approved devices
  7. KPIs, tasks, “not invoiced yet”
  8. Waitlist
  9. Therapist stats, and invoices (built)
  10. Vouchers
  11. Machine clashes, and go-liveGo-live
  12. Shifts, email templates, appointments and rebook
  13. Past-appointment payments
  14. Returning patients skip the form
  15. Dropdown menu live

Deep dives

Four problems where the obvious answer was wrong, or not available.

Paying self-employed therapists directly

The problem
The therapists are self-employed. A payment for an appointment with one of them is their money, not the clinic’s, so it has to reach their own account.
Options considered
  • Destination charges
  • One clinic account that pays therapists monthly
  • Express accounts
  • Direct charges (chosen)
What I chose, and why
Direct charges on each therapist’s own Stripe account. Stripe refused Express accounts that pay their own fees, which ruled that option out.
The trade-off
A saved card belongs to one therapist’s account, so saved cards work per therapist. A refund bug needed a fix, and then a repair of older records.

Never selling one time twice

The problem
The Hub, clinic staff and the answering service can all book the same slot, and Cliniko has no webhooks and no locking.
Options considered
  • Authorise, book, then capture
  • Pay, then book from the webhook (chosen)
What I chose, and why
Pay, then book from Stripe’s webhook, with short-lived holds, a HELD block in the diary, a re-check after payment, and rebook or refund if the time has gone. “Authorise, book, capture” came too late before launch, and authorisations only last about 7 days.
The trade-off
A patient can pay for a time that someone else takes a moment later, so the Hub has to put that right by itself. A fix on 4 November 2026 closed a gap where a crash in the middle of a booking could leave it unfinished.
  1. Hold the slot

    Before the patient pays, the server re-checks the time with the diary and holds it for 30 minutes, so two people can’t pay for the same slot. Phone pay links and waitlist offers hold a time for 2 hours.

  2. Take payment

    Stripe Checkout, with the card saved for the cancellation policy. Every call that moves money carries an idempotency key.

  3. Claim the webhook event

    Stripe retries webhooks. Each event is claimed once.

    Seen before. Nothing changes. One appointment, one charge.

  4. Re-check the slot

    Someone may have booked it by phone while the patient paid.

    Slot gone. Payment kept. Link to pick another time, refunded automatically after 7 days.

  5. Look before creating

    If an earlier attempt already made the appointment, use that one instead of making a duplicate.

    Diary down. Stripe retries for up to two hours. Then a full refund, an email, and an alert to the clinic.

  6. Confirm

    Save the booking record, send the confirmation. The page polls for this status.

Pay, then book. Every step that can fail has a defined way out.
Break it on purpose

A patient has just paid. Choose what happens next.

Booked

The appointment is created in the diary and a confirmation is emailed.

Reception sees it on the dashboard, with payment, notes and actions.

Payment kept

They keep the payment and get a link to pick another time with the same therapist.

If they don’t, they are refunded in full automatically after 7 days.

Refunded

Stripe retries for up to two hours.

Then a full refund, automatically, an email to the patient and an alert to the clinic.

A fair waitlist without webhooks

The problem
Cliniko has no webhooks, so nothing tells the Hub when a time opens up. When one does, more than one patient may want it.
What I chose, and why
The Hub checks for open times every 5 minutes in working hours and offers each one to one person at a time. The rules below decide who, and when.
The rules
Order
A patient waiting for a named therapist first, then whoever has gone longest without an offer, then whoever joined first.
Offer window
2 hours, and it always closes 60 minutes before the slot.
Short notice
No automatic offers under 3 hours’ notice.
Texts
Only between 08:30 and 20:00.
Limits
2 places on the list, 1 offer a day and 4 a week. Paused after 3 offers not taken. A place expires after 60 days.
At checkout
The slot is held while they pay.
Paid but gone
Rebook, or an automatic refund after 7 days.
The trade-off
Checking every 5 minutes means a freed time can wait a few minutes before anyone hears about it, and a time less than 3 hours away is never offered automatically.

Sign-in strong enough for refunds, on any laptop

The problem
Staff can refund patients, so sign-in has to be strong. But not every laptop in the clinic has Face ID.
What I chose, and why
Passkeys, plus approved computers for a laptop with no Face ID. A new browser waits for an approver, so access to someone’s inbox alone can’t move money.
The trade-off
A new computer can’t be used until someone approves it.

How I built it

Built with AI coding tools. I owned the product decisions with the clinic, the architecture (8 written decision records), reviewing and testing every change, and running it in production.

Before launch I wrote the requirements, a failure modes and effects analysis of everything that could go wrong with money and bookings, a test plan, a go/no-go checklist and a runbook. Every requirement has an ID, and the unit test that proves it is named after that ID, so each requirement traces straight to its test. The production code is private because it is tied to the clinic’s accounts.

Where it stands

  • Live since 30 October 2026, taking real bookings and payments every day at book.bodymed.ie.

A fuller before and after, including no-shows and late cancellations, follows after about two months of data.

The rest of the suite

Four tools built for BodyMed Healthcare. The public demos run as a fictional clinic, Northbank Physio, with made-up patients and data.

Reflection

The first version refunded a patient straight away when their slot was taken while they paid. Patients preferred not having to pay twice, so since 3 November 2026 the payment is kept and they choose another time instead.

The dropdowns taught me the bigger lesson: the people who use a system every day know the job better than I do.

About twelve weeks from first plans to launch was tight for something a working clinic depends on every day.

Pages

Home
Selected work
BodyMed HubCase study
AI email triageCase study
Jarvis site monitorCase study
About
CV
Colophon

Actions

Copy email addresscian.mccaul@outlook.com
Download CVPDF
Light theme
Dark theme
System theme
Reduce glass

Elsewhere

GitHub
LinkedIn
Email mecian.mccaul@outlook.com