Skip to content

Cloud Platform Architecture

Scope: This section covers Phony Cloud platform features - Database Sync, Mock API, Snapshots, and Package Registry. For the core data generation system (PDL, generators, N-gram), see Data Generation Architecture.

Overview

Phony Cloud extends the open-source data generation core with enterprise-grade platform features that require infrastructure, persistence, and coordination.

┌─────────────────────────────────────────────────────────────────────────┐
│                    CLOUD PLATFORM ARCHITECTURE                           │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  ┌─────────────────────────────────────────────────────────────────────┐│
│  │                         NUXT DASHBOARD                               ││
│  │              (Vue 3 + TypeScript + Auth.js + Stripe)                ││
│  └───────────────────────────────┬─────────────────────────────────────┘│
│                                  │ HTTP/gRPC                            │
│  ┌───────────────────────────────▼─────────────────────────────────────┐│
│  │                          GO ENGINE                                   ││
│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌────────────┐ ││
│  │  │   Database  │  │   Mock API  │  │  Snapshot   │  │  Package   │ ││
│  │  │   Sync      │  │   Server    │  │  Manager    │  │  Registry  │ ││
│  │  │             │  │             │  │             │  │            │ ││
│  │  │ • PII Det.  │  │ • Dynamic   │  │ • Storage   │  │ • Search   │ ││
│  │  │ • Transform │  │ • Routing   │  │ • Versioning│  │ • Publish  │ ││
│  │  │ • Streaming │  │ • Caching   │  │ • Restore   │  │ • Scopes   │ ││
│  │  └─────────────┘  └─────────────┘  └─────────────┘  └────────────┘ ││
│  └───────────────────────────────┬─────────────────────────────────────┘│
│                                  │ FFI                                  │
│  ┌───────────────────────────────▼─────────────────────────────────────┐│
│  │                         RUST CORE                                    ││
│  │              (N-gram Engine, 5M records/sec)                        ││
│  └─────────────────────────────────────────────────────────────────────┘│
│                                  │                                      │
│  ┌───────────────────────────────▼─────────────────────────────────────┐│
│  │                       INFRASTRUCTURE                                 ││
│  │  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────────────────┐││
│  │  │PostgreSQL│  │  Redis   │  │   S3     │  │   Customer DBs       │││
│  │  │ (Meta)   │  │ (Queue)  │  │(Storage) │  │ MySQL/PG/SQLite      │││
│  │  └──────────┘  └──────────┘  └──────────┘  └──────────────────────┘││
│  └─────────────────────────────────────────────────────────────────────┘│
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Platform Features

FeatureDescriptionDocumentation
Database SyncConnect production DBs, anonymize PII, sync to staging/devDatabase Sync
Mock APIGenerate dynamic REST APIs from PDL schemasMock API
SnapshotsPoint-in-time data backups with instant restoreSnapshots
Package RegistryPublish, discover, and share .phony packagesPackage Registry

Why Cloud?

These features require infrastructure that OSS alone cannot provide:

FeatureWhy Cloud?
Database SyncSecure tunnels to customer DBs, scheduled jobs, PII detection ML
Mock APIHosted endpoints, TLS, rate limiting, global CDN
SnapshotsDurable storage, versioning, cross-region replication
Package RegistrySearch index, access control, download metrics

Security Model

All cloud features follow these security principles:

  1. Zero Trust - Every request authenticated, no implicit trust
  2. Encryption - TLS in transit, AES-256 at rest
  3. Isolation - Per-tenant data isolation, no cross-contamination
  4. Audit - Complete audit trail for compliance (SOC2, GDPR)
  5. Secrets - Connection strings encrypted, rotatable, never logged

Phony Cloud Platform Specification