A UAE-based manpower firm managing 178+ employees across 6 companies needed to track visas, Emirates IDs, work permits, and ILOE insurance — each with their own UAE-mandated fine schedules and grace periods. Spreadsheets were missing expiry dates and accumulating fines without anyone noticing.
Go + Chi backend with 50+ REST APIs — multi-tenant architecture where a company_owner's JWT scope silently filters every query. No cross-company data leak is possible, even with a crafted URL.
UAE document compliance engine written as a pure-function package: ComputeStatus(expiryDate, graceDays, alertDays, docNumber, now) returns one of 5 statuses at read time. Status is never stored — no cron drift, always accurate, trivially unit-testable with an injected now parameter.
Fine calculation covers all UAE document types: Emirates ID at AED 20/day capped at AED 1,000, Work Permit AED 500 one-time, ILOE Insurance AED 400 one-time — all configurable per-company through an admin UI.
Deployed with multi-stage Docker on Render, Neon PostgreSQL, Cloudflare R2 for file uploads, and graceful shutdown with a 5-second drain window. Background goroutines handle compliance notifications while the process is alive; a daily digest endpoint is the reliable trigger in production.
Live in production — serving a UAE client with 178+ employees across 6 companies. Compliance dashboards show accurate, real-time document status with no staleness. Zero missed fine alerts since deployment.