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

nodecore-kit

v0.3.0

Published

Backend foundation SDK for Node.js services

Downloads

321

Readme

nodeCore-kit

A modular backend SDK for Node.js services.

Provides infrastructure helpers, utilities, and microservice building blocks in a clean, scalable, and framework-agnostic way.


📦 Features

Infrastructure Helpers

  • Redis wrapper
  • SQS wrapper
  • (Future: Kafka, etc.)

HTTP Utilities

  • getContent, postContent — typed fetch wrappers
  • Pagination helpers

Core Utilities

  • uuid — binary/string conversion, generation, and validation
  • JSON parse/stringify helpers
  • joiValidator for request validation
  • sleep, formatDate, and more

Security

  • JWT encode/decode services

Logging

  • Optional logger injection
  • Compatible with console or structured loggers like Winston

Error Handling

  • ValidationError
  • ServerError
  • NotFoundError

⚡ Installation

npm install nodecore-kit
# or
yarn add nodecore-kit

🔌 Usage Examples

import {
  uuid,
  joiValidator,
  paginate,
  SQS,
  SqsConfig,
  WinstonLogger,
  jwtService,
} from "nodecore-kit";

UUID

const id = uuid.get("v4");

Joi Validator

const schema = {
  schema: { name: Joi.string().required() },
  data: { name: "Alice" },
};

joiValidator(schema, false);

Pagination

const { pageCount, offset } = paginate(100, 2, 10);

SQS Adapter

const config: SqsConfig = {
  region: "us-east-1",
  accessKeyId: "your-key",
  secretAccessKey: "your-secret",
};

// Optional custom logger
const logger = new WinstonLogger();

// Initialize adapter
const sqs = new SQS(config, logger);

// Enqueue a message
await sqs.enqueue({
  queueUrl: "https://sqs.us-east-1.amazonaws.com/1234/my-queue",
  message: { hello: "world" },
});

JWT Service

const token = await jwtService.encode({ data: { userId: 123 } }, "mySecret");
const decoded = await jwtService.decode(token, "mySecret");

🏗️ Architecture Principles

| Layer | Description | |---|---| | Core | Pure utilities, errors, and types. Independent from adapters or transports. | | Adapters | External services (SQS, Redis, DB). Depend only on core. | | Transport | HTTP layers. May depend on core. | | Security | JWT, hashing. Depends only on core. | | Logger | Optional, adapter-friendly, injected as a dependency. |

No global environment reads inside adapters — all configuration is passed via constructor.


🌱 Design Goals

  • Simplicity — Easy to pick up and integrate into any project.
  • Modularity — Pick and use only what you need.
  • Scalable — Built for microservices and multi-service architectures.
  • Plug-n-Play — Default logging works with console, but advanced logging can be injected.
  • Framework-Agnostic — Works with Express, Fastify, NestJS, or bare Node.js.