Skip to content

Packages

Seven packages, maintained in one Bun workspace. They share a version number and are published together, but each is installed on its own, covers a single concern, and ships as ESM-only TypeScript. There is no meta-package that pulls the others in, though a package brings its own dependencies with it: @almighty-shogun/common installs @almighty-shogun/utils, and the two server packages install @almighty-shogun/http-core.

Only common assumes a framework. The rest work in any TypeScript project that meets their runtime requirement.

Foundations

Framework-agnostic building blocks. Everything else in the workspace is built on top of these.

  • Prototype Extensions — side-effect methods on Array, String, and Number. Imported once at startup; it has no named runtime exports and no dependencies.
  • Utils — value guards, number and date formatting, locale metadata, serialization, control-flow wrappers, and small browser actions.
  • HTTP Core — HTTP method and status constants, the HttpBaseResponse class, query-string helpers, and the shared error classes. Rarely installed directly; the server packages pull it in and re-export all of it.

Vue

  • Common — composables for open state, loading, forms, pagination, data tables, hotkeys, clipboard, and persistence, plus Vue Router helpers, ref utilities, and module-level i18n access.

Runtime integrations

Packages tied to one specific host runtime.

  • Bun Server — typed route definitions, route compilation, and response helpers around Bun.serve().
  • Cloudflare Worker — typed route definitions with path parameters, worker module setup, and response helpers for the Workers runtime.
  • WebKit Native Bridge — typed request and command bridge for JavaScript embedded in a WebKit host application.

How they fit together

Arrows are workspace dependencies, and the note is what the package needs from outside the workspace.

text
bun-server           ──► http-core ──► utils   (Bun-only)
cloudflare-worker    ──► http-core ──► utils   (Workers-only)
common               ──► utils                 (peer: vue, vue-router)
http-core            ──► utils                 (luxon)
prototype-extensions                           (standalone)
utils                                          (luxon)
webkit-native-bridge ──► utils                 (WebKit host)

Everything pointing at utils uses it for types alone, so nothing from it reaches those runtime bundles. common is the exception and calls into it at runtime. @types/bun and @cloudflare/workers-types are optional peer dependencies, needed only to type-check against the runtime globals the two server packages reference.

@almighty-shogun/prototype-extensions is never imported by another package. It is a side-effect import your application makes once at startup.

What the other packages take from utils is the shared type vocabulary, Nullable and Undefinable among them. common takes more than types: composables such as useLocalStorage use serialize and deserialize, and useDarkTheme uses setDarkTheme.

http-core is the layer between utils and the server packages. It owns the HTTP vocabulary, the HttpBaseResponse class, the query helpers, and the error classes, so a status code, a JSON response, or a thrown error has one definition across every runtime. Adding a runtime package means adding a line to the diagram above, not a new set of response and error types.

Both server packages re-export every http-core export from their own root, so an application installs one package and imports everything from it. http-core is published and documented for the rarer case of building your own server wrapper.

Luxon is the only third-party runtime dependency in the workspace, and it reaches a bundle only through the code that uses it: in utils the date helpers, serialize, deserialize, and disableZoom, and in http-core only queryDate. Both packages are side-effect free, so a build that never calls those drops Luxon entirely.

Where to start

  • New here? Read the guide first, then install Utils.
  • Building a Vue application? Common is where most Vue and Vite applications start.
  • Only want formatting and value helpers? Utils on its own is enough.
  • Writing your own server wrapper? HTTP Core gives you the status vocabulary and response class without a runtime attached.
  • Writing a Bun HTTP server? Go straight to Bun Server.
  • Deploying to Cloudflare? Go straight to Cloudflare Worker.
  • Embedding a web UI in a native WebKit host? Go straight to WebKit Native Bridge.

All packages are released under the MIT License.