npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@torkjs/core

v0.1.3

Published

Bun-native, type-safe, blazingly fast backend framework with end-to-end type inference and zero boilerplate.

Readme


Tork is a modern, fast (high-performance) backend framework for building APIs with Bun and TypeScript, based on standard TypeBox / JSON Schema.

The key features are:

  • Fast: Very high performance, on par with Elysia and far ahead of Hono and Fastify. One of the fastest Bun frameworks available.
  • Type safe: End-to-end inference. The handler context is derived from the query / headers / body / params / response schemas and the injected services, with no per-route annotation.
  • OpenAPI for free: TypeBox schemas are native JSON Schema, so /docs Swagger UI and /openapi.json come out of the box.
  • Batteries included: JWT auth, guards, middleware (CORS, compress, CSRF, rate limit, static files), cron, queue, cache, sessions, SSE, and WebSockets.
  • Production networking: The full power of Bun.serve — HTTPS with support for both HTTP/2 and HTTP/3 (QUIC), unix sockets, and reusePort for OS-level load balancing.
  • Nested DI: Zero-boilerplate singleton services via Injectable, plus portable feature modules.
  • Fail fast: BaseSettings-style config that is coerced and validated at boot, so the app refuses to start on an invalid or missing value.
  • Easy to test: An in-process testClient (no port, no network) for fast, isolated tests.

Sponsors

Tork is free and open source. If it helps you ship, consider sponsoring development.

Requirements

Tork stands on the shoulders of Bun:

  • Bun >= 1.3.14 for the runtime parts: the server (Bun.serve), scheduled jobs (Bun.cron), Redis (Bun.redis), and Web Crypto.
  • TypeBox for the data parts. It is the single runtime dependency; everything else is a Bun built-in.

Installation

Scaffold a new project with the CLI:

bunx @torkjs/cli new my-api
# or install it globally
bun add -g @torkjs/cli
tork new my-api

Add Tork to an existing project:

bun add @torkjs/core

Example

A small app.ts, focused on the route structure:

import { t, Tork, TorkRouter } from "@torkjs/core";

// Assume we already have the schemas and services, in their own files.
import { CreateUser, UserOut } from "./schemas/user.ts";
import { Book } from "./schemas/book.ts";
import { UserService } from "./services/user.service.ts";
import { BookService } from "./services/book.service.ts";

// --- Each feature is its own router (the ctx is inferred from schemas + inject) ---
const users = new TorkRouter("/users", { tags: ["users"] });

users.get(
  "/",
  { response: t.Array(UserOut), inject: { userService: UserService } },
  ({ userService }) => userService.list(),
);

users.post(
  "/",
  { body: CreateUser, response: UserOut, inject: { userService: UserService } },
  ({ body, userService }) => userService.create(body),
);

const books = new TorkRouter("/books", { tags: ["books"] });

books.get(
  "/",
  { response: t.Array(Book), inject: { bookService: BookService } },
  ({ bookService }) => bookService.list(),
);

// --- Nest every feature under one /api router ---
const api = new TorkRouter("/api");
api.includeRouter(users).includeRouter(books); // -> /api/users, /api/books

new Tork({ title: "My API", version: "1.0.0", docs: "/docs" }).includeRouter(api).listen(8787);