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

franktech-sdk

v1.0.3

Published

FrankTech SDK for error monitoring - AI-powered error tracking and analysis

Readme

@franktech/sdk


Features

  • 🔍 Automatic Error Capture - Unhandled rejections, global errors, console.error
  • 🤖 AI-Powered Analysis - Get root cause and suggested fixes
  • 🎬 Session Replay - Watch what users did before an error
  • 📊 Performance Monitoring - Track API response times and page load metrics
  • 🚀 One-Line Setup - Start monitoring in seconds
  • 📊 Beautiful Dashboard - Visualize errors and insights
  • 🔑 API Key Authentication - Secure server-side integration
  • Lightweight - <5KB minified

Installation

npm install @franktech/sdk

Quick Start

import FrankTech from '@franktech/sdk';

const monitor = new FrankTech({
  apiKey: 'ft_your_api_key_here',
  endpoint: 'https://franktech-api.franktechspace.dev'
});

// Errors are automatically captured!
// Unhandled rejections, global errors, console.error all captured.

Manual Error Capture

try {
  // risky code
} catch (error) {
  monitor.captureError(error, {
    severity: 'critical',
    metadata: { userId: 123, action: 'checkout' }
  });
}

Session Replay

const monitor = new FrankTech({
  apiKey: 'ft_your_api_key',
  endpoint: 'https://franktech-api.franktechspace.dev',
  enableReplay: true,
  replaySampleRate: 0.5,        // Record 50% of sessions
  replayMaskInputs: true,        // Mask sensitive input fields
  replayBlockClass: 'franktech-block' // CSS class to block recording
});

// Replay data is automatically attached to errors

Performance Monitoring

const monitor = new FrankTech({
  apiKey: 'ft_your_api_key',
  endpoint: 'https://franktech-api.franktechspace.dev',
  enablePerformance: true,
  performanceSampleRate: 1.0,
  slowRequestThreshold: 500 // ms
});

// Tracks:
// - API call durations
// - Page load metrics (TTFB, FCP, LCP)
// - Long tasks (>50ms)

React Integration

import { useFrankTech } from '@franktech/sdk';

function App() {
  const monitor = useFrankTech({
    apiKey: 'ft_your_api_key',
    endpoint: 'https://franktech-api.franktechspace.dev'
  });
  
  const handleClick = () => {
    try {
      // risky code
    } catch (error) {
      monitor.captureError(error);
    }
  };
  
  return <button onClick={handleClick}>Click me</button>;
}

Express.js Middleware

import FrankTech, { franktechMiddleware } from '@franktech/sdk';

const monitor = new FrankTech({
  apiKey: 'ft_your_api_key',
  endpoint: 'https://franktech-api.franktechspace.dev'
});

app.use(franktechMiddleware(monitor));

Vue Plugin

import { createFrankTechVuePlugin } from '@franktech/sdk';

const app = createApp(App);
app.use(createFrankTechVuePlugin({
  apiKey: 'ft_your_api_key',
  endpoint: 'https://franktech-api.franktechspace.dev'
}));

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | Required | Your FrankTech API key | | endpoint | string | https://franktech-api.franktechspace.dev | API endpoint URL | | environment | string | production | Environment name | | release | string | unknown | Release version | | enabled | boolean | true | Enable/disable monitoring | | captureConsole | boolean | true | Capture console.error calls | | batchSize | number | 10 | Max errors per batch | | flushInterval | number | 3000 | Flush interval in ms | | user | object | null | User context for error tracking |

Session Replay Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enableReplay | boolean | true | Enable/disable session replay | | replaySampleRate | number | 1.0 | Percentage of sessions to record (0-1) | | replayMaskInputs | boolean | true | Mask sensitive input fields | | replayBlockClass | string | franktech-block | CSS class to block recording | | replayMaxDuration | number | 60000 | Max recording duration in ms |

Performance Monitoring Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enablePerformance | boolean | false | Enable/disable performance monitoring | | performanceSampleRate | number | 0.5 | Percentage of requests to track (0-1) | | slowRequestThreshold | number | 1000 | Threshold for slow requests in ms |

API Reference

captureError(error, context) Manually capture an error with optional context.

monitor.captureError(new Error('Something went wrong'), {
  severity: 'critical',
  metadata: { userId: 123 }
});

setUser(user) Set user context for tracking.

monitor.setUser({ id: 'user-123', email: '[email protected]' });

flush() Force send all queued errors.

await monitor.flush();

destroy() Clean up and stop monitoring.

monitor.destroy();

License

MIT © Francis Ochieng