# System map — elysiajs/elysia

> Canonical page: https://codevetter.com/unpack/elysia/system-map

# System map — elysiajs/elysia

Scanned commit e037eca710e7ad193be09cc6615ab0dbe54af914 (2026-08-26). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The public Elysia class owns application configuration, routes, schemas, hooks and shared state. Execution divides between generated AOT handlers and a dynamic handler, with adapters supplying serving and response behavior. Storage in the inspected framework core consists of application memory and HTTP cookies. Packaging and CI target multiple module formats and runtime integrations.
- Elysia's generic parameters track base paths, singleton context, definitions, metadata, routes and scoped/local additions; runtime fields hold corresponding stores and registries. — [src/index.ts#L190-265](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L190-L265)
- The constructor defaults AOT from ELYSIA_AOT, enables normalization, schema encoding and native static responses, and selects BunAdapter when Bun exists unless an adapter is supplied. — [src/index.ts#L377-407](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L377-L407) [src/universal/env.ts#L1-7](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/universal/env.ts#L1-L7)
- Routing separates static path tables, native response tables, route history and lazy Memoirist HTTP/dynamic routers; parameter decoding uses fastDecodeURIComponent. — [src/index.ts#L303-335](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L303-L335) [src/index.ts#L1011-1053](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L1011-L1053)
- The fetch getter installs either composeGeneralHandler or createDynamicHandler; compile also invokes adapter.beforeCompile, while listen delegates to the adapter. — [src/index.ts#L8061-8110](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L8061-L8110) [src/index.ts#L8161-8167](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L8161-L8167)
- BunAdapter owns Bun.serve and WebSocket integration; WebStandardAdapter rejects listen, and CloudflareAdapter extends it with eager route and error-handler compilation. — [src/adapter/bun/index.ts#L349-396](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/bun/index.ts#L349-L396) [src/adapter/web-standard/index.ts#L231-237](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/web-standard/index.ts#L231-L237) [src/adapter/cloudflare-worker/index.ts#L23-56](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/cloudflare-worker/index.ts#L23-L56)
- Validation integrates TypeBox and Standard Schema; normalization can use exact-mirror with a cleaner fallback, and the manifest declares cookie, URI decoding and Memoirist dependencies. — [src/schema.ts#L535-588](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/schema.ts#L535-L588) [package.json#L191-224](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/package.json#L191-L224)
- Application state resides in singleton.store; request contexts reference that object, while cookie changes become HTTP headers rather than framework database writes in this inspected path. — [src/index.ts#L241-249](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/index.ts#L241-L249) [src/adapter/web-standard/index.ts#L169-183](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/web-standard/index.ts#L169-L183) [src/adapter/utils.ts#L437-451](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/src/adapter/utils.ts#L437-L451)
- build.ts emits unbundled ESM/CJS files targeting Node 20 and generates declarations; package exports expose both formats, CI builds and tests, and release-published events trigger npm provenance publishing. — [build.ts#L10-29](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/build.ts#L10-L29) [package.json#L10-24](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/package.json#L10-L24) [.github/workflows/ci.yml#L21-35](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/.github/workflows/ci.yml#L21-L35) [.github/workflows/publish.yml#L37-51](https://github.com/elysiajs/elysia/blob/e037eca710e7ad193be09cc6615ab0dbe54af914/.github/workflows/publish.yml#L37-L51)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
