Skip to content

Tech Stack ​

πŸ“š PGDL Architecture: This page covers the technical implementation stack. For the data generation architecture (PGDL, generators, packages), see Architecture Overview.

System Architecture ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    PHONY - ARCHITECTURE                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  ╔═══════════════════════════════════════════════════════════════════╗ β”‚
β”‚  β•‘                      UNIFIED CLI: phony (Foundation)               β•‘ β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  PURPOSE: Single tool for entire workflow (like gh, vercel)       β•‘ β”‚
β”‚  β•‘  LICENSE: MIT (fully open source)                                  β•‘ β”‚
β”‚  β•‘  DISTRIBUTION: Single binary, no dependencies                      β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  OFFLINE (No Auth):                                                β•‘ β”‚
β”‚  β•‘  $ phony train input.txt --locale tr_TR -o names.ngram            β•‘ β”‚
β”‚  β•‘  $ phony train data.csv --column name -o model.ngram              β•‘ β”‚
β”‚  β•‘  $ phony info model.ngram  # Show model metadata                  β•‘ β”‚
β”‚  β•‘  $ phony generate gen.json -n 1000 --seed 42  # Local generation  β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  CLOUD (After: phony login):                                       β•‘ β”‚
β”‚  β•‘  $ phony models push/pull      # Cloud model library              β•‘ β”‚
β”‚  β•‘  $ phony sync                  # Database sync                    β•‘ β”‚
β”‚  β•‘  $ phony mock start/deploy     # Mock API                         β•‘ β”‚
β”‚  β•‘  $ phony generate --count 1M   # Bulk/scale generation (5M/s)     β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  WHY UNIFIED CLI:                                                  β•‘ β”‚
β”‚  β•‘  β€’ Offline-first (train + generate locally, free, no auth)        β•‘ β”‚
β”‚  β•‘  β€’ Progressive disclosure (cloud features unlock with login)      β•‘ β”‚
β”‚  β•‘  β€’ Language-agnostic (PHP dev, Python dev, anyone can use)        β•‘ β”‚
β”‚  β•‘  β€’ Single binary distribution (curl | sh install)                 β•‘ β”‚
β”‚  β•‘  β€’ Same core reused in Cloud backend (Rust)                       β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• β”‚
β”‚                                                                         β”‚
β”‚  ╔═══════════════════════════════════════════════════════════════════╗ β”‚
β”‚  β•‘                      OSS GENERATION LIBRARIES                      β•‘ β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  PURPOSE: Generate data from .ngram models (GENERATION ONLY)       β•‘ β”‚
β”‚  β•‘  APPROACH: Pure native implementation per language                 β•‘ β”‚
β”‚  β•‘  DEVELOPMENT: AI-assisted (AI writes, human reviews)               β•‘ β”‚
β”‚  β•‘  FORMAT: Reads .ngram model format (created by Rust CLI)          β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  TIMELINE:                                                         β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Year 1 Q1-Q2: PHP/Laravel (phonycloud/phony-php)             β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Year 2: Python (phonycloud/phony-python) β˜… Revenue           β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Year 3: TypeScript (@phonycloud/phony) - Optional            β•‘ β”‚
β”‚  β•‘  └── Future: Community contributions for other languages          β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  WHAT OSS PACKAGES DO:                                             β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Load .ngram models (bundled or custom)                       β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Generate data (N-gram weighted random walk)                  β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Deterministic output (seed support)                          β•‘ β”‚
β”‚  β•‘  └── Framework integrations (Laravel, FastAPI, etc.)              β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  WHAT OSS PACKAGES DON'T DO:                                       β•‘ β”‚
β”‚  β•‘  └── Training (use Rust CLI or Phony Cloud instead)               β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  PERFORMANCE: ~10-50K records/sec (good enough for typical use)    β•‘ β”‚
β”‚  β•‘  MAINTENANCE: Community can maintain non-PHP implementations       β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• β”‚
β”‚                                                                         β”‚
β”‚  ╔═══════════════════════════════════════════════════════════════════╗ β”‚
β”‚  β•‘                      CLOUD PLATFORM                                β•‘ β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  STACK: Nuxt + Go + Rust (3 languages)                            β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β•‘ β”‚
β”‚  β•‘  β”‚   NUXT      β”‚   β”‚     GO      β”‚   β”‚    RUST     β”‚              β•‘ β”‚
β”‚  β•‘  β”‚  Dashboard  β”‚   β”‚   Engine    β”‚   β”‚    Core     β”‚              β•‘ β”‚
β”‚  β•‘  β”‚             β”‚   β”‚             β”‚   β”‚             β”‚              β•‘ β”‚
β”‚  β•‘  β”‚ β€’ Vue 3     β”‚   β”‚ β€’ DB Sync   β”‚   β”‚ β€’ N-gram    β”‚              β•‘ β”‚
β”‚  β•‘  β”‚ β€’ TypeScriptβ”‚ β†’ β”‚ β€’ Mock API  β”‚ β†’ β”‚ β€’ Train     β”‚              β•‘ β”‚
β”‚  β•‘  β”‚ β€’ Auth      β”‚   β”‚ β€’ Training  β”‚   β”‚ β€’ Generate  β”‚              β•‘ β”‚
β”‚  β•‘  β”‚ β€’ Billing   β”‚   β”‚ β€’ pgx (DB)  β”‚   β”‚ β€’ Model I/O β”‚              β•‘ β”‚
β”‚  β•‘  β”‚             β”‚   β”‚             β”‚   β”‚             β”‚              β•‘ β”‚
β”‚  β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  RUST CORE: phony-core (via crates.io) + cloud FFI, compiled via CGO β•‘ β”‚
β”‚  β•‘  NO LARAVEL: Go handles all backend (sync, API, processing)       β•‘ β”‚
β”‚  β•‘  PERFORMANCE: ~5M records/sec (Rust-powered)                      β•‘ β”‚
β”‚  β•‘  SCALE: TB-level database sync capable                            β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• β”‚
β”‚                                                                         β”‚
β”‚  ╔═══════════════════════════════════════════════════════════════════╗ β”‚
β”‚  β•‘                      MONETIZATION STRATEGY                         β•‘ β”‚
β”‚  ╠═══════════════════════════════════════════════════════════════════╣ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  FREE EVERYWHERE (OSS, MIT):                                       β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Training: CLI + files, full speed, unlimited                  β•‘ β”‚
β”‚  β•‘  └── Generation: CLI + libraries, unlimited β€” never metered        β•‘ β”‚
β”‚  β•‘      (generation is the adoption funnel, not the moat)             β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  MONETIZATION (Cloud, priced per connected data source):           β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Tiers: $0 / $49 / $199 / $599 / Enterprise                    β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Database sync & anonymization (local-first data plane)        β•‘ β”‚
β”‚  β•‘  β”œβ”€β”€ Mock API hosting, snapshots, scheduled jobs                   β•‘ β”‚
β”‚  β•‘  └── Team collaboration, compliance                                β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•‘  KEY INSIGHT:                                                      β•‘ β”‚
β”‚  β•‘  The moat is the prod-data platform (connect DB β†’ detect PII β†’     β•‘ β”‚
β”‚  β•‘  safe, referentially-intact copy) β€” not generation speed.          β•‘ β”‚
β”‚  β•‘                                                                    β•‘ β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• β”‚
β”‚                                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Generation is free and unlimited everywhere; Cloud pricing is per connected data source β€” see Pricing.

