Guides

Task-focused recipes for every Base subsystem. Find the job, follow the steps.

How Base Works

What decorators record, when your application is assembled, and what runs on each event.

HTTP

Routes, parameters, validation, headers, middleware, and CORS.

ORM

Entities, relations, migrations, queries, and writes on Drizzle-backed databases.

RPC

The default way to call a Base worker, typed end to end, from the web and between workers.

Dependency Injection

Injectable services, lifetimes and scopes, typed keys, and providers.

Request Context

The per-request view of everything, for reading request state, writing response state, and deferring work.

GraphQL

Typed object and input classes, resolvers, and the schema workflow.

Validation

One validation pipeline for HTTP, GraphQL, and RPC, covering rules, errors, and custom decorators.

Serialization

Typed wire shapes: serializable classes, field options, and transformers.

Testing

Unit tests with plain jest, integration tests against a live worker, and module test suites.

Modules

Package features as reusable modules: settings, dependencies, registration modifiers, and composition.

Storage

KV, R2 object storage, Durable Objects, and containers.

Queues

Produce and process Cloudflare Queue messages with typed envelopes.

Scheduled Tasks

Cron-driven executables, local testing, and Durable Object alarms.

Events

The in-process event bus, with decoupled listeners and immediate or deferred emission.

WebSockets

Socket delegates, authorized upgrades, and Durable Object-backed connections.

Security

Session-based access control and encrypted tokens.

CLI

The base command line, from fundamentals to the development loop and the full command reference.

Deployment

Environments, configuration layering, deploy gates, continuous deployment, and platform targets.

Debugging

Breakpoints against the local runtime, live logs from production.

Logging

Level-gated logging with thresholds, categories, and the request log.