Skip to content
IMPRUTHVI
Healthcare · Full-Stack Developer

Everflex Plus

Healthcare SaaS serving 3,000+ patients with 95% test coverage

Jan 2023 – Sep 2023

3,000+

Patients Served

800ms → 440ms

API Speedup

95%

Test Coverage

500+

Therapists

LaravelReactInertia.jsMySQLAWS EC2AWS SQSRedisLaravel SanctumSupervisorPestCypress

The Challenge

Everflex Plus needed a platform where therapists could manage patient rehabilitation programs, track progress, and communicate — all while meeting healthcare compliance requirements. The existing system was slow (800ms+ API responses) and had no automated testing, making deployments risky.

My Role

I was the primary backend developer, responsible for:

  • API architecture and database schema design
  • Performance optimization (the 800ms → 440ms story)
  • Test suite implementation (0% → 95% coverage)
  • Notification system architecture (SQS + Supervisor) with multi-language support
  • Deployment pipeline on AWS EC2

Technical Decisions

Why Laravel? The team had PHP expertise, and Laravel's ecosystem (Sanctum for auth, Notifications for multi-channel delivery, Eloquent for ORM) meant we could move fast without building infrastructure from scratch.

Why Inertia.js + React? We needed a reactive frontend but couldn't afford the complexity of a fully decoupled SPA. Inertia gave us React components with Laravel's routing and auth — the best of both worlds.

Why SQS? We chose AWS SQS over Redis for the queue backend because:

  1. Reliability — managed infrastructure with built-in dead-letter queues for failed jobs
  2. Per-channel retry — each notification channel retries independently without blocking others
  3. No self-managed broker — SQS scales automatically, no Horizon/Redis tuning required

Why Redis? We kept Redis as the caching layer:

  1. Query caching for frequently-accessed patient lists

The Performance Story

The original API responded in ~800ms for the core "patient list" endpoint. I profiled and found three issues:

  1. N+1 queries: The patient list loaded related therapists, programs, and sessions without eager loading. Fixed with ->with(['therapist', 'programs.sessions']).

  2. Missing indexes: The patients table had no composite index on (therapist_id, status). Added MySQL composite index.

  3. No caching: The therapist dashboard hit the database on every page load. Added Redis cache with 5-minute TTL for dashboard aggregates.

Result: 800ms → 440ms (45% reduction). The dashboard endpoint dropped to ~120ms with cache hits.

Notification Architecture

We used Laravel's Notification system with a fan-out pattern — one event dispatches a single job to SQS, which then fans out to independent channels:

Event (e.g., SessionCompleted)
  │
  ▼
SendSessionNotification (Job) ──▶ SQS Queue
  │
  ▼
Laravel Notification via() returns channels
  │
  ├──▶ DatabaseChannel     → stores in DB (in-app)
  ├──▶ MailChannel          → sends email via Resend
  ├──▶ FCMChannel           → Android + iOS push
  ├──▶ WebPushChannel       → browser push
  └──▶ BroadcastChannel     → real-time websocket

Each channel runs as a separate queued job on SQS. If WebPush fails, only WebPush retries — the other channels are unaffected. This gives us fault isolation and independent retry per delivery method.

All notification content is localized via the user's locale preference, so therapists and patients receive messages in their own language.

  • Automated multi-channel workflows (appointment reminders, progress reports, session completions)
  • Real-time notifications for therapists when patients complete sessions
  • Result: 30% increase in user engagement

Testing Strategy

Went from 0% to 95% test coverage:

  • Pest for unit and feature tests (API endpoints, model relationships, services)
  • Cypress for E2E tests (patient registration flow, therapist dashboard)
  • Every PR required passing tests before merge

Key Results

  • Served 3,000+ patients and 500+ therapists with secure, role-based access
  • Reduced API response times from 800ms to 440ms (45% improvement)
  • Achieved 95% test coverage, enabling confident production deploys
  • Built multi-channel notification system with multi-language support, increasing engagement by 30%

Looking for a Laravel developer?

Let's build something great together.