Why This Architecture? ​

DecisionRationale
No LaravelGo already handles sync/API; Laravel would be overhead
Nuxt for DashboardVue familiarity (from Inertia), TypeScript, easy deploy
Go for EngineBest DB libraries (pgx), great concurrency, fast HTTP
Rust for CoreMaximum N-gram performance, memory efficiency
Pure native OSSEasy install, no binary deps, community maintainable
AI-assisted devMakes unfamiliar languages feasible
Binary .ngram formatOne documented byte layout; compact, deterministic across runtimes

The .ngram Model Format ​

Models are saved as .ngram files β€” a portable binary format (magic PHNYNG03 + gzip-compressed body) defined normatively in FORMAT.md in the phony-core repository.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    .NGRAM FILE FORMAT                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  FILE STRUCTURE:                                                        β”‚
β”‚  ═══════════════                                                        β”‚
β”‚  .ngram file = 8-byte magic ("PHNYNG03") + gzip-compressed binary body β”‚
β”‚                                                                         β”‚
β”‚  Body (single n-gram order):                                            β”‚
β”‚  β”œβ”€β”€ order, token_type, tokenizer config, metadata                      β”‚
β”‚  β”œβ”€β”€ interned vocab (sorted; index = u32 id)                            β”‚
β”‚  β”œβ”€β”€ opener + transition distributions (LEB128 varint id/weight)        β”‚
β”‚  β”œβ”€β”€ word/sentence/paragraph length distributions                       β”‚
β”‚  └── deduped originals (unique item + count)                            β”‚
β”‚                                                                         β”‚
β”‚  INSPECT:                                                               β”‚
β”‚  $ phony info model.ngram        # metadata                             β”‚
β”‚  $ phony validate model.ngram    # format + integrity                   β”‚
β”‚  $ phony stats model.ngram       # statistics                           β”‚
β”‚                                                                         β”‚
β”‚  WHY THIS FORMAT:                                                       β”‚
β”‚  ════════════════                                                       β”‚
β”‚  βœ“ One documented byte layout β€” readable with plain integer reads       β”‚
β”‚    (LEB128 varints + UTF-8 strings); no schema library, no reflection   β”‚
β”‚  βœ“ Compact: interned vocab + varint weights + gzip                      β”‚
β”‚  βœ“ Deterministic: normative edge ordering β†’ identical sampling          β”‚
β”‚    across runtimes                                                      β”‚
β”‚  βœ“ Fast load: the on-disk layout mirrors the in-memory CSR graph        β”‚
β”‚                                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Detailed specification: the normative byte layout lives in FORMAT.md in the phony-core repository. For the modelling concepts, see N-gram Models Architecture.

