Skip to content

Architecture

OpenEdge is a Cloudflare-native SaaS platform. The gateway, console, storage, database, and scheduled jobs are built from managed edge components.

Runtime Components

ComponentCloudflare productRole
API GatewayWorkersRoutes service APIs, authenticates callers, checks billing, and applies rate limits.
ConsolePagesHosts the React dashboard used by customers and operators.
DatabaseD1Stores users, API keys, services, billing records, connected accounts, and orders.
Media storageR2Stores permanent media or file-service objects.
CoordinationDurable ObjectsSupports rate limiting and chat room coordination.
JobsCron TriggersCleans expired auth rows and processes stale TRON lease/refund states.
AnalyticsAnalytics EngineRecords gateway usage and service-level metrics.

Request Flow

text
Client
  -> Cloudflare Worker gateway
  -> Auth and scope check
  -> Rate limit check
  -> Service instance lookup
  -> Balance / cost guard
  -> Service-specific handler or bound Worker
  -> Usage log and billing transaction

Service Instances

Each customer can create multiple instances of the same service by alias. Examples:

text
/v1/apps/ai/default/chat
/v1/apps/ai/coding/chat
/v1/apps/webhook-push/ops/send
/v1/apps/tron/lease

Aliases allow one team to separate production, testing, cost center, provider, and workflow configuration without deploying new Workers.

Connected Accounts

Connected Accounts are a platform-level credential vault. A service instance stores a reference such as:

json
{
  "connected_account_id": "conn_..."
}

At runtime, the gateway checks ownership, status, provider type, and encryption before decrypting credentials for the request. Secrets are not returned in console responses or logs.

Data Safety Principles

  • API keys are hashed.
  • Provider keys and bot tokens are encrypted with CONFIG_ENCRYPTION_KEY.
  • External URLs are validated to reduce SSRF risk.
  • Paid operations write transactions.
  • Failed paid work is refunded when the service can prove no value was delivered.