@nexussdk/sdk

Unified umbrella SDK for Nexus Platform — feature flags + error tracking + React hooks
1,933
Install
npm install @nexussdk/sdk
Latest Version:0.0.10
Vue:3
License:MIT
Last Updated:Oct 17, 2026
Links: npm
Maintainer: ngophilong

@nexussdk/sdk

The official umbrella client SDK for the Nexus Platform — high-performance feature flags, error telemetry, and React hooks with zero runtime bloat (<15KB gzipped full bundle, <2KB wrapper footprint).

npm version License: MIT


Features

  • 🚩 Feature Flags & Remote Config: Deterministic Murmur3 hashing, ABAC evaluation rules, and real-time SSE streaming updates.
  • ⚡ Error Telemetry & Monitoring: Automatic uncaught exception catching, unhandled promise rejection tracking, and regex-based PII scrubbing.
  • ⚛️ First-Class React 19 Support: Idiomatic hooks (useFlag, useNexus) and NexusProvider context wrapper.
  • 🪶 Ultra Lightweight: Zero heavy dependencies, tree-shakeable, sub-15KB gzipped footprint for complete bundle.
  • 🔒 Type Safe: Strict TypeScript contracts and autocomplete out of the box.

Installation

# npm
npm install @nexussdk/sdk

# pnpm
pnpm add @nexussdk/sdk

# yarn
yarn add @nexussdk/sdk

Quick Start (Vanilla / Node / Browser)

import { createNexus } from '@nexussdk/sdk';

const nexus = createNexus({
  clientKey: 'pk_live_your_client_key',
  baseUrl: 'https://api.nexusplatform.io',
  environment: 'production',
  user: {
    id: 'usr_123',
    email: 'user@example.com',
    role: 'premium',
  },
});

// 1. Evaluate feature flag
const isNewCheckout = await nexus.flags.isEnabled('new-checkout-flow', false);
if (isNewCheckout) {
  // Render new checkout
}

// 2. Capture error with breadcrumbs
try {
  // your app logic
} catch (error) {
  nexus.tracker.captureException(error, {
    tags: { module: 'checkout' },
  });
}

React Integration

Wrap your application in NexusProvider:

import React from 'react';
import { NexusProvider, useFlag, useNexus } from '@nexussdk/sdk/react';

function App() {
  return (
    <NexusProvider
      config={{
        clientKey: 'pk_live_your_client_key',
        baseUrl: 'https://api.nexusplatform.io',
      }}
    >
      <CheckoutPage />
    </NexusProvider>
  );
}

function CheckoutPage() {
  const isV2Enabled = useFlag('v2-checkout-button', false);
  const nexus = useNexus();

  const handleCheckout = () => {
    nexus.tracker.addBreadcrumb('Clicked checkout', 'ui');
    // Proceed to checkout
  };

  return (
    <button onClick={handleCheckout}>
      {isV2Enabled ? 'Express Checkout' : 'Standard Checkout'}
    </button>
  );
}

Vue 3 & Nuxt 4 Integration

Install NexusPlugin and use the <NexusGuard> error boundary component:

// main.ts
import { createApp } from 'vue';
import { NexusPlugin } from '@nexussdk/sdk/vue';
import App from './App.vue';

const app = createApp(App);
app.use(NexusPlugin, {
  apiKey: 'pk_live_your_client_key',
  environment: 'production',
  autoCapture: true,
  realtime: true,
});
app.mount('#app');
<!-- App.vue -->
<script setup lang="ts">
import { useFeatureFlag, NexusGuard } from '@nexussdk/sdk/vue';

const { isEnabled } = useFeatureFlag('new-checkout-flow', false);
</script>

<template>
  <NexusGuard>
    <button v-if="isEnabled">1-Click Express Checkout</button>
    <button v-else>Standard Checkout</button>
  </NexusGuard>
</template>

Architecture & Subpackages

@nexussdk/sdk bundles the following specialized modules for maximum modularity:

Package Role
@nexussdk/contracts SSOT TypeScript types and RFC 7807 error models
@nexussdk/core Ring buffer transport kernel and environment resolvers
@nexussdk/flags Standalone feature flag evaluator, local dev server (nexus-flags-dev) & SSE manager
@nexussdk/tracker Standalone error tracker, local dev server (nexus-dev) & PII sanitizer

License

MIT © Nexus Platform

Related Packages

@nexussdk/tracker

Ultra-resilient client crash ingestion and telemetry SDK with automated PII sani...

2,072
@nexussdk/flags

Ultra-lightweight feature flags and remote config client SDK for browsers and ed...

2,023
@sourav732/error-tracker-js

Lightweight, zero-dependency error, performance and crash tracking SDK for brows...

0 1
@databuddy/sdk

Databuddy SDK: open-source, cookieless product analytics with custom events, fea...

352,832 1,210

Version History

Version Released License
0.0.10 MIT
0.0.9 MIT
0.0.8 MIT
0.0.7 MIT
0.0.6 MIT