Delivered remotely for a business based in Doha, Qatar. Names withheld by agreement.
Project Overview
Virtual healthcare delivery breaks down quickly when scheduling conflicts, payment disputes, or clunky video downloads interrupt a patient's appointment. For a healthcare provider operating out of Doha, we architected and delivered a browser-based telehealth consultation platform built on Laravel, Blade, MySQL, AWS, S3, Stripe, and Twilio. The system unifies clinician availability management, patient intake documentation, pre-authorized appointment billing, and encrypted real-time video visits inside one cohesive web application with zero third-party client installs required.
Business Bottleneck
The clinic previously stitched together generic calendar forms, manual payment links, email attachments for lab results, and standalone consumer video tools. That patchwork created double-booked clinician slots across patient timezones, exposed sensitive diagnostic PDFs in unencrypted email threads, and forced billing staff to issue manual refunds whenever consultations rescheduled. Clinical leadership needed an integrated, privacy-conscious web platform with deterministic scheduling, encrypted document handling, and automated visit settlement.
Architectural Strategy
We centered the entire care workflow on a server-rendered Laravel and Blade application deployed inside a segmented AWS environment. Storing all clinician availability and appointments in canonical UTC inside MySQL while rendering views in each participant's detected timezone eliminated off-by-one-hour booking errors. Stripe PaymentIntents decouple booking confirmation from final fee capture, while Amazon S3 private buckets encrypted with AWS KMS keep patient files off application disks. Twilio powers both automated SMS appointment reminders and ephemeral Programmable Video rooms provisioned strictly for verified consultation participants.
Core Capabilities
- Timezone-Safe Slot Discovery: Patients browse licensed specialists by specialty, language, and live slot availability rendered cleanly in their local timezone.
- Atomic Appointment Reservation: Pessimistic reservation locks prevent concurrent double-bookings during peak clinic hours.
- Encrypted Intake & Lab Sharing: Patients attach referrals, prescriptions, and imaging securely prior to the call via direct-to-S3 encrypted uploads.
- Pre-Authorized Consultation Billing: Stripe authorizes consultation fees upon booking and triggers automated capture on completion or instant release on timely cancellation.
- In-Browser Virtual Consultation Rooms: Clinicians and patients launch Twilio Programmable Video directly inside Blade views with audio/video device checks and session timers.
- Post-Visit Summaries & Audit Trail: Clinicians record structured visit notes and follow-up guidance while every file view and status change logs immutably for compliance review.
Technical Architecture
Flow: Patient / Clinician Browser -> Laravel + Blade (AWS) -> MySQL RDS (UTC Slots & Audit Log) / S3 KMS (Intake Files) / Stripe (PaymentIntents) / Twilio (Video Rooms & SMS)
Every authenticated interaction enters Laravel behind TLS and strict role-based policies distinguishing patients, clinicians, scheduling coordinators, and compliance admins. When a patient selects a slot, Laravel initiates a MySQL transaction enforcing a unique constraint on (clinician_id, slot_start_utc) for active appointments and obtains a Stripe PaymentIntent authorization hold via signed API calls.
For intake documents, the browser requests a scoped upload policy from Laravel and pushes files directly to a private Amazon S3 bucket protected by AWS KMS server-side encryption. Downloading or previewing a document requires an active consultation relationship check in Laravel, which then mints a short-TTL pre-signed S3 URL valid for seconds. Fifteen minutes before start time, scheduled jobs dispatch Twilio SMS reminders with direct visit links; entering the waiting room triggers just-in-time Twilio Programmable Video token generation scoped to the exact consultation room SID, followed by Stripe webhook-verified fee capture once the clinician marks the visit complete.
Technology Stack
| Category | Technology detail |
|---|---|
| Application Core | Laravel (PHP 8) enforcing clinical workflows, policies, and audit trails |
| Web Interface | Server-rendered Laravel Blade views for patient, clinician, and admin portals |
| Database Layer | MySQL (RDS) storing schedules, bookings, intake metadata, and audit logs |
| Cloud Infrastructure | AWS EC2/ECS, RDS, KMS encryption keys, and private VPC networking |
| Document Storage | Amazon S3 private buckets with KMS encryption and short-TTL pre-signed URLs |
| Payment Processing | Stripe PaymentIntents with pre-authorization, capture, and refund webhooks |
| Virtual Consultations | Twilio Programmable Video rooms with per-visit participant access tokens |
| Appointment Alerts | Twilio Programmable SMS for booking confirmations and 15-minute reminders |
Engineering Trade-offs & Solutions
| Challenge | Architectural Solution |
|---|---|
| Concurrent booking race conditions on popular specialists | MySQL unique slot-reservation constraint paired with short-hold checkout locks inside transactional booking services |
| Sensitive medical files lingering on web servers | Direct browser-to-S3 KMS-encrypted uploads combined with short-TTL pre-signed read URLs gated by Laravel policy checks |
| Refunds and disputes on cancelled appointments | Stripe manual-capture PaymentIntents holding funds at booking and capturing only after verified consultation completion |
| Confusion across patient and clinician timezones | Canonical UTC persistence in MySQL with explicit timezone rendering across Blade scheduling views and Twilio SMS reminders |
| Unauthorized entry into active video visits | Short-lived, room-specific Twilio Video access tokens issued server-side only to verified appointment participants |
Security & Reliability
Clinical data protection governs every boundary of the platform. Application servers run inside private AWS subnets with MySQL RDS encrypted at rest and automated backups replicated across availability zones. Laravel policies verify ownership on every appointment, intake file, and clinical note route, eliminating insecure direct object references. Stripe webhooks validate HMAC signatures before updating payment statuses, and Twilio room completion callbacks synchronize visit durations to billing records automatically. Comprehensive audit logs capture login events, consultation state transitions, and pre-signed S3 URL issuances without logging sensitive medical payloads in plain text. Regular dependency patching and strict Content Security Policy headers further harden patient and clinician browser sessions against cross-site scripting or token exfiltration.
Performance & Scale
Server-rendered Blade templates keep page weight minimal and ensure patients on modest connections reach booking confirmation and video waiting rooms reliably. Clinician availability calendars precompute open slot windows cleanly via indexed MySQL range queries rather than scanning historical bookings on every search, while recurring clinic templates expand asynchronously in background jobs whenever practitioners adjust weekly hours. Offloading document transfers directly to Amazon S3 and media streams directly to Twilio Video infrastructure ensures PHP workers handle high scheduling concurrency without bandwidth saturation or memory bloat.
Operational Outcomes
Consolidating scheduling, encrypted intake files, Stripe billing, and Twilio video inside one Laravel platform removed the fragile manual handoffs that previously strained clinic coordinators. Clinicians conduct virtual visits from an organized queue with immediate access to verified patient uploads and structured note-taking. Patients experience dependable, browser-ready appointments from booking through post-visit follow-up without downloading separate apps, juggling external calendar invites, or sharing sensitive records over unsecured channels.