Search for a command to run...

GeoGuard is an IP geolocation and country-blocking microservice built with .NET 8. Given an IP address, it resolves the country that address belongs to and enforces a configurable block list. It was built as a technical assessment and engineered to production standards: clean architectural boundaries, predictable failure behaviour, and no database in the request path.
Clean Architecture. Geolocation and policy logic sit in the application core; the HTTP layer is a thin shell over it. The domain neither knows nor cares that it is served over an API, which keeps the resolution logic independently testable.
In-memory, thread-safe storage. The geolocation dataset is read-heavy and changes rarely — the profile where a database query per request is pure overhead. Lookups are therefore served from in-memory structures designed for concurrent reads. The trade-off is explicit: memory footprint and a load step at startup, in exchange for lookups that never wait on I/O.
The Result pattern for expected failures. An unparseable IP address or an unknown range is a routine outcome of serving real traffic, not an exceptional one. Such cases return a failure value carrying the reason; exceptions are reserved for defects. Callers handle a closed list of outcomes instead of a catch block.
Two of its positions have carried into my later work. The first is that "no database" is a legitimate architectural decision rather than a missing feature — when the data profile fits memory, the simpler system is the more reliable one. The second is the Result pattern itself, which I have since packaged for mediator pipelines in Hakim.Pipelines and applied in this site's backend: modelling expected failures as values makes error handling read as an enumeration of real cases.
Complete as assessed. The full design breakdown accompanies the project as a long-form article on this site.