LiveB2B SaaS · Healthcare scheduling

Multi-location clinical staff scheduling with a rules engine that guarantees valid rosters, a chat assistant that drafts schedules from plain-language requests, and WhatsApp shift cover.

Built at
RaftWorks
Client
Clinical Stack
Role
Full-stack developer
Platform
Web app · Staff mobile web
Year
2026
Marketing site: hero
01 / 09The problem

Clinics lose hours every week building rotas in spreadsheets, chasing staff for cover over text, and manually checking that nobody is double-booked or over their hours.

The first version ran on Bubble.io and had hit its ceiling: the scheduling rules, messaging retries and per-practice data isolation needed a real database and real code, without taking the live product offline.

02 / 09My role

  • Migrated the product from Bubble.io to Next.js and Supabase while it stayed live
  • Designed the Postgres schema: around 30 tables, 49 SQL migrations, row-level security per practice
  • Built the deterministic scheduling and validation engine
  • Built the chat assistant's tool layer and the WhatsApp Cloud API integration
  • Wired Stripe billing for two products from one codebase
03 / 09Scheduling

Every assignment runs through a hard/soft rule engine: hard rules (credentials, double-booking, maximum hours) block, soft rules (preferences, fairness) warn. Coverage gaps surface directly on the weekly and monthly planning views, so the admin sees the problem before staff do.

Scheduling Platform demo, about 30 seconds
Week planner across 3 locations
Admin home: what needs attention today
Day view
Month view
Create a schedule: a whole month at once
Fill gaps automatically
Schedules by location
Schedules by job type
Schedules by employee, with reasons
Schedules, month overview
Settings: rules and channels
Message templates
04 / 09Chat assistant

The assistant uses roughly 40 typed tools that read and write real schedule data in a multi-round tool-use loop. The core design decision: the model handles conversation and intent, while the same deterministic engine does the schedule building and validation; the model never publishes a schedule directly.

Destructive actions (deleting staff, bulk deletes) require an explicit confirmation step, and every tool call runs inside the caller's organisation, with row-level security blocking any cross-practice access.

Assistant demo, about 30 seconds
Scheduling assistant: ask for a schedule
Assistant product: chat plus calendar
Assistant: data created by chat
Assistant spotlight
05 / 09Shift cover

Built directly on the WhatsApp Business Cloud API. When a shift needs cover, the system ranks eligible replacements and sends an interactive message with three reply buttons; a tap applies to the schedule immediately. If nobody answers, a scheduled job escalates: notified → reminded → call offered → admin alerted.

Every inbound webhook is HMAC-verified, and every Meta message ID is claimed in the database before any work happens, because Meta's own retries could otherwise replay a destructive action twice.

Time off and swaps in one place
Scheduling requests
Real-time notifications
Staff app on desktop
Staff schedule on desktop
Staff app: home
Staff app: home, scrolled
Staff app: my schedule
Staff app: schedule, scrolled
Staff app: requests
Staff app: requests, scrolled
Staff app: availability
Staff app: settings, scrolled
Staff app: request vacation
06 / 09Operations

Staff directory, profiles with availability and credentials, departments and multiple locations, plus per-person reporting that drills down to individual shifts for payroll exports.

Reporting
Reporting: staff breakdown
Per-person drill-down
Shift report, payroll-ready hours
Staff directory
Staff profile
Departments
Locations
Report a problem, built in
07 / 09Two products

A chat-first Assistant serves solo providers and small practices (name-only staff, no logins; $25 or $50 a month). The full Scheduling Platform serves larger groups with staff logins, automated multi-channel coordination and payroll-ready hour exports ($99 or $199 a month, custom above 50 staff). Each practice is routed to the right experience at login, and Stripe bills both.

Platform plans: $99 / $199 / custom
Assistant plans: $25 / $50 / contact
Assistant billing
Two products, one platform
Pricing, both products
Pricing on a phone
08 / 09Marketing site

The public site explains the two products, shows them working in short demo videos, lists pricing, and carries an about page, a contact route and a privacy policy written against the real stack. It works on any device.

clinicalstack.ai
The entire Clinical Stack landing page
Marketing site, full page · full page, scroll inside
clinicalstack.ai
Homepage feature overview
Feature overview · full page, scroll inside
clinicalstack.ai
Clinical Stack about page, full length
About page · full page, scroll inside
clinicalstack.ai
Privacy policy written against the real stack, full length
Privacy policy · full page, scroll inside
Marketing site: hero
See it in action: demo videos
Scheduler feature
Real-time adjustments
Integrations
Contact page
Marketing site on a phone
Full landing page on a phone
09 / 09Tech stack

Frontend
Next.jsReactTypeScript
Backend & data
SupabasePostgresRow-level securityScheduled jobs
Integrations
WhatsApp Cloud APIStripeAnthropic SDKSMSEmail
LiveResult

Live at clinicalstack.ai with both products on one codebase, migrated off Bubble without downtime.

SQL migrations
49
database tables
~30
automatic escalation ladder
4-step
external integrations
8
See it live at clinicalstack.ai (opens in a new tab)