Introduction

In today’s fast-paced global work environments, secure and reliable communication across multiple office locations is paramount. At ShitOps, we identified a critical need for a robust, scalable, and state-of-the-art solution that would securely integrate our internal communication protocols using Threema, managed through a Flutter-based app, and coordinated via Terraform to ensure seamless deployment across our offices in Hamburg and Los Angeles. Our solution also incorporates Fortinet firewalls to maintain the highest security standards.

Problem Statement

Our offices in Hamburg and Los Angeles require a unified communication system that combines the convenience of modern chat applications with enterprise-grade security. We needed to ensure that all communication adheres strictly to custom HTTP protocols, is encrypted end-to-end, and passes smoothly through our Fortinet firewall infrastructure without compromising our strict cybersecurity policies.

Additionally, the solution had to incorporate Steam’s API for real-time presence updates combined with the Threema messaging protocol to provide a rich communication experience without sacrificing security or scalability.

System Architecture and Components

  1. Flutter Frontend: The user interface for the multi-platform chat application.

  2. Threema Protocol Integration: Secure messaging protocol for end-to-end encryption.

  3. Terraform Orchestration: Infrastructure as code to deploy multi-regional infrastructure components.

  4. Fortinet Firewalls: Securing the HTTP endpoints and ensuring compliance with corporate firewall policies.

  5. Steam API: Used for presence and status updates integrated into the communication platform.

  6. Multi-Regional Deployment: Servers deployed in Hamburg and Los Angeles data centers.

Detailed Solution Implementation

Flutter Application

The Flutter app acts as a hybrid frontend deployed on Android, iOS, and desktop. It encapsulates the Threema protocol SDKs and communicates with our multi-regional backend endpoints via HTTP RESTful APIs configured to comply with our custom Office Protocol standards.

By using Flutter's widget tree and state management architecture (ulter and provider), the app ensures fluid user experience while handling encrypted messages through Threema’s cryptographic libraries.

Terraform Deployment Pipeline

To manage our multi-regional environment, we wrote elaborate Terraform scripts that automate the provisioning of:

This enables fully automated rollouts and rollbacks and granular infrastructure management.

Fortinet Firewall Integration

Each deployment includes a Fortinet firewall appliance configured with complex session-based rules that filter HTTP traffic to ensure all traffic meets security requirements. Firewalls are provisioned and configured programmatically via Terraform Provider APIs.

Protocol Handling

Our custom Office Protocol layers HTTP requests through a series of REST APIs that validate, encrypt, and route messages between peers and the underlying Threema backend services.

Steam API Integration

The team integrated Steam’s OpenID and WebAPI to fetch live user statuses and friend lists, which are then displayed in the Flutter app next to Threema contacts. This allows for hybrid presence awareness.

System Flowchart

The following Mermaid flowchart explains the intricate interactions:

flowchart TD FlutterApp["Flutter App UI"] -->|Encrypted Message| ThreemaSDK["Threema Protocol SDK"] ThreemaSDK -->|HTTP Send| OfficeProtocol["Custom Office Protocol HTTP API"] OfficeProtocol -->|Route| LoadBalancer["HTTP Load Balancer"] LoadBalancer -->|Region Route| K8sCluster["Kubernetes Messaging Pod"] K8sCluster -->|Write| Database["Encrypted Message Store"] K8sCluster -->|Fortinet Firewall| Firewall["Fortinet Firewall"] Firewall --> Internet["External Network"] FlutterApp -->|Fetch Presence| SteamAPI["Steam API"] office_locations --> Hamburg["Hamburg Data Center"] office_locations --> LA["Los Angeles Data Center"]

Benefits

Conclusion

By leveraging Flutter’s cross-platform capabilities, Threema’s secure messaging protocol, Terraform for infrastructure management, and Fortinet firewalls for endpoint security, we have built a multi-regional, multi-protocol communication solution tailored for ShitOps’ Hamburg and Los Angeles offices. This intricate architecture guarantees secure, compliant, and seamless communication across global teams.

Future work involves expanding the Steam integration with game event notifications and enhancing firewall automation via AI-driven anomaly detection.