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

@spikard/node

v0.17.1

Published

Codegen-first polyglot web toolkit with a Rust core and bindings for 14 languages

Readme

Spikard — Part of the spikard polyglot web toolkit.

Codegen-first polyglot web toolkit on a Rust core: OpenAPI/AsyncAPI/GraphQL/JSON-RPC/gRPC codegen, SQL-to-HTTP, tower-http middleware, and an MCP server. Experimental, pre-1.0. Native NAPI-RS bindings for Node.js with TypeScript type definitions.

Install · Quick example · Features · Docs


[!IMPORTANT] spikard is experimental and pre-1.0. APIs change between releases and not every binding is at the same level of maturity, so it is not yet recommended for production. Feedback is genuinely wanted at this stage — open an issue if something is wrong, awkward, or missing.

What this package provides

  • Node.js-first TypeScript API — NAPI-RS native bindings with generated types and full async/await support

  • Type-safe routing — HTTP definitions with path, query, body, and header validation across all bindings

  • Spec-driven codegen — OpenAPI 3.0, AsyncAPI 3.0, GraphQL SDL, and JSON-RPC 2.0 support

  • Cross-language parity — same DTOs, fixtures, and error model prevent runtime drift

  • Tower middleware — compression, rate limiting, timeouts, auth (JWT/API key), static files

  • Lifecycle hooks — onRequest, preValidation, preHandler, onResponse, onError

Installation

npm:

npm install @spikard/node

pnpm:

pnpm add @spikard/node

yarn:

yarn add @spikard/node

System Requirements

  • Node.js 18+ required (NAPI-RS native bindings)
  • Pre-built binaries for Linux (x86_64), macOS (arm64, x86_64), Windows (x86_64)

Quick example

import { App, ServerConfig } from "@spikard/node";
import { z } from "zod";

const UserSchema = z.object({ id: z.number(), name: z.string() });
type User = z.infer<typeof UserSchema>;

const app = new App();

app.get("/users/:id", async (req) => {
  const id = Number(req.params["id"] ?? 0);
  return { id, name: "Alice" };
});

app.post("/users", async (req) => {
  const body = await req.json();
  return UserSchema.parse(body);
});

if (require.main === module) {
  app.config(new ServerConfig({ port: 8000 }));
  app.run();
}

Features

| Feature | Support | |---|---| | Type-safe routing | Path, query, body, and header parameter validation | | Request extraction | Typed structs for JSON, form data, multipart, and raw bodies | | Spec support | OpenAPI 3.0 · AsyncAPI 3.0 · GraphQL SDL · JSON-RPC 2.0 | | Middleware | Compression, rate limiting, timeouts, authentication, static files | | Lifecycle hooks | Request, pre-validation, pre-handler, response, and error hooks | | WebSocket & SSE | Bidirectional streams and server-sent events | | Error handling | Consistent error responses across all bindings via ProblemDetails | | Fixture testing | Shared JSON fixtures for behavioral consistency across languages |

import { Spikard, type Request } from "spikard";
import { z } from "zod";

const UserSchema = z.object({ id: z.number(), name: z.string() });
type User = z.infer<typeof UserSchema>;

const app = new Spikard();

const health = async (): Promise<{ status: string }> => ({ status: "ok" });

const createUser = async (req: Request): Promise<User> => {
  return UserSchema.parse(req.json());
};

app.addRoute({ method: "GET", path: "/health", handler_name: "health", is_async: true }, health);

app.addRoute(
  {
    method: "POST",
    path: "/users",
    handler_name: "createUser",
    request_schema: UserSchema,
    response_schema: UserSchema,
    is_async: true,
  },
  createUser,
);
import { Spikard, type Request } from "spikard";
import { z } from "zod";

const PaymentSchema = z.object({
  id: z.string().uuid(),
  amount: z.number().positive(),
});
type Payment = z.infer<typeof PaymentSchema>;

const app = new Spikard();

const createPayment = async (req: Request): Promise<Payment> => {
  return PaymentSchema.parse(req.json());
};

app.addRoute(
  {
    method: "POST",
    path: "/payments",
    handler_name: "createPayment",
    request_schema: PaymentSchema,
    response_schema: PaymentSchema,
    is_async: true,
  },
  createPayment,
);
import { Spikard, type Request } from "spikard";

const app = new Spikard();

app.onRequest(async (request: Request): Promise<Request> => {
  console.log(`${request.method} ${request.path}`);
  return request;
});

Resources

License

MIT License — see LICENSE for details.