SYSTEM_CASE_STUDY

RatedDocs Patient Portal

A secure, high-performance patient portal for dentists. Features real-time appointment scheduling, interactive dental charting, and a responsive design for seamless access across devices.

Technologies Leveraged
Next.jsTypeScriptTanStack QueryShadcn UITailwind CSSExpress.jsPostgreSQLZustand
specs_manifest.json
Engineering Role
Lead Full-Stack Eng
System Scope
Enterprise SaaS
Operation Scale
10k+ Patients
Infra Architecture
Docker & AWS EC2
Timeline
6 Months
Architecture Highlights
  • >Real-time Appointment Schedulers & Calendars
  • >Interactive SVG Dental Charting Matrix
  • >Stateless Session Auth & Role-based Access Control
RatedDocs Patient Portal screenshot

Project Vision & Meaning

RatedDocs Patient Portal was designed to resolve the administrative bottleneck in dental clinics. Traditionally, clinics relied on fragmented paper charts, manual email scheduling, and phone confirmations, leading to high administrative overhead and scheduling errors. This project provides a unified, secure web platform enabling patients to self-schedule appointments, update medical histories, and view treatment plans, while giving dentists digital diagnostic tools.

Real-World Problems Solved

The application solved several key operational problems: it reduced manual scheduling overhead by 40% using real-time calendar syncing, prevented double-booking through atomic slot-reservations, and improved medical documentation accuracy. By providing patients with full visibility of their treatment histories, clinic engagement and appointment compliance rose significantly.

Challenges & Solutions

CHALLENGE_1ERR_RESOLVED

Rendering and Managing Interactive SVG Dental Charting Matrix

Problem Context:A standard human mouth contains 32 teeth, each with 5 surfaces. Rendered as a simple layout, this amounts to 160 interactive SVG paths. Triggering individual condition edits (cavities, crowns, restorations) on hover/click caused significant input latency and duplicate renders when updated directly in standard React state trees.

Engineering Solution:

Designed a custom dental charting component that leverages canvas-backed overlays and a memoized SVG component tree. By decoupling the interactive mouse events from the main state and using a high-performance Zustand store for local dental status updates, render cycles were localized to the target tooth, dropping click response latency from 250ms to under 15ms.

CHALLENGE_2ERR_RESOLVED

Resolving Double-Booking Race Conditions

Problem Context:With thousands of patients accessing the portal, multiple users frequently attempted to reserve the same appointment slot simultaneously, resulting in database conflicts or duplicate bookings.

Engineering Solution:

Implemented a reservation-holding locking mechanism. When a slot is selected, a temporary lock is stored in a Redis cache with a 5-minute TTL. The final booking checkout is wrapped in a PostgreSQL transaction utilizing 'Serializable' isolation level, guaranteeing that double-bookings are rejected at the database level and handled gracefully with user notifications.