Technical Architecture and Infrastructure Manual
1. Deployment Methods
Safe offers full flexibility to adapt to the organisation’s data security policies, allowing processing to be kept wherever it is most efficient.
• On‑premises (100% Local): A dedicated server is installed at each site. All IA processing and video storage remain within the client’s private network, removing any dependency on the cloud for critical operations.


• Hybrid Model: Deployment of Edge Servers at each plant for immediate video processing (AI), reducing latency and bandwidth consumption. These connect to a central point (Private or Public Cloud) that consolidates alerts and reports from multiple sites.
2. Technology Stack Overview
Safe uses a modular architecture based on containerised microservices, allowing agile deployment both on local servers (On-premises) and in hybrid environments. Unlike heavier infrastructures, our native stack removes unnecessary layers of abstraction, maximising hardware performance.

2.1. Client Layer and External Sources
• CLIENT (Browser): Main user interface. Consumes live video and displays events.
• VIDEO SOURCES: IP cameras (via RTSP) or webcams that feed the system from outside.
2.2. Edge Layer
• ENTRY POINT (API Gateway / Reverse Proxy):
· Single entry point for all external traffic (HTTP/HTTPS, WebSockets).
· Responsible for routing requests to the corresponding internal services.
2.3. Services Layer (Backend/Microservices)
• WEB APPLICATION (Core):
· Serves the frontend.
· Provides the REST API for management.
· Handles authentication and authorisation.
· Entity management: users, cameras, streams, events.
· Connects to: Database and Object Storage.
• STREAMING SERVER:
· Video ingestion.
· Video output to the client (HLS/WebRTC).
· Stream protection via token.
• EMAIL SERVER (Optional):
· Sends notifications and alerts by email.
• INFERENCE API (AI):
· Captures video streams from the cameras.
· Performs object detection, pose analysis and tracking.
· Connects to: Message Queue (publishes results).
• REAL-TIME EVENT SERVER:
· Handles WebSocket connections.
· Pushes processed events to the client.
2.4. Processing and Orchestration Layer
• MESSAGE QUEUE:
· Intermediate buffer that receives the raw detections from the AI.
• ORCHESTRATOR (Business brain):
· Consumes detections from the Message Queue.
· Reads camera and zone configuration from the Database.
· Evaluates complex business rules to create events and alarms.
· Manages the state (start/stop) of the analysis per camera.
· Connects to: Database, Object Storage, Event Server (to notify the client) and Email Server.
2.5. Persistence Layer (Storage)
• DATABASE (Relational/Document):
· Stores structured data: Users, Organisations, Camera/Stream/Zone configuration, Event history, Sessions.
• OBJECT STORAGE (Files):
· Stores unstructured data: Event images, user avatars, generated reports.
3. Infrastructure and Deployment
Safe is deployed on Linux systems with Docker Compose, which ensures portability and consistency across environments, and natively on Windows.
3.1. Environment Segregation (SDLC)
To guarantee service stability, Safe development follows a lifecycle (SDLC) with fully isolated runtime environments:
• Development/Test Environment:
Where new analytics or features are validated without affecting the live plant.
• Production Environment:
Configuration optimised for high availability and maximum hardware performance.
3.2. Layer Security
• Network Isolation:
on Linux, containers run on a private internal Docker network, exposing only the necessary services (80/443) through Traefik.
• Access Management:
Administrative access to the infrastructure is carried out through secure protocols such as SSH (puerto 22) with mandatory authentication.
4. Persistence and Recovery Management
• Database (PostgreSQL):
Stores camera configuration, users and historical alert records.
• Object Storage:
Acts as a local S3 repository to store video fragments and evidence of safety breaches.
• Continuity:
In critical setups, data replication is recommended to minimise the Recovery Point (RPO) in the event of hardware failure.
5. Data Segregation and Multi-tenancy
For clients with multiple sites or departments, Safe guarantees full logical security where data is never mixed.
• Unique Tenant ID:
Every system entity (cameras, alerts, recordings and users) is irrevocably linked to a unique client identifier (Tenant ID).
• Automatic Tenancy Filter:
The system automatically applies a filter on every database query or file request; this ensures that a user can only view or manage the resources that strictly belong to their own tenant.
6. High-Availability Video Management
For zero-delay camera viewing, Safe implements a viewer using MediaMTX. This component allows:
• Ingestion:
Receiving IP camera streams via RTSP or browser webcams.
• Multi-format Output:
Dynamic conversion to HLS or WebRTC, enabling smooth viewing in any modern browser with low latency
7. Sub-processors and Compliance Table
In line with our transparency policy, we detail the third-party services used for auxiliary functions and their security certifications.
| Sub-processor / Third Party | Function in the Stack | Data Processed / Transferred | Security Certifications |
|---|---|---|---|
| Cloudflare | CDN, WAF protection and caching of web assets. | Traffic metadata (IP, browser), static assets (JS, CSS). | SOC 2 Type II, ISO 27001, PCI DSS.+1 |
| Resend / SMTP | Sending of alert and diagnostic notifications. | Email addresses, alert content and evidence captures. | SOC 2 Type II, GDPR compliance. |
| PostHog | Usage analytics and user experience. Web demo only | Navigation events, clicks and user identification (optional). | SOC 2, ISO 27001, HIPAA. |
| Vercel Analytics | Performance metrics and Speed Insights. Web demo only | Load times, web vitals metrics and application usage. | SOC 2 Type II, ISO 27001. |
| Sentry | Real-time error monitoring and stability. | Error traces, session context and code failure logs. | SOC 2 Type II, ISO 27001, HIPAA. |
Note for Full On-Premise installations: In 100% local deployments, these services are replaced by the client’s internal services to guarantee full data sovereignty.
Contact and Support
For technical inquiries about hardware compatibility or custom quotes, please contact:
• Technical Support: support@safe.ai
• Sales: commercial@safe.ai

