Skip to content

MaxMind-backed GeoLocation service with caching: ASP.NET API, web UI, and client library published behind API Management; deployed with Terraform and GitHub Actions.

License

Notifications You must be signed in to change notification settings

frasermolyneux/geo-location

GeoLocation Service

Build and Test Code Quality Copilot Setup Steps Dependabot Automerge Deploy Dev Deploy Prd Destroy Development Destroy Environment PR Verify

Documentation

Overview

GeoLocation is a .NET 9 workload that fronts MaxMind lookups with an Entra-protected API and caches results in Azure Table Storage to reduce latency and cost. The API exposes two versioned endpoint groups:

  • v1.0: Single/batch hostname/IP lookup, metadata deletion, and API info — cached permanently in the geolocations table
  • v1.1: City and Insights lookups with typed DTOs and MaxMind Anonymizer support — cached in the geolocationsv11 table (city: permanent, insights: configurable TTL)

Both versions enforce the LookupApiUser Entra role. An MVC web front end calls the API using API-key and Entra authentication, handles Cloudflare/X-Forwarded-For headers, and stores the user’s last lookup in session. The API serves its OpenAPI specs at runtime at /openapi/v1.0.json and /openapi/v1.1.json, and infrastructure is managed by Terraform under terraform/. Build versioning uses Nerdbank.GitVersioning.

NuGet Packages

Package Description
MX.GeoLocation.Abstractions.V1 Interfaces and models for the GeoLocation API
MX.GeoLocation.Api.Client.V1 Typed HTTP client with DI registration via AddGeoLocationApiClient()
MX.GeoLocation.Api.Client.Testing In-memory fakes and DTO factory helpers for consumer test projects — see testing docs

Contributing

Please read the contributing guidance; this is a learning and development project.

Security

Please read the security guidance; I am always open to security feedback through email or opening an issue.

About

MaxMind-backed GeoLocation service with caching: ASP.NET API, web UI, and client library published behind API Management; deployed with Terraform and GitHub Actions.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5