Format Versioning ​

The version is carried in the magic string (PHNYNG03). The project is pre-release: readers reject anything not starting with the current magic, and there is no legacy format to support.

Reading Models ​

.ngram files are not ad-hoc JSON β€” they are read through the ngram-core reader, which parses the binary layout (per FORMAT.md) directly into the in-memory graph:

rust
use ngram_core::NgramModel;

let model = NgramModel::load("tr_TR/names.ngram")?;   // validates magic + layout
let names = model.generate_many(/* seed */ 42, /* count */ 10, /* max_len */ 32);

Planned language libraries (PHP first, then JS/Python) will ship the same reader: the fixed byte layout is what makes a dependency-free port possible β€” plain integer reads, no external dependencies.

Timeline ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    IMPLEMENTATION TIMELINE                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                         β”‚
β”‚  YEAR 1 Q1-Q2: FOUNDATION                                               β”‚
β”‚  ═════════════════════════                                              β”‚
β”‚  Week 1-4:  Rust (phony-core + phony-cli)                              β”‚
β”‚             β”œβ”€β”€ phony-core: N-gram algorithms, model I/O               β”‚
β”‚             β”œβ”€β”€ phony-cli: train, generate, info, validate, stats     β”‚
β”‚             β”œβ”€β”€ .ngram format (portable binary, zero dependencies)    β”‚
β”‚             └── Pre-train bundled models (tr_TR, en_US, etc.)          β”‚
β”‚                                                                         β”‚
β”‚  Week 5-10: PHP Generation Library (phonycloud/phony-php)              β”‚
β”‚             β”œβ”€β”€ Load .ngram models (from CLI)                          β”‚
β”‚             β”œβ”€β”€ N-gram generation (native PHP)                         β”‚
β”‚             β”œβ”€β”€ Deterministic seed support                             β”‚
β”‚             └── Pre-trained models bundled                             β”‚
β”‚                                                                         β”‚
β”‚  Week 11-14: Laravel Integration (phonycloud/phony-laravel)            β”‚
β”‚             β”œβ”€β”€ Service provider, facades                              β”‚
β”‚             β”œβ”€β”€ Factory integration                                    β”‚
β”‚             └── Artisan commands                                       β”‚
β”‚                                                                         β”‚
β”‚  YEAR 1 Q3-Q4: CLOUD MVP                                                β”‚
β”‚  ════════════════════════                                               β”‚
β”‚  Week 1-4:  Rust (phony-core + cloud FFI + optimizations)              β”‚
β”‚  Week 5-10: Go Engine (sync, mock API, training orchestration)         β”‚
β”‚  Week 11-16: Nuxt Dashboard (UI, auth, billing)                        β”‚
β”‚  Week 17-20: PHP Cloud SDK (phonycloud/phony-cloud)                    β”‚
β”‚                                                                         β”‚
β”‚  YEAR 2: PYTHON ECOSYSTEM                                               β”‚
β”‚  ═════════════════════════                                              β”‚
β”‚  Q1-Q2: Python Generation Library (pip install phony)                  β”‚
β”‚         β”œβ”€β”€ Load .ngram models                                         β”‚
β”‚         β”œβ”€β”€ N-gram generation (native Python)                          β”‚
β”‚         └── FastAPI/Django integrations                                β”‚
β”‚                                                                         β”‚
β”‚  Q3-Q4: Python Cloud SDK + Advanced Cloud Features                     β”‚
β”‚         β”œβ”€β”€ pip install phony-cloud                                    β”‚
β”‚         β”œβ”€β”€ DB Sync advanced features                                  β”‚
β”‚         └── Mock API stateful mode                                     β”‚
β”‚                                                                         β”‚
β”‚  YEAR 3: TYPESCRIPT + SCALE                                             β”‚
β”‚  ═════════════════════════                                              β”‚
β”‚  Q1-Q2: TypeScript Generation (npm install @phonycloud/phony)          β”‚
β”‚         β”œβ”€β”€ Works in Node.js and browser                               β”‚
β”‚         └── TypeScript Cloud SDK                                       β”‚
β”‚                                                                         β”‚
β”‚  Q3-Q4: Enterprise Features                                             β”‚
β”‚         └── SSO, audit logs, on-premise option                         β”‚
β”‚                                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

