lthn.io/app/Core/Front/Web/Middleware/CLAUDE.md
Claude 41a90cbff8
feat: lthn.io API serving live chain data
Fixed: basePath self→static binding, namespace detection, event wiring,
SQLite cache, file cache driver. All Mod Boot classes converted to
$listens pattern for lifecycle event discovery.

Working endpoints:
- /v1/explorer/info — live chain height, difficulty, aliases
- /v1/explorer/stats — formatted chain statistics
- /v1/names/directory — alias directory grouped by type
- /v1/names/available/{name} — name availability check
- /v1/names/lookup/{name} — name details

Co-Authored-By: Charon <charon@lethean.io>
2026-04-03 17:17:42 +01:00

795 B

Front/Web/Middleware

HTTP middleware for public web requests.

Files

  • FindDomainRecord.php -- Resolves the current workspace from the incoming domain. Sets workspace_model and workspace attributes on the request. Core domains (base domain, www, localhost) pass through. Checks custom domains first, then subdomain slugs. Requires Core\Tenant module.
  • RedirectIfAuthenticated.php -- Redirects logged-in users away from guest-only pages (e.g., login). Redirects to / on the current domain instead of a global dashboard route.
  • ResilientSession.php -- Catches session corruption (decryption errors, DB failures) and recovers gracefully by clearing cookies and retrying. Prevents 503 errors from APP_KEY changes or session table issues. Returns JSON for AJAX requests.