Expropriation Management System
A system that follows a municipality’s expropriation projects from the boundary on the map to the payment: project and phase boundaries, parcel and owner cards, valuation, negotiation meetings, contracts, payments and the archive.
- My role
- Full stack · rewrite
- Duration
- Ongoing
- Stack
- Laravel 13 · PostGIS · Leaflet · Geoman · LDAP · Tailwind 4
Problem
In the first version some identifiers were UUIDs and some were integers, dates were stored as text and budget data could not be split by branch. Reports were unreliable and every new feature meant fighting the old data.
Approach
I rewrote the system: identifiers became one type, dates moved to real date columns and the budget was split by branch. Boundaries are drawn with Leaflet and Geoman and stored in PostGIS as MultiPolygon; parcel area is measured as geography. Process state advances through an enum of detection, valuation, negotiation and litigation.
What I'd do differently today
To keep tests fast I wrote the geometry service so that it runs on both PostGIS and SQLite. Thinking about testability up front when pushing spatial code into the database is far cheaper than adding it later.