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

splp-nodejs

v1.0.2

Published

SPLP Node.js - Government Service Integration with Kafka, Encryption & Tracing

Downloads

293

Readme

splp-nodejs

SPLP Node.js is a Node.js library for Government Service Integration. It provides robust tools for working with Kafka, payload encryption/decryption, request tracing (via OpenTelemetry), and built-in error handling like Circuit Breakers and Retry Managers.

Features

  • Kafka Wrapper: Easy connection, consuming, and producing to Kafka.
  • Payload Encryption: Highly secure JsonEncryptor to easily encrypt and decrypt JSON data for communication.
  • Tracing: Built-in OpenTelemetry tracing utilities (initTracing, getTracer, withSpan, etc.).
  • Security: Prevent XSS and Injection, sanitize objects, validate inputs securely.
  • Resilience: Integrated CircuitBreaker and RetryManager for robust microservices.
  • Programmatic Config: configure() API to set all options in code — no .env file required.

Installation

npm install splp-nodejs

Basic Usage

Importing

import {
  configure,
  KafkaWrapper,
  JsonEncryptor,
  initTracing,
  CircuitBreaker,
} from 'splp-nodejs';

Programmatic Configuration

Call configure() once at startup before creating any clients. All fields are optional — omitted values fall back to environment variables or built-in defaults.

import { configure } from 'splp-nodejs';

configure({
  kafka: {
    hosts: 'splp-kafka.layanan.go.id:443',
    clientId: 'my-service',
    groupId: 'my-consumer-group',
    ssl: {
      enabled: true,
      caPath: './certs/kafka/ca.pem',
      certPath: './certs/kafka/client.crt',
      keyPath: './certs/kafka/client.key',
    },
  },
  seal: {
    apiUrl: 'https://seal.example.com:2798',
    publicKeys: ['-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----'],
  },
  tracing: {
    serviceName: 'my-service',
    endpoint: 'http://tempo.example.com/v1/traces',
    enabled: true,
  },
  processing: {
    maxConcurrentMessages: 10,
    instanceId: 'node-1',
  },
});

configure() can be called multiple times — each call is deep-merged into the existing runtime config. Environment variables remain as a fallback when a field is not set programmatically.

Configuration Options

| Group | Field | Env var fallback | Default | |---|---|---|---| | kafka | hosts | KAFKA_HOSTS | splp-kafka.layanan.go.id:443 | | kafka | clientId | KAFKA_CLIENT_ID | splp-service | | kafka | groupId | KAFKA_GROUP_ID | splp-consumer-group | | kafka | inboxTopic | KAFKA_INBOX_TOPIC | splp-inbox | | kafka.ssl | enabled | KAFKA_SSL_ENABLED | true | | kafka.ssl | caPath | KAFKA_CA_PATH | certs/kafka/ca.pem | | seal | apiUrl | SEAL_API_URL | https://192.168.112.153:2798 | | seal | timeout | SEAL_API_TIMEOUT | 30000 | | seal | publicKeys | — | built-in key | | seal | enableLogging | ENABLE_ENCRYPTION_LOGGING | false | | tracing | serviceName | SERVICE_NAME | service_testing | | tracing | endpoint | TEMPO_ENDPOINT | SPLP Tempo endpoint | | tracing | enabled | TRACING_ENABLED | true | | processing | maxConcurrentMessages | MAX_CONCURRENT_MESSAGES | 25 | | processing | instanceId | INSTANCE_ID | random | | processing | verboseLogs | VERBOSE_LOGS | false |

License

MIT