Goddo Kurosu β God Cloths
An ergonomic web framework for Deno, engineered to recreate the ElysiaJS syntax with a 1:1 Developer Experience (DX). Enjoy End-to-End Type Safety, seamless autocompletion, and an incredibly intuitive API β zero npm dependencies, built exclusively with native Deno and Web Platform APIs.
- Deno installed on your system.
- Deno extension for VS Code (recommended).
Goddo and its plugins are published on the JSR registry under the @goddo
scope.
Install the core framework:
deno add jsr:@goddo/coreYou can install only the plugins you need to keep your server lightweight:
@goddo/coreβ The framework core (Router, Context, Validation).@goddo/htmlβ Zero-build JSX/HTML Server-Side Rendering.@goddo/treatyβ End-to-end type-safe HTTP client.@goddo/jwtβ JWT sign/verify plugin.@goddo/corsβ Cross-Origin Resource Sharing.@goddo/openapiβ Swagger/Scalar OpenAPI 3.0 generation.@goddo/staticβ Serve static files and assets.@goddo/rate-limitβ Request rate limiting.@goddo/shieldβ Security headers injection.@goddo/csrfβ Cross-Site Request Forgery protection.@goddo/cronβ Background cron jobs schedule.@goddo/bearerβ Bearer token extractor.@goddo/server-timingβ Server-Timing API metrics.@goddo/llms-txtβ AI-friendly/llms.txtgenerator.
To install multiple packages at once:
deno add jsr:@goddo/core jsr:@goddo/html jsr:@goddo/corsimport { Goddo } from '@goddo/core'
new Goddo()
.get('/', () => 'Hello Goddo')
.get('/user/:id', ({ params: { id } }) => id)
.post('/mirror', ({ body }) => body)
.listen(3000)You can find a complete standalone demo using the published JSR packages at: carlosxfelipe/goddo-example
There is also a local demo within this repository (src/), which you can run using:
deno task devGoddo's core API is designed to mirror ElysiaJS as closely as possible, making migration straightforward for Deno projects. The table below shows the current parity:
| Feature | ElysiaJS | Goddo | Notes |
|---|---|---|---|
Route handlers (get, post, etc.) |
app.get('/', () => ...) |
β
app.get('/', () => ...) |
Identical |
| Path params | ({ params }) => params.id |
β Same | Identical |
Schema validation (t) |
t.Object, t.String |
β Same builders | Identical |
t.Numeric |
β | β | Coerces string to number |
t.Files, t.Record, t.Tuple |
β | β | Files support maxSize / type |
t.Intersect, t.ObjectString |
β | β | ObjectString parses JSON strings |
| Lifecycle hooks | onRequest, onBeforeHandle, etc. |
β Same hooks | Including onMapResponse |
onMapResponse |
β | β | Runs after handler / before response |
| Plugin encapsulation | `.as('scoped' | 'global')` | β Same |
.state() / .decorate() |
β | β | Injected into context |
.mount() |
β | β | Mount fetch-compatible apps |
.model() |
β | β | Named reusable schemas + OpenAPI $ref |
.trace() |
β | β | Per-stage timing hooks |
| Generator/SSE handlers | function* () { yield sse(...) } |
β Same | Auto text/event-stream |
| AOT compilation | aot: false |
β Same | Enabled by default |
| WebSocket | app.ws() |
β Same | With pub/sub |
| Treaty / Eden | @elysiajs/eden |
β
@goddo/treaty |
End-to-end type-safe client |
| GraphQL plugin | @elysiajs/graphql |
β Not yet | Out of current scope |
| OpenTelemetry | @elysiajs/opentelemetry |
β
@goddo/opentelemetry |
OpenTelemetry distributed tracing |
| tRPC plugin | @elysiajs/trpc |
β Not yet | Out of current scope |
For a practical migration example:
// ElysiaJS
const app = new Elysia()
.state('version', '1.0')
.model('user', t.Object({ id: t.Number(), name: t.String() }))
.get('/', ({ version }) => version)
.post('/user', ({ body }) => body, { body: 'user' })
.listen(3000)
// Goddo (Deno)
const app = new Goddo()
.state('version', '1.0')
.model('user', t.Object({ id: t.Number(), name: t.String() }))
.get('/', ({ version }) => version)
.post('/user', ({ body }) => body, { body: 'user' })
.listen(3000)| Task | Description |
|---|---|
deno task dev |
Demo app (src/) with watch |
deno task start |
Demo app (src/) |
deno task test |
Runs the test suite |
deno task coverage |
Generates code coverage report |
deno task check |
Type-check |
deno task fmt |
Formats the code |
deno task lint |
Linting |
deno task bench |
Runs performance benchmarks |
The full API reference, routing syntax, validation schemas, and plugins are available on our official website.
Read the Full Documentation here
Goddo compiles all routes into a single optimized handler at listen() time (or when compile() is
called manually). This Ahead-Of-Time compilation provides:
- Pre-merged hooks: global and route-level lifecycle hooks are merged once, not per-request
- Pre-computed flags: validation checks use boolean flags instead of truthiness checks on every request
- Static route map: routes without dynamic segments (
:param/*) are stored in aMapfor O(1) lookup, bypassing the radix tree - Sucrose detection: sync handlers skip the
awaitoverhead by detecting async functions via source inspection - V8-Optimized Context: utilizes a specialized
GoddoContextclass to leverage hidden classes, lazily evaluatingquery,headers, andcookieonly when accessed - Fast URL Parsing: manual extraction of paths using string indices instead of the heavy
new URL() - Method-Aware Execution: automatically skips body parsing ticks for
GETandHEADrequests
const app = new Goddo()
.get('/', () => 'Hello')
.get('/user/:id', ({ params }) => params.id)
app.compile() // optional β listen() calls this automatically
app.listen(3000)deno task benchGoddo was heavily optimized to offer world-class performance, standing toe-to-toe with the fastest runtimes available. Thanks to the integrated Ahead-Of-Time (AOT) compiler and Just-In-Time (JIT) schema validation, Goddo excels particularly in heavy I/O operations (like POST/PATCH requests with JSON payloads).
Below is a direct comparison between Goddo and the original ElysiaJS using the same API structure (measured in requests per second on an Apple M1):
| Route / Benchmark | ElysiaJS (Bun v1.3.14) | Goddo (Deno v2.9.3) | Comparison |
|---|---|---|---|
PATCH /todos/1 (Update JSON) |
~276,200 req/s | 274,600 req/s | Elysia is ~1% faster |
POST /todos/ (Create JSON) |
~301,200 req/s | 273,800 req/s | Elysia is ~10% faster |
DELETE /todos/2 (Delete) |
~450,500 req/s | 373,900 req/s | Elysia is ~20% faster |
GET /todos/1 (Get specific) |
~657,900 req/s | 564,200 req/s | Elysia is ~17% faster |
GET /todos/ (List all) |
~900,900 req/s | 607,800 req/s | Elysia is ~48% faster |
GET /page (HTML Render) |
~97,500 req/s | 65,080 req/s | Elysia is ~50% faster |
GET / (Redirect) |
~1,035,000 req/s | 728,900 req/s | Elysia is ~42% faster |
While Elysia leverages Bun's heavily optimized internal router for static and lightweight GET
endpoints, Goddo closely matches Elysia where it matters most: complex validation and JSON
parsing operations (POST/PATCH), making it exceptionally suited for heavy database-driven
applications.
Note on HTML Rendering (
/page): While Bun features highly specialized C++ string optimizations in its engine for JSX concatenation, Goddo still delivers one of the fastest JSX pipelines in Deno by completely eliminating redundant parser allocations.
Note on Redirect (
/): For extremely lightweight routes like redirects, benchmark performance is dominated by the native-to-JS bridge overhead (FFI). Bun's deep C++ uSockets integration natively outpaces Deno's Rust-to-V8 bridge for empty requests, though this advantage disappears once real JavaScript logic and JSON parsing are introduced.
This project includes API collections for Bruno, an open-source IDE for exploring and testing APIs.
To use them:
- Open Bruno.
- Click Open Collection.
- Select the
bruno/directory.
This project uses Deno's built-in formatter. To ensure consistent code style across the project, run:
deno fmtFormatting rules and file exclusions are managed in deno.json.
If you use VS Code and have the Prettier extension installed, it may conflict with Deno's
formatter. To use Deno's formatter automatically on save, add the following to your
.vscode/settings.json:
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}assets/β Static assets for the repository (e.g. logos, images).src/β Demo application serving as an example of how to use Goddo.site/β Documentation & examples website (dogfoods Goddo itself), CDN-only, no build step. Seesite/README.md.packages/β Monorepo containing the framework and all plugins.packages/core/β Framework core containing routing, context, validation, and all built-in features.packages/<plugin>/β Official built-in plugins (like HTML, OpenAPI, CORS, Rate Limit, etc.) as independent packages.
bruno/β Bruno API collections for testing the demo application endpoints.tests/β Comprehensive test suite for the Goddo core and all its plugins.benchmarks/β Performance benchmarks for router lookup, handler throughput, and compilation overhead.
Goddo is built with reliability in mind, backed by a robust suite of over 200 unit tests covering core routing, parsing, validation, and plugin features. While it is highly capable, extremely fast, and deeply typed, it is a new framework; we encourage you to test it thoroughly for your specific use cases before large-scale production deployments.