CaptainPBX Full-Stack Architecture Architecture diagram showing client interfaces, edge security, application services, privileged system agent, persistence, and Asterisk media engine. CAPTAINPBX · PLATFORM ARCHITECTURE A secure, modular communications platform From browser and endpoint access to application services, protected system operations and real-time voice. FULL STACK VIEW 01 CLIENT INTERFACES The access layer for administrators, users and voice endpoints Admin SPAReact · Vite User PortalReact SIP / WebRTC EndpointsDesk phones · Softphones · Browsers 02 OS EDGE & HOST SECURITY Traffic filtering, secure ingress and certificate lifecycle FIREWALL Captain Shieldnftables · allowlisted traffic INGRESS Nginx Reverse ProxyHTTPS routing to application CERTIFICATES Captain TrustACME · TLS certificate management 03 APPLICATION LAYER Runs as the unprivileged captain user Captain CoreSymfony · PHP 8.4 API / LOGIC Product ModulesFeature and domain services captain-jobsBullMQ background workers captain-eventsAMI event pump 04 PRIVILEGED SYSTEM OPERATIONS A narrow, controlled boundary for root-level actions captain-system-agentRoot daemon · Unix socket · allowlisted verbs only ROOT BOUNDARY 05 DATA PERSISTENCE Durable records, event streams and asynchronous queues MariaDBTenant records RedisEvent streams · queues 06 MEDIA ENGINE Runs independently as the asterisk user Asterisk PJSIP EngineSIP signalling · RTP media · call control HTTPS ingress Application API Tenant data Events / queues Solid lines: primary request / service paths Dashed lines: event, control or certificate-related paths CAPTAINPBX