🏗️
Lorapok Architecture
The blueprint of a zero-config telemetry engine for modern Laravel applications.
System Philosophy
Lorapok is engineered as a passive instrumentation suite. It hooks into the Laravel request lifecycle using mid-level proxies and event subscribers to collect telemetry without requiring the developer to modify their core business logic.
Core Component Map
graph TD
subgraph "Instrumentation Layer"
MW[Middleware]
EL[Event Listeners]
end
subgraph "Core Engine"
MON[Monitor Singleton]
TS[Timeline Service]
end
subgraph "Analysis Layer"
QA[Query Analyzer]
AT[Achievement Tracker]
end
subgraph "Presentation"
API[JSON API]
WID[Alpine.js Widget]
end
MW --> MON
EL --> MON
MON --> TS
MON --> QA
QA --> AT
WID <--> API
API --> MON
Module Responsibilities
| Module |
Architectural Responsibility |
| Instrumentation |
Automated data capture via Middleware and Service Provider event hooks. |
| Core Engine |
Centralized state management and snapshot serialization. |
| Analyzers |
Pattern matching against SQL queries and security health checks. |
| Terminal |
A secure browser-to-CLI bridge for remote maintenance. |
Security & Privacy
We implement a Multi-Tier Privacy Strategy:
- PrivacyMasker: Automatically identifies and redacts literals from SQL statements to prevent data leakage.
- Environment Guard: Strict environment whitelisting to prevent the widget from loading in non-authorized contexts.
- Command Whitelisting: The terminal feature is restricted to a set of safe commands, preventing arbitrary system access.
Authored By
Mohammad Maizied Hasan Majumder
Senior Software Architect (#MaJHiBhai)