Sidoarjo Super App
A district's public services in one ecosystem — twelve services behind a single Nginx gateway.

Summary
Kabupaten Sidoarjo's digital services consolidated into one platform: citizen portal, permits, digital queueing, complaints, traffic CCTV and an executive dashboard. Six Next.js web apps and six backend services, proxied through one gateway, plus Flutter apps for citizens and field staff.
Metrics
The problem
- !Each agency had its own counter, its own queue and its own system. A citizen needing three services queued three times, in three places.
- !Without a single entry point, every service solved authentication, CORS, rate limiting and TLS for itself — and solved them differently.
- !Queueing is spiky: a morning rush at one popular counter is exactly when the platform must not wobble.
- !The dashboard data came from a government ETL writing into MongoDB, so the read layer had to be correct about missing, string-typed and ambiguous values rather than quietly filling them in.
Approach
What I actually changed, and why.
- 01
One gateway, twelve services
An Nginx reverse proxy is the only thing exposed to the internet. TLS, rate limiting, security headers, CORS and routing live there once; the services stay small. Rate limits are environment-specific — 100 r/s in development, 50 staging, 30 production.
- 02
Split by domain, and by language where it pays
User, permit, ATCS, queue, complaint and dashboard are separate services. The four transactional Laravel services use JWT and role-based access; the queue service and the dashboard read API are Go — Gin, GORM, a single non-root container each, built with golang-migrate.
- 03
Real-time by pub/sub, not polling
The Go queue service publishes events to Redis channels keyed per service; a WebSocket handler fans them out to staff screens and public displays, with Text-to-Speech announcing the called number. The gateway holds WebSocket connections open for 24 hours.
- 04
Write the standard before the service
A dedicated standards repository — expert contexts for Next.js, Laravel and Go, plus API conventions and copy-paste CRUD patterns, roughly ten thousand lines — so services written by different people still return the same response envelope and error shape.
- 05
Three environments, one switch
Every repository ships development, staging and production templates plus a switch script, so promoting a service is one command rather than an afternoon of config archaeology.
Outcome
- ✓One domain — superapp.sidoarjokab.go.id — now fronts the portal, permits, queueing, complaints, CCTV and the executive dashboard.
- ✓Citizens take a queue number, file a complaint and track a permit in a single Flutter app instead of visiting each agency.
- ✓The executive dashboard gives leadership live budget-realisation and tax-revenue views over MongoDB aggregation pipelines, with data-quality endpoints that report bad values instead of hiding them.
- ✓Adding a service is a route file, a template and a deploy — not a new integration project.
Gallery
8 items








Stack
Tags
sidoarjo-super-app