Introduction
A modular, plugin-first toolkit for building Deno backends, with an HTTP layer that also runs on Bun, Cloudflare Workers, and Node.js.
Codexa Core targets Deno as its primary runtime, but keeps its HTTP layer runtime neutral by design. Every request handler is a plain function that accepts a standard Request and returns a standard Response. This is what lets the same application run on Bun and Cloudflare Workers unchanged, and on Node.js with a small Fetch API adapter.
Instead of one large bundle, the framework ships as small, focused packages. A project imports only the parts it needs:
- An HTTP layer built on a radix tree router
- An OpenAPI 3.1 generator
- A typed frontend SDK generator powered by OpenAPI route metadata
- Environment and database configuration
- An event bus
- A key value store
- A cache
- A storage manager for local disk, S3, Cloudinary, and ImageKit
- A command line tool, installed and used separately, for pulling plugin source from a Git repository
HTTP
The plugin-first request layer this whole toolkit is built around.
OpenAPI
Generate a real OpenAPI 3.1 document from route metadata.
SDK
Generate a versioned, typed frontend package from documented routes.
Configuration
Typed environment variables, MongoDB, Redis, and storage config.
Store
Memory, Redis, or Deno KV, behind one key value interface.
Plugin first
Every capability in Codexa Core, from a single health check route to a full authentication system, is built as a plugin. A plugin owns its routes, middleware, version header, and lifecycle hooks. It exposes services to other plugins only when it explicitly chooses to.
import { createApp, definePlugin } from '@codexa/core/http';
const healthPlugin = definePlugin({
name: 'health',
setup(scope) {
scope.route({
method: 'GET',
path: '/health',
handler: (ctx) => ctx.json({ ok: true }),
options: { name: 'health.check', tags: ['public', 'health'] },
});
},
});
const app = createApp('api').install(healthPlugin);
Deno.serve(app.dispatch);Another plugin can only reach health if it lists health in dependsOn, and only through whatever health exposes with exposeService. This ownership model keeps a large application predictable as more plugins are added.
See Plugins for the full plugin shape, and Typed Config & Services for how one plugin exposes a typed service to another.
Runs wherever the Fetch API runs
This portability comes from app.dispatch, the single function every runtime hands a request to. Pass it directly to whichever server or platform you deploy to.
Deno.serve(app.dispatch);dispatch also works without a server. Call await app.dispatch(new Request('http://localhost/health')) directly inside a test, a background job, or another framework's route handler.
JSR's own compatibility check confirms this for Node.js, Deno, Bun, and browsers. Cloudflare Workers support is demonstrated in the framework's source, though JSR has not yet run its automated check for that platform.
Subpath imports
Each capability below is its own subpath, so a project that only needs the HTTP layer never loads the MongoDB driver or the Redis client.
| Import | Purpose |
|---|---|
@codexa/core/http | Plugin first HTTP framework, built on the Fetch API and a radix tree router |
@codexa/core/openapi | OpenAPI 3.1 document generator, built from route metadata |
@codexa/core/sdk | Frontend SDK generator, built from the same OpenAPI route metadata |
@codexa/core/config | Environment variables, MongoDB, Redis, and storage configuration |
@codexa/core/bus | Local or Redis backed event bus |
@codexa/core/store | Memory, Redis, or Deno KV key value store |
@codexa/core/cache | Namespaced cache built on top of a store |
@codexa/core/storage | Local disk, S3, Cloudinary, and ImageKit storage manager |
@codexa/core/providers | Re-exported third party packages Codexa Core depends on |
@codexa/core/logger | Structured logger |
@codexa/core/crypto | ID generation and password hashing |
@codexa/core/hash | SHA and HMAC helpers |
@codexa/core/device | User agent parsing |
@codexa/core/ttl | Duration string parsing, such as turning '15m' into seconds |
@codexa/core/response | Standard response payload builders |
@codexa/core/query | Query string parsing |
@codexa/core/cli | The codexa plugin and codexa sdk commands, for installing plugins and generating SDK packages |
Where the code lives
Codexa Core is published on JSR as @codexa/core, currently at version 1.0.5 with a JSR score of 100 percent. The source lives on GitHub at Codexa-by-HQ/codexa-core, under the MIT license.