arcanedev/geo-ip
Laravel package for IP geolocation with a simple, unified API. Supports multiple providers such as MaxMind and IP2Location, letting you look up country, city, coordinates, and other location data from an IP address.
Architecture fit. ARCANEDEV/GeoIP is a thin Laravel 5 wrapper: a service provider, a facade/alias, a published config file, and a driver layer over a GeoIP data source (MaxMind GeoLite2/GeoIP2 .mmdb, and possibly the legacy .dat format). Architecturally it follows the package conventions of its era — container binding, config publishing, facade accessor — so it slots in cleanly if the host app is from that same era. It is not a domain library; it contributes ergonomics around an IP→location lookup and no business logic.
Integration feasibility. For a currently supported Laravel version (9/10/11), integration is a fork-and-rewrite, not an install. Expect composer require to fail on illuminate/support constraints, and expect a cascade of pinned transitive dependencies (an old geoip2/geoip2 client, PHP 7.x-era syntax, old test tooling). The package also predates both Laravel's package auto-discovery and MaxMind's December 2019 GeoLite2 licensing change, so the documented database-download flow almost certainly no longer works as written. Feasible targets: an existing Laravel 5.x app whose lockfile already resolves the graph.
Technical risk. High, and mostly concentrated outside the package's own code:
null or a default, hiding DB-missing and DB-stale conditions behind plausible-looking output.Key questions to answer before deciding.
composer.json constraints on php and illuminate/*, and does the lockfile resolve on our PHP version?Stack fit. Clean only for a Laravel 5.x service. On any supported Laravel, the honest recommendation is to use geoip2/geoip2 (or maxmind-db/reader for raw MMDB access) directly behind a small first-party service and skip the wrapper. The wrapper's entire value is roughly fifty lines of container wiring that can be reproduced in an afternoon. For a low-traffic internal Laravel 5 app already running it, leaving it in place is defensible — but pin it and quarantine it behind an interface.
Migration path.
GeoLocator interface (locate(string $ip): ?Location) with the package-backed implementation behind it. That single seam converts an abandonment risk into a one-file swap.geoip2/geoip2 reading a local MMDB, keep the old binding behind a flag, diff outputs against real traffic for a week, then delete the dependency.Compatibility and sequencing.
geoip2/geoip2, or vendor a minimally patched fork if byte-for-byte behavior must be preserved.Maintenance. You own it. Budget a named fork owner, a constraint review at each Laravel/PHP upgrade, and a recurring dependency-audit line item. The surface is small enough (provider, manager, a couple of drivers) that a fork is tractable — but it is a standing tax on a capability that is otherwise a solved problem.
Support. Effectively zero. Six stars and zero dependents mean no issue triage, no maintainer, and no Stack Overflow corpus. Onboarding requires reading the source, because the README's external references are stale.
Scaling. The local-DB path scales well: MMDB lookups are memory-mapped, sub-millisecond, stateless, and CPU-cheap — they will not be the bottleneck. Real concerns are (a) DB file distribution across N containers, which needs a shared artifact or a baked image layer with a refresh strategy, and (b) cache key cardinality if lookups are memoized per IP, which is unbounded under scanner/bot traffic. Cap and TTL any IP-keyed cache. A remote-driver path should be avoided at scale — it turns a local read into a rate-limited network dependency.
Failure modes to instrument.
127.0.0.1 in local/dev → always null; ensure callers have a sane default.X-Forwarded-For upstream and pass a resolved IP.Ramp-up. The package itself is a half-day read for a mid-level Laravel developer. The real cost is unlearning the stale documentation — plan for someone to independently verify the MaxMind licensing and provisioning path rather than following the README. Net: low code complexity, disproportionate operational overhead for what it delivers.
How can I help you explore Laravel packages today?