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
| Feature | Description | Documentation |
|---|---|---|
| Database Sync | Connect production DBs, anonymize PII, sync to staging/dev | Database Sync |
| Mock API | Generate dynamic REST APIs from PDL schemas | Mock API |
| Snapshots | Point-in-time data backups with instant restore | Snapshots |
| Package Registry | Publish, discover, and share .phony packages | Package Registry |
Why Cloud?
These features require infrastructure that OSS alone cannot provide:
| Feature | Why Cloud? |
|---|---|
| Database Sync | Secure tunnels to customer DBs, scheduled jobs, PII detection ML |
| Mock API | Hosted endpoints, TLS, rate limiting, global CDN |
| Snapshots | Durable storage, versioning, cross-region replication |
| Package Registry | Search index, access control, download metrics |
Security Model
All cloud features follow these security principles:
- Zero Trust - Every request authenticated, no implicit trust
- Encryption - TLS in transit, AES-256 at rest
- Isolation - Per-tenant data isolation, no cross-contamination
- Audit - Complete audit trail for compliance (SOC2, GDPR)
- Secrets - Connection strings encrypted, rotatable, never logged