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

@iota-big3/sdk-adapters

v2.0.0

Published

Production-ready framework adapters for IOTA Big3 SDK - Express, Fastify, Koa with comprehensive middleware suite

Downloads

4

Readme

@iota-big3/sdk-adapters

Framework adapters for IOTA Big3 SDK - provides a unified interface for Express, Fastify, Koa, and other web frameworks.

Current Status (December 2024)

  • Build: ✅ TypeScript compilation successful (0 errors)
  • Tests: ✅ 49/49 passing (100% pass rate, 3 skipped)
  • Phase: Completed Phase 2e & 2h
  • Production Ready: Yes (Express adapter fully implemented)
  • Documentation: Phase 2e & 2h Complete

Installation

npm install @iota-big3/sdk-adapters

Features

  • 🚀 Multi-Framework Support: Express, Fastify, Koa (more coming)
  • 🔌 Middleware System: CORS, Helmet, Rate Limiting, Compression, Logging
  • 📊 Metrics & Monitoring: Built-in performance tracking
  • 🔒 Security: Helmet security headers, rate limiting
  • 🎯 Type Safety: Full TypeScript support
  • 🔄 Event-Driven: Lifecycle events for all operations
  • 🧩 SDK Integrations: Works with other IOTA Big3 SDKs

Quick Start

import { FrameworkAdaptersSDK } from "@iota-big3/sdk-adapters";

// Create SDK instance
const sdk = new FrameworkAdaptersSDK();

// Create an Express adapter
const adapter = sdk.createAdapter("express", {
  framework: "express",
  version: "4.18.0",
});

// Create Express app
const app = await adapter.createApp();

// Add middleware
const cors = MiddlewareHelpers.cors({
  origin: "https://example.com",
  credentials: true,
});
await adapter.addMiddleware(cors);

// Start server
app.listen(3000, () => {
  console.log("Server running on port 3000");
});

SDK Integrations

The adapters SDK can integrate with other IOTA Big3 SDKs for enhanced functionality:

With Event Bus

import { EventBus } from "@iota-big3/sdk-events";

const eventBus = new EventBus();
const sdk = new FrameworkAdaptersSDK({ eventBus });

// Listen to adapter events
eventBus.on("adapters:route.registered", (event) => {
  console.log("New route registered:", event);
});

With Logger

import { Logger } from "@iota-big3/sdk-observability";

const logger = new Logger("my-app");
const sdk = new FrameworkAdaptersSDK({ logger });

// All adapter operations will be logged

With Cache (Enhanced Rate Limiting)

import { CacheManager } from "@iota-big3/sdk-performance";

const cache = new CacheManager({
  redis: { host: "localhost" },
});
const sdk = new FrameworkAdaptersSDK({ cache });

// Rate limiting now uses Redis instead of in-memory

With Security

import { SecurityManager } from "@iota-big3/sdk-security";

const security = new SecurityManager();
const sdk = new FrameworkAdaptersSDK({ security });

// Enhanced security validation for all requests

Complete Integration Example

import { FrameworkAdaptersSDK } from "@iota-big3/sdk-adapters";
import { EventBus } from "@iota-big3/sdk-events";
import { Logger } from "@iota-big3/sdk-observability";
import { CacheManager } from "@iota-big3/sdk-performance";

// Create SDK with multiple integrations
const sdk = new FrameworkAdaptersSDK({
  eventBus: new EventBus(),
  logger: new Logger("adapters"),
  cache: new CacheManager({ redis: { host: "localhost" } }),
  enableMetrics: true,
  enableLogging: true,
});

// Create adapter
const adapter = sdk.createAdapter("express", {
  framework: "express",
});

// Events are automatically forwarded to event bus
// Logging is automatic
// Rate limiting uses Redis cache

Middleware

Built-in middleware helpers:

import { MiddlewareHelpers } from "@iota-big3/sdk-adapters";

// CORS
const cors = MiddlewareHelpers.cors({
  origin: "https://example.com",
  methods: ["GET", "POST"],
  credentials: true,
});

// Security Headers
const helmet = MiddlewareHelpers.helmet({
  contentSecurityPolicy: true,
  hsts: true,
});

// Rate Limiting
const rateLimit = MiddlewareHelpers.rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 100, // limit each IP to 100 requests per windowMs
});

// Request Logger
const logger = MiddlewareHelpers.logger({
  format: "combined",
});

// Compression
const compression = MiddlewareHelpers.compression({
  enabled: true,
});

// Error Handler
const errorHandler = MiddlewareHelpers.errorHandler({
  env: "production",
});

Events

The SDK emits various events that can be listened to:

// Direct event listening
adapter.on("route-registered", (data) => {
  console.log("Route registered:", data);
});

// Through event bus integration
eventBus.on("adapters:adapter.initialized", (event) => {
  console.log("Adapter initialized:", event);
});

Configuration

The SDK can be configured through options or centralized config:

// Option 1: Direct configuration
const sdk = new FrameworkAdaptersSDK({
  defaultFramework: "express",
  enableMetrics: true,
  enableLogging: true,
});

// Option 2: Through config integration
const config = new ConfigManager();
config.set("adapters", {
  defaultFramework: "fastify",
  enableMetrics: false,
});

const sdk = new FrameworkAdaptersSDK({ config });

Documentation

See https://docs.iota-big3.com for full documentation.

License

MIT