Skip to content

Consultorio Plus

A schedule the database itself refuses to double-book.

Sector
Healthcare · Multi-tenant SaaS
Status
Open to the public
Interactive booking demo as a patient

The challenge

A health professional loses hours confirming appointments by message, gets paid in cash or by transfer, and keeps records in notebooks and loose files.

The need was a platform any practice could sign up for in minutes, with its own page and its own email, that took payments the way people pay in Mexico and treated health data with the care it demands.

What we built

  1. 01

    A schedule with no overlaps

    The database rejects any appointment that overlaps another. It does not depend on the screen or on luck.

  2. 02

    A site of their own for each professional

    A page on their own subdomain, with their brand, a WhatsApp card, a QR code and search engine optimization.

  3. 03

    Payments the Mexican way

    Card with 3D Secure, OXXO and SPEI. Full payment, deposit or payment at the visit.

  4. 04

    Encrypted clinical records

    AES-256-GCM encryption column by column, SOAP notes, ICD-10 and timestamped signatures.

  5. 05

    Online visits without friction

    A Google Meet room is created automatically for each online appointment.

  6. 06

    Password-free patient portal

    Patients sign in with a magic link, a code or their Google account to see and change their appointments.

The live scene

Animated scene: A weekly grid receives appointments that settle into place; an appointment that tries to take a booked slot is rejected and bounces back.

Under the hood

How it is put together, end to end.

  1. 01

    Browser and phone

    • Practice dashboard
    • Public site per subdomain
    • Patient portal
  2. 02

    Application

    • Next.js 16
    • React 19
    • TypeScript
    • Drizzle ORM
  3. 03

    Data

    • Supabase Postgres with RLS on every table
    • EXCLUDE constraint with GiST
    • Upstash Redis
    • Cloudflare R2
  4. 04

    External services

    • Stripe Connect
    • Google Calendar and Meet
    • Resend + React Email
    • Cloudflare Turnstile

An engineering detail

Two appointments cannot share the same slot

Most schedulers check whether a slot is free before saving. If two patients book in the same second, both pass the check.

Here the rule lives in the database. A Postgres constraint rejects any appointment that overlaps another one for the same professional, no matter where it comes from.

SQL · Postgres
-- Simplified illustration
create extension if not exists btree_gist;

alter table appointments
  add constraint no_overlaps
  exclude using gist (
    professional_id with =,
    tstzrange(starts_at, ends_at) with &&
  )
  where (status <> 'cancelled');

Repository figures

961
automated tests
70
database tables
37
API routes
75
migrations

Counted in the source code on November 23, 2026.

Gallery

Public site of a fictional practice with its services
Page for professionals with the sample schedule
Fictional practice site on a phone
Demo start on a phone

Technology

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • Radix
  • Supabase
  • Drizzle ORM
  • Stripe Connect
  • Resend
  • React Email
  • Cloudflare R2
  • Cloudflare Turnstile
  • Upstash Redis
  • Google Calendar and Meet
  • Vercel
  • Vitest
Next project · 03 / 05CheQRA code that changes within seconds and cannot be fooled.