Home / Work / Farabi Clinics ERP
Healthcare · Case study

Farabi Clinics: one admin for bookings, insurance, billing and inventory across branches

An ERP for a multi-branch clinic operation: patient records, bookings, insurance billing, inventory and audit, run from a bilingual (English/Arabic) Next.js staff dashboard on a Laravel API.

Last updated December 2026

Next.js admin dashboard
Laravel 11 API (V1→V2)
MySQL

The problem

A clinic group with several branches has a lot of moving parts. Front desks take walk-ins and booked appointments. Doctors work across services and sometimes across branches. Some patients pay cash, others are billed to insurance. The pharmacy and stores need stock tracked by batch and expiry date, across more than one warehouse.

At Farabi, branch operations ran without a unified booking, insurance and pharmacy backend. The earlier-generation API also needed a full rewrite so it could support multi-tenant, bilingual (English/Arabic) and multi-currency operation. Patching the old API was not going to get there.

What was built

The system is a Laravel 11 API (a V1 to V2 rewrite) behind a Next.js staff dashboard. These are the main modules, as they appear in the live screens.

Admin dashboard. An overview of users, roles and permissions, account activity broken down by role, and a recent system-activity audit feed. Each audit entry shows who did what, from which device and browser, from which IP, and a risk level.

Patients. A patient list with patient class (cash or insurance), status filters, and search by patient ID, name or mobile number. Front-desk staff usually search by phone number, so that search needed to be quick.

Bookings. A booking list showing status and confirmation, channel and type (for example walk-in). Staff can filter by doctor, branch, service, patient and date range. Alongside it sit a waiting list, a calendar view, and the setup screens for services and branches.

Inventory. A stock dashboard across warehouses, with batch tracking, low-stock alerts and expiry alerts. It covers stock adjustments and transfers between locations, vendors and client groups, and the purchasing flow: price offers, purchases and purchase returns.

Billing. Bills by patient showing insurance status and payment status, plus a daily income view for the finance side.

Platform features. A branch switcher, an English/Arabic toggle, and role-based access throughout the app.

Technical approach and stack

  • Backend: Laravel 11 API, rewritten from the earlier generation (V1 → V2).
  • Frontend: Next.js and React admin dashboard.
  • Database: MySQL.
  • Auth: Laravel Sanctum for API authentication.

The architecture is simple on purpose: Next.js admin dashboard ↔ Laravel 11 API ↔ MySQL. The dashboard is a separate front end, so the API is the single source of truth for bookings, billing and stock. Roles and permissions are enforced on the API, not just hidden in the UI.

Challenges solved

Rewriting an API that is in use. A V1 to V2 rewrite of a live clinic system can't stop branches from working. The work covered both the legacy API and the new one, so behaviour could be carried over and checked rather than guessed.

Bilingual and multi-currency from the start. Supporting English and Arabic means more than translated labels. Layouts need to work right-to-left, and data such as service names has to work in both languages. Multi-currency billing has to be designed into the data model early, not bolted on later.

Branch-aware everything. Bookings, stock and income all belong to a branch. The branch switcher and the per-branch filters depend on that being consistent across every module.

Batch and expiry tracking. For pharmacy stock, knowing the quantity isn't enough. Staff need to know which batch it is and when it expires, so alerts can fire before stock goes out of date.

Accountability. In healthcare, it matters who changed what. The audit feed records the user, device, browser, IP and a risk level for system activity.

Outcome

In qualitative terms:

  • Bookings, patients, insurance billing and inventory now run from one admin instead of separate processes per branch.
  • Staff work in English or Arabic from the same dashboard.
  • Managers can see daily income, low stock and expiring batches without pulling separate reports.
  • Admins have an audit trail of system activity by user and role.

Work with me

Need a clinic, healthcare or multi-branch ERP built or rebuilt on Laravel? Hire a Laravel developer or see custom ERP developer.

My role

Contributed substantially to both the legacy API and its full rewrite, and to the Next.js admin dashboard.

Frequently Asked Questions

Can you rewrite an old clinic or ERP API without stopping the business?

Yes. On Farabi I worked on both the legacy API and its V2 rewrite, so existing behaviour could be carried over while the new version was built and rolled out.

Can a Laravel ERP support English and Arabic?

Yes. The Farabi dashboard has an English/Arabic toggle, and the system was rebuilt to support bilingual, multi-currency, multi-branch operation.

Does the system handle insurance and cash patients differently?

Yes. Each patient has a class (cash or insurance), and bills show both insurance status and payment status.