# System architecture

Modular monolith based on Laravel 12. HTTP requests enter web/API routes, pass through authentication and facility/role middleware, reach controllers, Eloquent models and MySQL. Audit events are written by `App\\Support\\Audit`. Blade + Bootstrap deliver responsive server-rendered interfaces. API patient search is authenticated with Sanctum once installed/configured. Facility scope is enforced in controller queries and record checks; expand this into policy-based authorisation before enabling additional modules.
