Case Study

Citara Scheduling

A multi-tenant scheduling SaaS with a proprietary Real-Time Flow Control engine that dynamically recalculates the entire day's agenda when an appointment runs over.

Núcleo Studio B2B Web Design & Development Brand Identity & Branding Digital Strategy Consulting

What was the problem to solve?

Service professionals (doctors, therapists, consultants) deal with rigid calendars. When a single appointment runs 15 minutes long, the rest of the day collapses — full waiting rooms and frustrated clients. On top of that, automated WhatsApp reminders through traditional providers like Twilio carry high per-unit costs that erode the margins of independent professionals.

How we solved it at Núcleo Studio

I designed a highly scalable multi-tenant scheduling platform. Beyond standard booking features, Citara introduces a Real-Time Flow Control Module (MTR) that dynamically recalculates and shifts the entire day's agenda when an appointment runs over. To solve the notification-cost problem, I built a hybrid messaging architecture that lets users use official templates or connect their personal WhatsApp through a decentralized microservice.

⚙️ Technical Execution & Architecture
1. MTR Engine & Dynamic Rescheduling
An algorithmic engine (/api/mtr/appointment/delay) intercepts late check-outs. When a session exceeds its allotted time, the system calculates the overrun in minutes, checks the user-configured buffer limits, and propagates the delay to all subsequent appointments. Clients automatically receive a WhatsApp message with their new adjusted time.

2. Decoupled Hybrid WhatsApp Microservice
I designed a dual-channel messaging system to drastically reduce notification costs. Users can opt for standard delivery via Twilio, or connect their personal WhatsApp using a Node.js/Express microservice based on @whiskeysockets/baileys. A sync pipeline with Cloud Run persists authentication states across serverless container restarts — enabling zero-cost automated messaging directly from the professional's own number.

3. Overage Billing with Stripe (Webhooks)
I designed a complex Stripe integration that handles flat-rate subscriptions (Pro/Premium) alongside usage-based billing. The backend records the monthly notification quota in PostgreSQL. If a user exceeds their limit, the system fires a checkout.session.completed webhook to automatically add a metered overage item to their Stripe subscription, dynamically capping it to avoid unexpected invoices.

4. Real-Time Database & Row-Level Security (RLS)
I secured the multi-tenant architecture with Supabase Row-Level Security, guaranteeing absolute data isolation between professionals. PostgreSQL logical replication (Supabase Realtime) streams instant UI updates via WebSockets — the operator's dashboard reflects appointment states without manual polling.

System architecture
Diagrama: Citara Scheduling
Click to enlarge

The business impact

A high-margin SaaS platform was delivered. By offering the personal WhatsApp microservice, acquisition friction is reduced (no extra message costs), while power users naturally move up to Premium tiers for advanced reporting and MTR features. The serverless, edge-optimized architecture keeps infrastructure costs negligible, scaling profitably from day one.

Next.js 15 Supabase PostgreSQL Tailwind CSS Stripe Node.js AWS S3 WebSockets TypeScript
Have a similar challenge?

Does your company have a similar bottleneck?

We analyze your operation and show you exactly how we can automate it. No commitment.