The GOSI & Qiwa integration layer (plus Mudad), multi-tenant architecture, and an honest breakdown of what's built vs. planned.
ComplyKSA is a multi-tenant SaaS for Saudi HR & payroll compliance — GOSI (social insurance), Qiwa (labor market platform) and Mudad (wage protection) — designed to be sellable standalone or as a cross-sell add-on to an existing ERP.
ComplyKSA is genuinely early-stage. This page describes exactly what's built today versus what's only specified — read the Status section before assuming a feature exists.
| Layer | Technology |
|---|---|
| Backend | Laravel, PHP 8.3+, Sanctum (SPA cookie auth), SQLite for local dev |
| Frontend | React, Vite, TypeScript, Tailwind v4 |
| HTTP client | axios, react-router-dom |
The multi-tenant foundation is built first, on purpose: tenants, establishments and users (with a tenant_id and role on each user) plus an integration_credentials table for per-tenant government API credentials. A shared API response envelope (App\Http\ApiResponds) is used consistently by both the driver layer and the HTTP controllers, so every endpoint returns data in the same shape.
The two systems every Saudi employer answers to — GOSI and Qiwa — plus Mudad for wage protection, are each modeled as their own interface: GosiApiInterface, QiwaApiInterface, MudadApiInterface. All three have a mock driver returning fixture data today, so the app is fully demoable without live government credentials. All three drivers swap at once via a single environment variable:
KSA_API_DRIVER=mock # or: live
The wiring lives in app/Providers/KsaIntegrationServiceProvider.php. This means the rest of the application — controllers, frontend, tests — is written against the interface, not the mock, so switching to real GOSI/Qiwa/Mudad credentials later doesn't require touching application code.
Backend (served at http://127.0.0.1:8000):
cd backend
composer install
cp .env.example .env # already has KSA_API_DRIVER=mock
php artisan key:generate
php artisan migrate
php artisan serve
Frontend (served at http://localhost:5173):
cd frontend
npm install
cp .env.example .env
npm run dev
Opening the frontend calls the backend's /api/health endpoint and shows the mock GOSI/Qiwa/Mudad driver status — confirming the two apps are wired together correctly.
What's built so far (Epic A + Epic B):
What's specified in detail but not yet built (Epic C onward):
See the product page for a summary, or contact us to be notified as modules ship.
Reach out and we'll answer directly, or update this page.