Amine Benamrouche · Projects
← Back to projects

HealthHub — Multi-Tenant Virtual Clinic SaaS

Overview

Healtheshub is a multi-tenant virtual healthcare platform serving medical professionals and clinics across Saudi Arabia. It enables healthcare providers to operate virtual clinics, manage patients and medical records, schedule appointments, conduct online consultations, handle billing, and configure third-party services through their own tenant dashboards.

Explore the platform: healtheshub.net

As the first developer on the project, I worked directly with the product owner to translate business requirements into technical specifications, designing the initial database schema, application modules, authorization model, and REST API structure — and documented the APIs for the frontend developers who joined later.

The platform runs as a shared Laravel application with separate databases for individual clinic tenants, supporting configurable integrations, subscriptions, appointment scheduling, electronic invoicing, and payments.

Key Engineering Contributions

  • Backend architecture: Designed the initial database schema, application modules, REST API structure, and authentication and authorization approach based on the client’s business requirements.
  • Multi-tenant architecture: Implemented database-per-tenant functionality using Stancl Tenancy, including tenant resolution through custom domains and subdomains, tenant-specific database connections, and access-control boundaries.
  • Healthcare scheduling: Developed doctor availability and appointment-booking logic accounting for working hours, appointment durations, breaks, preparation gaps, and conflicts caused by changes to existing schedules.
  • Virtual consultations: Integrated the Zoom SDK/APIs for online consultations, including multi-level account management.
  • Medical records and authorization: Implemented role- and permission-based access control using policies, restricting medical-record access to the doctor assigned to the patient.
  • Payments and electronic invoicing: Integrated payment services including Moyasar, Mada, Tabby, and Tamara, alongside ZATCA-related electronic invoicing and VAT functionality.
  • Tenant-configurable integrations: Implemented functionality allowing tenants to activate and configure supported integrations through their dashboards, including payment and marketing services.
  • Authentication and tenant onboarding: Implemented Passport-based API authentication and an onboarding workflow involving pending registrations, OTP verification, and tenant creation.
  • Subscriptions and commercial features: Developed subscription and package management, trial periods, usage limits, and a flexible coupon system supporting percentage and fixed-amount discounts, usage restrictions, and expiration rules.
  • Administrative workflows and auditing: Implemented temporary administrative support-access workflows and audit logging, alongside role- and permission-based authorization.

Technical Stack

ComponentTechnologies
BackendPHP, Laravel
DatabaseMySQL
Multi-tenancyStancl Tenancy, database per tenant
AuthenticationLaravel Passport
AuthorizationRoles, permissions, policies
API architectureREST APIs
Video consultationsZoom SDK and APIs
PaymentsMoyasar, Mada, Tabby, Tamara
Electronic invoicingZATCA integration
API documentationPostman and API documentation

Live Platform

Explore the platform: healtheshub.net

HealthHub is a proprietary product. This case study describes my contributions without exposing confidential source code, credentials, or patient information.