CONFIDENTIAL • FOUNDER ONLY
Founder Technical Playbook & Master API Registry
Internal technical operations manual, Master API Routing Table, dedicated R2 multi-bucket management rules, GCP Cloud Run scale-to-zero settings, and Cloudflare D1 SQL queries.
⚡ 1. Master API Endpoint Routing Registry
Centralized backend API endpoint routes in `remotion-api/serverless-engine/index.js` and Cloudflare Worker Gateway (`src/index.ts`):
| Method | Endpoint Route | Purpose & Description | Target Console |
|---|---|---|---|
| GET | /health | System health, dedicated storage buckets, & engine status | All Consoles |
| GET | /v1/admin/telemetry | Founder gross revenue, infra cost, & net profit telemetry | /admin |
| POST | /v1/tenants/verify | Approve (VERIFIED) or Suspend (SUSPENDED) SaaS Builders | /admin |
| GET | /v1/tenants/:id/profile | Fetch tenant profile, credits, payout wallet, & MRR growth | /console_saas |
| POST | /v1/checkout/xendit/create-invoice | Xendit $20 Pass Invoice Generator (Geo-Routing: QRIS vs Cards) | /console_saas |
| POST | /v1/payments/polar/create-checkout | Polar.sh B2C Merchant of Record (MoR) Checkout Session | /console_saas |
| POST | /v1/workflows/save | Permanent R2 Save of Visual Workflow Graph (`runnerflo-workflows`) | /console_workflow |
| POST | /v1/workflows/execute | Sequential Pipeline Execution calling Modal GPU & Cloud Run | /console_workflow |
| POST | /v1/functions/deploy | Deploy FaaS Code to Tenant Isolation Registry | /console_functions |
| POST | /v1/functions/execute | Execute FaaS Code inside V8 Isolate Sandbox (128MB RAM) | /console_functions |
| POST | /v1/remotion/render | Trigger GCP Cloud Run MP4 Render (`remotion-4-0-290`) | /console_remotion |
🗄️ 2. Enterprise Dedicated Multi-Bucket Partitioning Rules
Runnerflo separates storage across 4 dedicated buckets to protect FaaS code from auto-deletion:
# Dedicated Multi-Bucket Structuring Matrix:
r2://runnerflo-workflows/{tenant_id}/{workflow_name}.json (PERMANENT - NO DELETE)
r2://runnerflo-videos/{model_id}/{tenant_id}/{timestamp}-{uuid}.mp4 (30-DAY TTL)
r2://runnerflo-audio/{model_id}/{tenant_id}/{timestamp}-{uuid}.wav (7-DAY TTL)
r2://runnerflo-images/{model_id}/{tenant_id}/{timestamp}-{uuid}.png (14-DAY TTL)
☁️ 3. GCP Cloud Run Deployment & Scale-to-Zero Commands
Cloud Run services operate on a Scale-to-Zero ($0 Base Cost) model:
gcloud run deploy remotion-4-0-290-mem2gi-cpu1-0-t300 \
--image asia-southeast1-docker.pkg.dev/runnerflo-infra/remotion-renderer:latest \
--region asia-southeast1 \
--memory 2Gi \
--cpu 1 \
--concurrency 80 \
--allow-unauthenticated