liberusoftware/sessions-devices-api
A Laravel/PHP package that provides API endpoints for managing user sessions and devices, helping you list, inspect, and revoke active sessions or registered devices within your application.
Architecture fit. This is a presentation adapter — the outermost ring of a hexagonal/ports-and-adapters design — and it should be read as such. Its job is narrow: expose HTTP endpoints (routes, controllers, form requests, API resources/serializers) over a sessions-and-devices domain supplied by sibling liberusoftware/* packages. It carries little intrinsic business logic, which is good (small blast radius, easy to replace) and bad (near-zero standalone value). If you are not already running the Liberu modular monolith with the corresponding domain and application modules, this package has no independent reason to exist in your stack. Adopt the capability, not necessarily this artifact.
Integration feasibility. Mechanically straightforward for a Laravel application: Composer install, package auto-discovery, a service provider that registers routes, migrations, and container bindings. The friction is entirely in the unknowns. The package publishes no documented contract — no version constraints for Laravel/PHP, no statement of whether routes are auto-registered or publishable, no indication of route prefixes, versioning, or middleware stack. It almost certainly assumes a specific auth guard and a specific User/session model shape from the parent suite. Treat "it installs" and "it works against our auth model" as two separate integration gates, and budget for the second.
Technical risk: high. Five concrete concerns:
NOASSERTION is not a license. There is no SPDX identifier, so no automated compliance tooling can clear it and no lawyer will clear it from the manifest alone. This is a hard gate before any code review, not a paperwork detail.Key questions to resolve before a spike:
liberusoftware/* siblings), and are siblings pinned to stable tags or dev-main?users table?/api/*?Stack fit. Laravel/PHP only, Composer-native. It slots cleanly into a modular monolith that already consumes Liberu modules. In any other architecture — a service-oriented or non-Laravel stack — the adapter is not reusable, and you would be better served writing a thin controller layer against your own domain.
Migration path. Reframe this as greenfield capability work, not a migration. Two viable paths:
Avoid adopting this as a transitive dependency of a meta-package, where an upstream version bump can silently change your auth surface.
Compatibility. Verify explicitly against: Laravel major version matrix, PHP 8.x minor, database engine (migrations written for MySQL often break on Postgres/SQLite), primary key type (int vs UUID/ULID), and session driver (file/redis/database) since device tracking frequently assumes a specific store. Confirm behavior under horizontal scaling — a session adapter that reads local state will misbehave behind a load balancer.
Sequencing.
liberusoftware/* package pulled transitively and their stability flags. This is the real scope, not the adapter.Maintenance. Under Path B you own the code outright — budget ongoing maintenance as a first-class internal component, not a dependency. Under Path A you are exposed to a single maintainer's release cadence with no SLA, no deprecation policy, and a version history that cannot currently be trusted. Either way, plan to re-read this code at every Laravel major upgrade; auth-adjacent adapters are among the first things to break.
Support. There is no support channel, no documentation, no issue history to mine, and no community to escalate to. Internal expertise must be built deliberately: at least two engineers who have read the adapter and its domain contract, or the bus factor transfers to you.
Scaling. The dominant cost is table growth. Sessions and devices scale as users × devices × concurrent sessions, and the adapter will almost certainly not own retention policy. Expect to add: TTL/expiry with a scheduled prune, composite indexes on (user_id, last_seen_at) and (device_id), pagination on any device-listing endpoint, and archival to cold storage. Watch for per-request write amplification — a last_seen_at update on every authenticated request is a common and expensive pattern at scale. If revocation checks are performed per-request, cache them; if they are cached, define the acceptable revocation-latency window explicitly, because that window is a security parameter.
Failure modes to design for:
auth yields 404s; before auth yields 401 storms and confusing client behavior.users/sessions table, especially in production with no rollback path.Ramp-up. With no docs, expect 3–5 engineer days for the spike plus 2–3 days to write the contract tests and harden the middleware, on top of legal review time. The real cost is not the integration; it is the domain knowledge required to know whether the integration is correct.
Recommendation. Do not adopt this as a production dependency on current evidence. The capability is worth having — the opportunity signal is the highest number in the package's profile — but the artifact is not the capability. Clear the license first; if it clears and the Liberu domain modules are already in your stack, vendor and fork the adapter and own it. If the license does not clear, implement an equivalent thin controller layer against your own session/device domain in roughly the same effort, with none of the supply-chain exposure.
How can I help you explore Laravel packages today?