Skip to content

layeron-hq/layeron

Repository files navigation

Layeron - The Backend Layer on Cloudflare

DEMO  •  DOCUMENTS

Layeron

The Backend Layer on Cloudflare

Layeron is a Cloudflare-native BYOC backend platform. Build one coherent backend app in TypeScript, and Layeron turns it into Workers, routes, bindings, D1, R2, Queues, Durable Objects, Workflows, KV, secrets, logs, and deployment state inside your own Cloudflare account.

BYOC means Bring Your Own Cloudflare. Your runtime resources, user data, execution, and Cloudflare billing stay in your Cloudflare account. Layeron provides the control plane, compiler, orchestrator, SDKs, CLI, dashboard, module system, resource inference, and deployment experience.

Core Idea

Write backend capabilities in application code:

import { backend } from "@layeron/core"
import { realtime, storage } from "@layeron/modules"

const app = backend({
  project: "acme",
  compatibilityDate: "2026-05-23",
})

const files = storage.bucket({ name: "assets" })
const live = realtime({ name: "live", allowAnonymous: true })

app.use(files)
app.use(live)

app.get("/api/health", () => ({ ok: true }))

export default app

Layeron compiles that app into a Cloudflare resource graph and deploys the plan through a deterministic platform pipeline.

User code
  -> AppSpec
  -> Capability graph
  -> RuntimeTopology
  -> Resource graph
  -> Diff
  -> Plan
  -> Apply
  -> Deployment state

Product

  • Capability-first backend authoring: Define routes, modules, jobs, storage, auth, realtime, webhooks, logs, policies, and secrets in code.
  • Cloudflare-native deployment: Layeron lowers backend capabilities into Workers, bindings, D1, R2, Queues, Durable Objects, Workflows, KV, routes, domains, migrations, and deployment metadata.
  • BYOC ownership model: Application runtime, data, and Cloudflare billing stay in the user's Cloudflare account.
  • Single developer experience: One project, one backend app, one SDK, one dashboard, and one deployment model.

Quickstart

Install the CLI:

npm install -g @layeron/cli

Create a project:

layer init my-backend

Run it locally:

cd my-backend
layer dev

Products

Product What it gives your backend
AI Workers AI modules and typed model calls.
Auth Sessions, route identity, and app-level authentication.
Cache Cloudflare Cache, tag invalidation, and runtime cache stats.
Captcha Route-level bot protection and CAPTCHA verification.
Cloudflare Native Direct access to native Cloudflare resources.
D1 Plus Scalable logical D1 stores and shard-aware routing.
Database SQL-backed product state and typed database capabilities.
Email Transactional outbound email and inbound email workflows.
Feature Flags Code-defined flags, targeting, rollouts, and edge config.
Job Durable background jobs, delays, attempts, and retries.
Logs Structured product logs and operational debugging.
Observability Metrics, events, timings, errors, and retained records.
Policy Authorization rules, roles, and tenant-aware access control.
Queue Asynchronous workflows with retry and dead-letter handling.
Realtime Rooms, channels, presence, history, and collaboration state.
Secrets Secret references, injection, hashing, rotation, and dashboard state.
Storage File and object storage on Cloudflare-backed resources.
Vector Vector indexes through Cloudflare Vectorize.
Webhooks Receive, verify, send, replay, and audit webhooks.

Repository

Links