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

kinekt

v0.0.20

Published

<div align="center"> <h1>Kinekt</h1> <h3>Build REST APIs With High Precision.</h3> <h4>Pronounced like 'connect' but with an i.</h4>

Readme

Define an endpoint as follows:

export const getUser = app.createEndpoint(
  "GET /users/:id",

  {
    params: z.object({ id: z.string() }),
    response: { 200: z.custom<User>() },
  },

  async ({ params }) => {
    const user = await db.users.findOne(params.id);

    return {
      statusCode: 200,
      body: user,
    };
  }
);

Serve it:

const serve = createServer({port: 3000, hostname: "localhost"});
serve(getUser, ...otherEndpoints);

Use it through the auto-generated client:

const user = await getUser({ params: { id: "some-id" } }).ok(200);

Kinekt - what is it and how does it work?

  • it is a stand-alone web framework with a custom middleware engine, which means you don't have to integrate it with another framework like expressjs
  • it is simple and modular, giving you freedom in how you organize your code
  • it is 100% typesafe all the way down to the middleware engine

Middlewares and Pipelines

Kinekt uses middlewares which are combined into pipelines to handle requests. An incoming request will be transformed into a context object and passed through a given pipeline.

const pipeline = createPipeline(
  cors(),
  authenticate(),
  checkAcceptHeader(),
  deserialize(),
  basicEndpoint(params),
  serialize(),
  finalize()
)

const result = await pipeline(context)

Efficient routing

Kinekt uses a route tree, compiled at startup, to efficiently dispatch incoming requests to the correct pipelines.

Type Safety

Kinekt aims to be 100% Type Safe.

For example, adding an authenticate() middleware to your pipeline will make a user property available on the pipeline context which you can then consume in a request handler:

const pipeline = createPipeline(
  ...,
  authenticate(),
  ...
)

You now have access to a context.user property:

export const getUser = app.createEndpoint(
  // ...

  async ({ context }) => {
    const currentUser = context.user; // <-- the compiler gives an error if the
                                      //     authenticate middleware is not
                                      //     present in the pipeline.

    // ...
  }
);

When creating validated endpoints, you can accurately declare each aspect of your contract and the compiler will take care of warning you about any violations:

export const createUser = testPipeline.createEndpoint(
  "POST /organization/:organizationId/users",
  //                        ^---- by using a param segment, you are forced to
  //                              use a `params` schema containing
  //                              `organizationId` (see below).

  // ^---- by using POST method here, you are forced to declare a body schema
  //       (see below).

  {
    params: z.object({ organizationId: z.string() }), //    <- params schema
    query: z.object({ private: zodBooleanFromString() }),
    body: z.object({ email: z.string() }), //               <- body schema

    response: {
      // You must explicitly declare which bodies are returned for which status
      // codes.
      200: z.custom<User>(),
      409: z.custom<{ message: string }>(),
    },
  },

  async ({ params, query, body, context }) => {
    // You must return bodies and status codes as declared in the response
    // schemas.
    if (body.email === "[email protected]") {
      return {
        statusCode: 409,
        body: { message: "User with this email already exists" },
      };
    }

    return {
      statusCode: 200,
      body: {
        id: "some-id",
        email: body.email,
        organizationId: params.organizationId,
        private: query.private,
      },
    };
  }
);