ZarST
Digitizing the infrastructure a city depends on.
In plain words
- What it is
- The working system of a city water utility: records of subscribers and apartments, the water network, requests and the work of field crews.
- Who it’s for
- The utility’s staff — about 220 people in 15 departments, from dispatchers to crews out in the field.
- What it gives
- What used to live on paper and in separate departments is now in one system. Crews get requests on their phones, and the app works even in a basement with no signal. Requests also arrive through Telegram bots.
ZarST is the digital management platform of a municipal water utility. It brings the enterprise, its subscribers, its water network and its field workforce into one system — with web, mobile and Telegram interfaces, GIS maps and GPS tracking.
Business context
Suv taʼminot is the municipal water utility of Zarafshan: ≈220 employees in 15 departments, a city-wide water network and thousands of subscribers. Before the system, work ran on paper, phone calls and scattered Excel files.
The problem
A water utility operates physical infrastructure across an entire city, but its knowledge is often spread between paper records, departments and people in the field. Without a single system it is hard to see the network, coordinate crews and serve subscribers quickly.
The solution
A unified ERP with a Next.js management console, React Native field applications that keep working without connectivity, Telegram bots and an interactive GIS layer. Assets, subscribers, employees and field operations share one source of truth.
What I built
Sole developer at the utility — architecture, code and production. Requirements came from the utility’s departments.
Architecture
- DDD layout: Domain, Application, Infrastructure, Interfaces
- A role model with 80+ permissions split by department and manager
- Offline-first sync between the field app and the backend
Backend
- Laravel 13 / PHP 8.4 API for the console, the mobile app and three Telegram bots
- Dispatch requests, the building and apartment registry, business customers, wells, HR and warehouse
- Water balance “supplied → billed → losses” from 200,000+ billing rows
Frontend & apps
- Next.js 16 management console with GIS maps and GPS monitoring
- React Native 0.85 field app: GPS shifts, photo reports, map-bound objects
APIs & integrations
- City request platform over API
- Data exchange with the billing system
- Hikvision entry terminals over ISAPI for biometric time tracking
- Three Telegram bots
Database
- MySQL: 464 buildings, 22,000 apartments, 557 business customers, 845 wells
- Server-side pagination, no N+1 queries, ETag caching — key screens 3–15× faster
Security
- Closed security-audit findings: an exposed secrets file, missing authorization on HR endpoints, tokens in localStorage
- Every secret rotated; CSP and HttpOnly-cookie authentication
- End-to-end audit log and error monitoring
Delivery & operations
- ~900 backend and 130+ frontend tests, PHPStan as a mandatory gate
- Production deployment and support
- Google Play release: AAB signing, privacy policy, background-location justification
Engineering deep dive: Offline field sync
- A field worker starts a GPS-tracked shift, takes photo reports and adds objects to the map.
- Without signal everything stays in a queue on the device — basements and wells lose nothing.
- When the network returns, the app sends the queued batch to the sync API.
- The Interfaces layer authenticates the worker and checks the permissions of the role model.
- Domain rules validate the data; it is stored in MySQL and written to the audit log.
- Managers see crews on the GPS monitoring map and in reports in the Next.js console.
Technical decisions & trade-offs
- DDD layers — Business rules live in Domain and Application; HTTP, persistence and adapters stay outside. (Trade-off: More code than plain MVC — but rules change without touching delivery code and are tested in isolation.)
- One backend, three kinds of clients — The console, the field app and the bots share one API and one permission model. (Trade-off: API changes must stay compatible with app versions already installed on phones.)
- A queue on the device — Field work is written locally first and synced when the network returns. (Trade-off: The office sees field data with a delay — but nothing is lost when crews are underground.)
- Measure, then optimize — Slow screens were profiled and fixed at the cause: server-side pagination, no N+1 queries, ETag caching. (Trade-off: Optimizations add code paths to keep correct; tests and PHPStan guard them.)
Core modules
- Enterprise management
- Subscriber management
- Water infrastructure management
- Employee management
- GIS & interactive maps
- Field workforce management
- GPS tracking
- Mobile applications
- Offline-first workflows
- Telegram bots
- Digital twin development
Results
- ≈220 employees in 15 departments work in one system
- ~1,000 dispatch requests, 464 buildings, 22,000 apartments and 845 wells digitized
- 200,000+ billing rows imported — the water balance is calculated automatically
- Key screens 3–15× faster (request archive 328 → 44 ms)
- ~900 backend and 130+ frontend tests, PHPStan as a gate
- Field app published on Google Play
- Figures as of November 2026, from my resume
zarst.uz
Boburbek