Skip to content

System Overview

What Is Orofi?

[NEEDS TEAM INPUT: 2–3 sentence description of what Orofi is as a product — what it does, who the customers are, and what the platform enables.]

What This Infrastructure Runs

The Orofi platform is a microservices-based application hosted entirely on Google Cloud Platform. The platform consists of:

  • 4 API Gateways — entry points for distinct client types (public users, account users, internal Oro operations, admin dashboard)
  • 4 Core Microservices — independently deployable services handling communication, identity, core monolith logic, and analytics
  • Event streaming via Apache Kafka for asynchronous inter-service communication
  • Document storage via MongoDB (replica set managed by Percona Operator)
  • Relational storage via Cloud SQL MySQL 8.0 (one database per microservice)
  • Caching via Cloud Memorystore Redis (HA configuration)

All workloads run on Google Kubernetes Engine (GKE) inside an Istio service mesh, which provides mTLS between services, traffic management, and observability.

High-Level Architecture

graph TB
    subgraph Internet
        Users[End Users]
        Admin[Admin Users]
        OroOps[Oro Operations]
    end

    subgraph GCP["GCP — orofi-{env}-cloud"]
        subgraph LB["Load Balancer (Static IP)"]
            IstioGW["Istio IngressGateway\noro-gateway"]
        end

        subgraph K8S["GKE Cluster — us-central1-a"]
            subgraph Gateways["API Gateway Layer"]
                GWPub["api-gateway-public"]
                GWAcc["api-gateway-account"]
                GWOro["api-gateway-oro"]
                GWAdmin["api-gateway-admin-dashboard"]
            end

            subgraph Services["Core Services"]
                MSComm["microservice-communication"]
                MSIdent["microservice-identity"]
                MSMono["microservice-monolith"]
                MSAnal["microservice-analytics"]
            end

            subgraph Platform["Platform Services"]
                Kafka["Kafka\n(KRaft, 3 brokers)"]
                Mongo["MongoDB\n(Percona PSMDB)"]
                ArgoCD["ArgoCD"]
                Prom["Prometheus"]
                Grafana["Grafana"]
                Loki["Loki"]
                ESO["External Secrets\nOperator"]
            end
        end

        subgraph Datastores["Managed Services"]
            CloudSQL["Cloud SQL\nMySQL 8.0"]
            Redis["Cloud Memorystore\nRedis HA"]
            SecretMgr["GCP Secret Manager"]
            ArtReg["Artifact Registry"]
        end
    end

    Users -->|HTTPS| IstioGW
    Admin -->|HTTPS| IstioGW
    OroOps -->|HTTPS| IstioGW

    IstioGW --> GWPub
    IstioGW --> GWAcc
    IstioGW --> GWOro
    IstioGW --> GWAdmin

    GWPub -->|mTLS| MSIdent
    GWPub -->|mTLS| MSMono
    GWAcc -->|mTLS| MSIdent
    GWAcc -->|mTLS| MSMono
    GWOro -->|mTLS| MSMono
    GWAdmin -->|mTLS| MSAnal

    MSComm --> Kafka
    MSIdent --> Kafka
    MSMono --> Kafka
    MSAnal --> Kafka

    MSComm --> CloudSQL
    MSIdent --> CloudSQL
    MSMono --> CloudSQL
    MSAnal --> CloudSQL

    MSComm --> Redis
    MSIdent --> Redis
    MSMono --> Redis
    MSAnal --> Redis

    MSMono --> Mongo
    MSIdent --> Mongo

    ESO --> SecretMgr
    ESO -->|syncs secrets to K8s| Services

Platform Boundaries

Layer Technology Responsibility
DNS & TLS termination Cloud DNS + Let's Encrypt via cert-manager Resolve *.orofi.xyz domains, terminate TLS at Istio gateway
Ingress & traffic management Istio IngressGateway + VirtualServices Route requests to correct gateway service
Service-to-service auth Istio mTLS (PeerAuthentication) Encrypt and authenticate all internal traffic
Application workloads GKE (Kubernetes) Run all microservices, tools, and platform components
Relational data Cloud SQL MySQL 8.0 Per-microservice isolated databases
Document data MongoDB (Percona PSMDB) Shared document store
Event streaming Kafka (KRaft mode, Bitnami) Async inter-service events
Caching Cloud Memorystore Redis Session cache, hot data
Secrets GCP Secret Manager + ESO Single source of truth for credentials
GitOps ArgoCD Continuous deployment from Git
Infrastructure Terraform + Terragrunt Provision and manage all GCP resources
Observability Prometheus + Grafana + Loki Metrics, dashboards, logs
CI/CD Bitbucket Pipelines Build, test, push container images

Key Design Principles

  1. Environment parity — Dev, staging, and production use the same Terraform modules and Kubernetes manifests. The only differences are resource sizes and replica counts.
  2. GitOps — All Kubernetes state is declared in Git. ArgoCD is the only actor that applies changes to the cluster.
  3. Least-privilege secrets — Every microservice has its own GCP service account and its own database user. No service shares credentials with another.
  4. Zero-trust networking (Dev) — The dev cluster denies all external traffic by default and only allows known IP ranges.
  5. mTLS everywhere inside the cluster — Istio enforces mutual TLS between all workloads in the mesh.
  6. External Secrets Operator — Kubernetes secrets are never committed to Git. They are populated at runtime by syncing from GCP Secret Manager.