Lead Systems Architect & Full-Stack Developer•
Sydney CBD Dental Studio — Clinical Management & Booking Engine
A production-grade dental clinic booking platform and staff operations dashboard engineered with Laravel 13, Filament v5, Livewire 4, and Astro 7. Features concurrency-safe appointment scheduling with pessimistic database row-locking, patient PII blind-index encryption, and zero-JS static client speeds.
Production Impact: 240 passing Pest tests (1,044 assertions). Concurrency-safe appointment slot generation with pessimistic database row-locking (lockForUpdate), patient PII blind-index encryption (APP_HASH_KEY), and sub-1s static load with 0 KB initial client JS.
Laravel 13Filament v5Livewire 4Astro 7Tailwind CSS v4DockerPest
Overview
Sydney CBD Dental Studio is a decoupled healthcare booking and clinical administration platform built for a multi-chair practice in Sydney’s central business district. The project replaces disjointed booking forms and manual appointment books with a unified, two-tier architecture:
- A public patient portal (
dentals.matthewberces.dev): Built with Astro 7 and Tailwind CSS v4, compiled to static HTML and served on the Cloudflare Pages edge network for sub-1s load times and maximum SEO reach. - A clinical management engine (
dentaldashboard.matthewberces.dev): Built with Laravel 13, Livewire 4, and Filament v5, hosted in a rootless ServerSideUp PHP 8.4 container on a Hetzner VPS managed via Coolify.
Core Engineering & Concurrency Safeguards
1. Dynamic Chair Slot Generator (GenerateAvailableSlotsAction)
- Clinical practices run on shared infrastructure: surgery rooms (chairs) and dentists. The slot generator computes real-time availability across dynamic chair allocations without static calendar bloat.
- Applies buffer times (pre- and post-op room sterilization), practitioner lunch blocks, and roster shift limits directly into available interval calculation.
2. Pessimistic Row Locking & Race-Condition Prevention (BookAppointmentAction)
- Pessimistic Locking: Concurrent booking requests for the same practitioner and time slot are serialized using
lockForUpdate()inside a high-isolation database transaction (DB::transaction). - Deadlock Avoidance: Multiple resource locks (dentist records, operational chairs) are acquired in sorted primary-key order (
orderBy('id')), eliminating circular wait conditions under concurrent load. - Distributed Cache Idempotency: Patient booking form submissions utilize cache-backed atomic idempotency locks (
Cache::lock()) with 10-second TTLs to reject double-clicks and network retries gracefully.
3. Patient PII Blind-Index Encryption & Audit Compliance
- Blind-Index Architecture: To comply with Australian Privacy Principles (APP) and healthcare privacy standards while allowing fast exact-match searches (e.g. searching by phone or email), patient records use encrypted columns paired with deterministic HMAC-SHA256 blind hashes salted by
APP_HASH_KEY. - Forensic Activity Logging: Powered by
spatie/laravel-activitylog. Tracks receptionist modifications, doctor reassignments, appointment cancellations, and medical history access. Automatically redacts cryptographic tokens, session IDs, and medical notes from audit trails.
4. Cryptographic Self-Service Token Engine
- Zero-friction patient appointment management without requiring patients to create and remember permanent user accounts.
- Confirmation emails deliver time-bound, cryptographically signed SHA-256 tokens allowing patients to reschedule or cancel appointments up to 24 hours prior to surgery.
- Cancellation and reschedule operations verify token validity, release locked chair slots, and notify clinical receptionists in real time.
Clinical Admin Console (/admin)
Built on Filament v5 and Livewire 4, the back-office console provides role-based access control (RBAC) separated into distinct operational domains:
- Dentist Day Schedule: Doctors logging in are automatically routed directly to their personalized
/admin/dentist-day-scheduleview, showing upcoming patients, appointment types (hygiene, restorative, surgical), and clinical notes. - Receptionist Front Desk: Quick-check-in modal, patient status toggles (Scheduled, Confirmed, Arrived, In Treatment, Completed, No-Show), and drag-and-drop chair reassignment.
- Practice Analytics: Real-time revenue telemetry, chair utilization percentages, cancellation rates, and peak patient arrival histograms.
Technical Specifications & Toolchain
- Backend Framework: Laravel 13.x (PHP 8.4)
- Clinical Admin Panel: Filament v5, Livewire 4, Alpine.js
- Frontend Portal: Astro 7, Tailwind CSS v4 (
@tailwindcss/vite), TypeScript - Containerization & Deployment: Rootless Docker container via
serversideup/php:8.4-fpm-nginxon Hetzner VPS + Coolify (dentaldashboard.matthewberces.dev) & Cloudflare Pages Edge (dentals.matthewberces.dev) - Security & Headers: Strict CSP, HSTS, X-Content-Type-Options, Referrer-Policy, and rootless non-root container permissions (
USER 9999:9999). - Automated Testing Suite: 240 passing Pest tests with 1,044 assertions covering booking race conditions, chair allocation conflicts, cancellation token expiration, and blind-index lookups.
- Static Analysis & Linting: PHPStan Level 5+ and Laravel Pint (PER-CS 2.0).