Skip to content
← All projects
BackendFull-Stack

Sep 2026 - Present • Digital Healthcare Appointment Booking Platform (Next.js 15)

Ảnh dự án BookingCare Healthcare Platform

Overview

BookingCare is a production-grade digital healthcare appointment platform connecting patients, medical specialists, and administrators. Built on Next.js 15 Server Components & Actions, featuring 3-tier RBAC (Patient, Doctor, Admin), bulk doctor availability generator, offline mock fallback engine, and electronic booking receipts with QR check-in codes.

System Architecture

Layered Next.js 15 App Router architecture with dedicated service layer (`src/lib/services/`). Enforces defense-in-depth authorization through Supabase SSR session middleware at the Edge and database-level Row Level Security (RLS).

Data & Database

PostgreSQL (Supabase Cloud) relational schema normalizing patients, doctors, schedules, medical records, and verified reviews. Features automated database triggers syncing `auth.users`, partial unique constraints, and atomic conditional updates.

Key Challenges & Technical Solutions

  1. 01

    1. Anti-Race Condition Concurrency Booking Protection:

    Implemented atomic conditional PostgreSQL updates (UPDATE WHERE status = 'AVAILABLE') paired with partial unique constraints, preventing double booking during high concurrent patient traffic.

  2. 02

    2. Doctor Schedule Management & Bulk Slot Generator:

    Engineered a batch upsert slot generator supporting multi-day date ranges and morning/afternoon shifts, safely preserving pre-existing booked appointments.

  3. 03

    3. Multi-Tier Security with SSR Session Guard & PostgreSQL RLS:

    Coupled Next.js edge route guards with fine-grained PostgreSQL Row Level Security policies, preventing unauthorized clinical record access across doctor and patient accounts.