
Ekohort
e-Kohort is a health records system used by district and provincial health offices in Indonesia to track population health data, reproductive health (Kespro) services, and pre-marital health screening (Kescatin). The original application was a large PHP CodeIgniter monolith. I rebuilt it as e-Kohort Next: a Go REST backend and a Next.js frontend, running in Docker. The new app works against the existing production MySQL databases, so the legacy app and the new app ran side by side during migration with no data migration downtime. The backend handles multi-tenant access (each district has its own database), role-based menus and permissions, and signed session cookies. It also keeps the legacy REST APIs (v2 with API keys, v3 with JWT) wire-compatible, so the existing Kescatin mobile app kept working without an update. The frontend provides dashboards, data tables, reports, and long-running exports. It also pulls family-planning service history from the national BKKBN SIGA API by national ID number. I also handled production deployment: Docker Compose, nginx reverse proxy, firewall rules, and server hardening. Because the new stack runs no PHP, the webshell-style attacks that affected the legacy app cannot run on it.
Key Features
- Reproductive health (Kespro) dashboard with multiple analytic sections
- Population registry with compact list view and per-person history modal
- Pre-marital health screening (Kescatin) module with dropdown filters
- Family-planning history pulled live from the national BKKBN SIGA API by NIK
- Province-level Kespro export as a background job queue with a results list and refresh
- Multi-tenant access: each district database isolated via signed session data
- Role-based menus and permissions shared with the legacy system
- Backward-compatible REST APIs (v2 API key
- v3 JWT) for the existing mobile app
- Searchable Select2-style dropdowns for province and district on login
- Secure auth: HMAC-signed HttpOnly cookies
- login rate limiting
- legacy password compatibility
- Avatar upload with file-type checks based on file content
- Stackable modal system where Esc closes only the top modal
- Dockerized deployment with health checks and non-root containers behind nginx