VISUAL TIMELINE:
        Q1    Q2    Q3    Q4    Q1    Q2    Q3    Q4    Q1    Q2    Q3
        β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€
YEAR 1  β”‚Rust β”‚ PHP β”‚     Cloud MVP      β”‚
        β”‚ CLI β”‚ Gen β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚
        β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚                    β”‚
        β”‚     β”‚     β”‚                    β”‚
YEAR 2  β”‚                 β”‚ Python Gen  β”‚  Cloud Adv  β”‚
        β”‚                 β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚
        β”‚                 β”‚             β”‚             β”‚
YEAR 3  β”‚                               β”‚ TypeScript  β”‚ Enterprise β”‚
        β”‚                               β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚
        β”‚
πŸ’°      β”‚                 ←─── Revenue Starts ───→│←── Scale ───→

Layer Details ​

Layer 1: Nuxt (TypeScript + Vue) ​

AspectDetail
PurposeWeb dashboard, auth, billing UI
WhyVue familiarity, TypeScript, easy deploy to Vercel
TechNuxt 3, Vue 3, Auth.js, Stripe SDK

Layer 2: Go Engine ​

AspectDetail
PurposeDB sync, Mock API server, training orchestration
WhyGoroutines for concurrency, memory efficiency, fast HTTP
TechGo 1.22+, pgx, go-mysql, asynq

Layer 3: Rust Core ​

AspectDetail
PurposeN-gram train/generate/save/load
WhyMaximum performance for hot path (5M/sec)
TechRust stable, binary .ngram model I/O (gzip via flate2), FFI to Go

Communication Flow ​

Nuxt ──HTTP──► Go Engine ──FFI (CGO)──► Rust Core

AI-Assisted Development ​

Development leverages AI agents for code generation with human review.

What AI Does Well ​

  • Writing isolated modules with clear interfaces
  • Test generation
  • Boilerplate and CRUD operations
  • Documentation
  • Code translation between languages

What Needs Human Expertise ​

  • Architectural decisions
  • Performance optimization strategies
  • Debugging complex issues
  • Security review
  • Production incident response

Language-Specific AI Effectiveness ​

LanguageAI Code QualityReview Difficulty
TypeScriptβ˜…β˜…β˜…β˜…β˜…Easy
Goβ˜…β˜…β˜…β˜…Medium (readable)
Rustβ˜…β˜…β˜…β˜…Hard (lifetimes, borrowing)

Key Insight: AI can write Rust well, but reviewing Rust for correctness requires understanding ownership/borrowing. Go is more forgiving for reviewers.

Phony Cloud β€” Documentation & Specification