01Problem and context
Kazakhstan's social-services portal serves citizens with disabilities, the organisations that help them and the ministry that pays for and controls that help. Its product lines share one codebase: PSU (social services — rehabilitation aids, sanatorium and inpatient orders, social taxi, organisation budgets), MSU (medical-social services — staff schedules, expertise protocols, work-completion acts sent to the ministry's e-Sobes system) and provider licensing (licence commission, provider registry, act monitoring, independent experts). Documents are signed with the national e-signature and are legally binding.
02Constraints
- aLegally binding documents: after an NCALayer signature a document must not change.
- bBilingual UI (Russian and Kazakh) everywhere, plus a low-vision accessibility mode.
- cA large, changing team on one Angular codebase with two UI libraries in use at the same time (ng-zorro and PrimeNG).
- dFrequent releases to a national audience with separate test and production branches.
03My role
I joined as a frontend developer and took over frontend leadership within the first month. I designed and launched the MSU product line from scratch in 2025, gathering its requirements directly from Ministry stakeholders. I built licensing modules (licence commission, act monitoring, provider registry, expert cabinet) and the organisation-budgets module, and owned code review and production releases for the team. I mentored 6 developers — one was promoted from junior to mid-level — and interviewed frontend candidates. We — 7–10 frontend engineers with backend, analysts and the ministry — built the rest of the portal.
04Decisions and why
- Decision
- One HTTP interceptor layer for language, auth and notifications (Angular 17).
- Why
- Every request needed the same headers, error handling and toasts; one place to change them.
- Rejected
- Repeating the same logic in each service and component.
- Decision
- Lock the UI after a legally binding signature — route guards plus disabled forms — while the server also rejects changes to a signed document.
- Why
- A signed document must stay as signed; users should see that it is locked instead of editing a form that can no longer change.
- Rejected
- Leaving signed forms editable and failing at submit.
- Decision
- Migrate from ng-zorro to PrimeNG component by component (modals, dialogs, notifications first).
- Why
- Two UI libraries in one app gave users inconsistent behaviour; an incremental path kept releases going. 50+ components moved and the bundle shrank by ~25%.
- Rejected
- A big-bang UI rewrite.
- Decision
- One code standard — ESLint and Prettier applied to 780+ files in a single sweep.
- Why
- A mixed style slowed every review; one pass made reviews about logic, not formatting.
- Rejected
- Fixing style file by file as people touched them.
05Figures
06Tradeoffs and what went wrong
The incremental UI migration meant both libraries lived side by side for a while. The single formatting sweep made git blame noisier. Parts of the codebase stayed on older Angular versions.
07Quality
- Releases
- Separate test and production branches, cherry-picks and a rollback strategy for hotfixes; ~300 merges reviewed before production.
- Realtime
- Real-time notifications moved to rx-stomp 2 and stompjs 7, with the connection errors fixed along the way.
- Validation
- BIN/IIN input validation removed a whole class of identifier errors.
- Access
- WCAG-based low-vision accessibility mode and a full RU/KK interface with centralised i18n pipes.
- Testing
- No automated test suite on this codebase. Every change went through code review and the test branch before production, with a rollback path for hotfixes.
08Result in numbers
09What I'd do differently
- Introduce automated tests for the signing and act flows from the start.
- Start the UI-library migration before the codebase grew.
- Generate a typed API client instead of hand-written services.
10Credits
- Product
- Product and analysts — Ministry of Labour team
- Backend
- Portal backend team
- Frontend
- Team of 7–10, led by me