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

@burdenoff/be-sdk

v2026.917.1

Published

Backend SDK for Burdenoff products providing unified access to notifications, RBAC, activity tracking, usage monitoring, and more

Readme

@burdenoff/be-sdk

Backend SDK for Burdenoff products providing unified access to notifications, RBAC, activity tracking, usage monitoring, and more.

Published automatically using npm trusted publishers (OIDC) - no long-lived tokens needed!

Installation

npm install @burdenoff/be-sdk

Quick Start

import { BurdenoffSDK } from '@burdenoff/be-sdk';

// Initialize SDK
const sdk = new BurdenoffSDK({
  workspacesApiUrl: 'https://api.burdenoff.com/graphql',
  tenantApiUrl: 'https://tenant.burdenoff.com/graphql',
  context: {
    userId: 'user-123',
    workspaceId: 'workspace-456',
    token: 'your-jwt-token',
  },
});

// Send notification
await sdk.notifications.send({
  title: 'Welcome',
  message: 'Hello from Burdenoff!',
  userIds: ['user-123'],
  type: 'info',
});

// Track operation with RBAC + Activity + Usage
await sdk.tracker.trackOperation({
  operationName: 'createProject',
  userId: 'user-123',
  rbacCheck: { workspaceId: 'workspace-456' },
  activityOptions: {
    description: 'Created new project',
    metadata: { projectName: 'My Project' },
  },
  usageOptions: {
    billingAccountId: 'billing-123',
  },
});

// Check permissions
await sdk.rbac.requirePermission({
  userId: 'user-123',
  action: 'create:project',
  resourceType: 'project',
  workspaceId: 'workspace-456',
});

// Record activity
await sdk.activity.record({
  userId: 'user-123',
  action: 'PROJECT_CREATED',
  description: 'Created new project',
  productId: 'WORKSPACE',
  workspaceId: 'workspace-456',
});

// Add usage
await sdk.usage.add({
  billingAccountId: 'billing-123',
  quotaName: 'api_calls',
  value: 1,
  description: 'API call for project creation',
});

// Export product translations from i18n service
const hiDictionary = await sdk.translation.exportProductTranslations({
  productName: 'vibecontrols',
  languageCode: 'hi',
  format: 'JSON',
  decodeJson: true,
});

// Upsert product translations (creates missing keys/translations, publishes)
await sdk.translation.upsertProductTranslations({
  productName: 'vibecontrols',
  languageCode: 'ta',
  translations: {
    'overviewPage.title': 'VibeControls மேலோட்டம்',
  },
});

Features

  • Unified Tracking: Single function for RBAC + Activity + Usage + Quota checking
  • Notifications: Send in-app, email, SMS, and push notifications
  • RBAC: Role-based access control and permission management
  • Activity Logging: Comprehensive audit trail for all operations
  • Usage Tracking: Track resource consumption for billing
  • Graph Integration: Global search across all products
  • Context Management: Automatic context propagation
  • Event Queue: NATS integration for event-driven architecture
  • Database Helpers: Prisma utilities and transaction management
  • Authentication: JWT verification and token management
  • Payments: Payment processing and webhook handling
  • Translation: Backend i18n support
  • Search: Advanced search utilities
  • Logger: Structured logging compatible with console

Modules

Core Modules

  • tracker: Unified operation tracking (RBAC + Activity + Usage + Notifications)
  • logger: Structured logging system
  • context: Request context management
  • client: GraphQL client with retry logic

Integration Modules

  • notifications: Notification management
  • rbac: Permission and access control
  • activity: Activity logging
  • usage: Usage and quota tracking
  • graph: Knowledge graph integration
  • events: Event queue (NATS) integration
  • auth: Authentication and JWT handling

Utility Modules

  • database: Prisma helpers
  • search: Search utilities
  • translation: i18n support
  • payments: Payment processing
  • bootstrap: Server initialization
  • platform: Scale primitives (see below)

Platform Primitives (@burdenoff/be-sdk/platform)

Reusable building blocks consumed fleet-wide as part of the scale refactor:

| Primitive | Purpose | |-----------|---------| | httpClient / createHttpClient | Hardened fetch wrapper: per-request AbortSignal.timeout (default 5s), retries with jitter, per-host circuit breaker (opens at 5 consecutive 5xx, half-open after 30s). | | withLeaderLock(redis, name, fn, { ttlMs, renewMs }) | Redis-based leader election via SET NX EX; auto-renews while fn() runs; releases via token-checked LUA DEL. | | rateLimitIncr(redis, { key, limit, windowMs }) | Atomic INCR + EXPIRE NX rate limiter. Returns { allowed, remaining, resetAt }. | | buildLoaders + resolveReferenceLoader | Per-request DataLoader factory + Apollo Federation __resolveReference helper. | | clampLimit + paginate | Cursor pagination (take = limit + 1 to compute hasMore and nextCursor). | | LLMRouter | Multi-provider LLM wrapper (Anthropic / OpenAI / OpenRouter) with timeout, retries with jitter, provider fallback chain (env LLM_PROVIDER_CHAIN), and token cap. | | ensureMonthlyPartitions / dropOldPartitions | PostgreSQL monthly RANGE partition creation + retention drop. | | buildCacheKey / invalidateNamespace | Versioned-key cache invalidation (INCR v:{namespace} — no KEYS/SCAN). |

import { Platform } from '@burdenoff/be-sdk';
// or: import { httpClient, withLeaderLock, ... } from '@burdenoff/be-sdk/platform';

const response = await Platform.httpClient('https://api.example.com/v1/users');

await Platform.withLeaderLock(redis, 'nightly-cleanup', async () => {
  // only one replica runs this
}, { ttlMs: 60_000 });

const { allowed } = await Platform.rateLimitIncr(redis, {
  key: `signup:${ip}`,
  limit: 5,
  windowMs: 60_000,
});

Documentation

For detailed documentation, see:

Development

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build

# Lint
npm run lint

# Format
npm run format

License

PROPRIETARY - Copyright Burdenoff Consultancy Services Pvt. Ltd.

Support

For support, email [email protected] or visit https://burdenoff.com/support.