Blog

What is Base, and why we built it

The one object that is your worker, and why a framework should hand you the pieces already fitted.

Thesis
AhraTuesday, July 21, 2026 at 11:31 PM PDT

Why Cloudflare

Not just a runtime. A platform your worker, database, queue, and storage all live on together.

Thesis
AhraTuesday, July 21, 2026 at 11:29 PM PDT

Why TypeScript

Types are the contract that keeps decorators honest and carries a shape across every boundary.

Thesis
AhraTuesday, July 21, 2026 at 11:27 PM PDT

Decorators in Base, what, why, and how

The vocabulary you decorate your classes with, and how the framework reads them to wire your worker.

Foundations
AhraTuesday, July 21, 2026 at 11:21 PM PDT

Base modules: what, why, and how

The composition unit: a self-contained slice that brings its own services and settings to a worker.

Foundations
AhraTuesday, July 21, 2026 at 11:19 PM PDT

How to make a REST endpoint in Base

Router decorators that turn a class method into an HTTP route, with the request bound for you.

Building APIs
AhraTuesday, July 21, 2026 at 11:17 PM PDT

How to make a GraphQL worker in Base

A code-first GraphQL server where your decorated classes are the schema, no separate SDL to sync.

Building APIs
AhraTuesday, July 21, 2026 at 11:15 PM PDT

How to use RPC in Base

Call a service method like it is local, and let the framework carry the call across the wire.

Building APIs
AhraTuesday, July 21, 2026 at 11:13 PM PDT

How to use the RequestContext in Base

The per-request object that carries what a handler needs, reached the framework way through injection.

Building APIs
AhraTuesday, July 21, 2026 at 11:07 PM PDT

How to write middleware in Base

The work around your handlers, split by timing: global before the handler is known, handler after.

Building APIs
AhraTuesday, July 21, 2026 at 11:05 PM PDT

How to use the ORM in Base

A first-class relational layer built on Drizzle, entities and repositories reached like everything else.

Data
AhraTuesday, July 21, 2026 at 11:03 PM PDT

How validation works in Base

The Verify decorator family that checks your inputs at the edge before your logic ever sees them.

Data
AhraTuesday, July 21, 2026 at 11:01 PM PDT

The Serialization API in Base

How a shape becomes bytes on the wire and back again, consistently across REST and RPC.

Data
AhraTuesday, July 21, 2026 at 10:59 PM PDT

Serialization vs validation in Base

Two jobs people conflate: one shapes data crossing a boundary, the other decides if it is allowed.

Data
AhraTuesday, July 21, 2026 at 10:57 PM PDT

How to do encryption in Base

The cryptography surface for protecting data at rest and in transit, without hand-rolling the hard parts.

Data
AhraTuesday, July 21, 2026 at 10:55 PM PDT

How to use Cloudflare R2 in Base

Object storage behind an S3-compatible interface: declare a bucket once, reach the store by injection.

Cloudflare
AhraTuesday, July 21, 2026 at 10:53 PM PDT

How to use Cloudflare KV in Base

Edge key-value storage for read-heavy, write-light data, and the caching pattern it is built for.

Cloudflare
AhraTuesday, July 21, 2026 at 10:51 PM PDT

How to use Cloudflare Queues in Base

A typed handoff between two workers: a producer submits and returns, a consumer chews the backlog.

Cloudflare
AhraTuesday, July 21, 2026 at 10:49 PM PDT

How websockets work in Base

Live two-way connections that tie into durable objects and RPC, so a socket call stays typed.

Cloudflare
AhraTuesday, July 21, 2026 at 10:39 PM PDT

How to use the EventBus in Base

Emit an event, let listeners react, and keep the code that causes from the code that responds.

Eventing
AhraTuesday, July 21, 2026 at 10:37 PM PDT

Testing in Base

Jest plus worker-shaped helpers, and the two altitudes every healthy test suite is built from.

Testing
AhraTuesday, July 21, 2026 at 10:35 PM PDT

How to test modules in Base

Test a module in isolation, letting dependency injection resolve the service in a fresh scope.

Testing
AhraTuesday, July 21, 2026 at 10:33 PM PDT

Integration testing in Base

Stand up the worker and hit its real surface, proving the routing, decorators, and wiring together.

Testing
AhraTuesday, July 21, 2026 at 10:31 PM PDT

How to deploy a Base project

Ship a Base worker to Cloudflare, with one description that runs across environments and platforms.

Deploy
AhraTuesday, July 21, 2026 at 10:27 PM PDT

GraphQL type sharing in Base

One decorated class that is both your TypeScript type and your GraphQL type, so they cannot drift.

Advanced
AhraTuesday, July 21, 2026 at 10:23 PM PDT

Advanced RPC type sharing in Base

The server interface is the client contract, shared as a type, so no codegen and no drift.

Advanced
AhraTuesday, July 21, 2026 at 10:21 PM PDT