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

@stepyo/server

v2.0.0

Published

Stepyo Server SDK — manage flows, webhooks, and analytics from your backend

Downloads

59

Readme

@stepyo/server

Stepyo Server SDK — manage flows, webhooks, and analytics from your Node.js backend.

Zero external dependencies. Requires Node.js 18+ (uses native fetch and crypto).

Installation

npm install @stepyo/server

Quick Start

import { StepyoServer } from '@stepyo/server';

const stepyo = new StepyoServer({ apiKey: 'sk_your_key_here' });

// List available flows
const flows = await stepyo.listFlows();
console.log(flows);

// Get a specific flow with steps
const flow = await stepyo.getFlow('onboarding');
console.log(flow.steps);

// Ask AI a question
const answer = await stepyo.ask('How do I create a new project?', {
  pageUrl: '/dashboard',
  lang: 'en',
});
console.log(answer);

// Track an event
await stepyo.trackEvent('flow_completed', {
  flow_key: 'onboarding',
  user_id: 'usr_123',
});

Webhooks

// Create a webhook
const webhook = await stepyo.createWebhook({
  url: 'https://your-app.com/webhooks/stepyo',
  events: ['flow_completed', 'flow_started'],
  description: 'Production webhook',
});
// Save webhook.secret securely — you need it to verify signatures

// List webhooks
const webhooks = await stepyo.listWebhooks();

// Test a webhook
const result = await stepyo.testWebhook(webhook.id);

// Delete a webhook
await stepyo.deleteWebhook(webhook.id);

Webhook Signature Verification

Verify incoming webhook payloads to ensure they come from Stepyo:

import express from 'express';
import { StepyoServer } from '@stepyo/server';

const app = express();
app.use(express.json());

app.post('/webhooks/stepyo', (req, res) => {
  const signature = req.headers['x-stepyo-signature'] as string;
  const isValid = StepyoServer.verifySignature(
    JSON.stringify(req.body),
    signature,
    process.env.STEPYO_WEBHOOK_SECRET!
  );

  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }

  // Handle the event
  const { event, data } = req.body;
  console.log(`Received ${event}:`, data);

  res.status(200).send('OK');
});

Error Handling

All API errors throw a StepyoError with status and code properties:

import { StepyoServer, StepyoError } from '@stepyo/server';

try {
  const flow = await stepyo.getFlow('nonexistent');
} catch (err) {
  if (err instanceof StepyoError) {
    console.error(`Error ${err.status}: ${err.message} (${err.code})`);
  }
}

Configuration

const stepyo = new StepyoServer({
  apiKey: 'sk_your_key_here',       // Required
  baseUrl: 'https://custom.url',     // Optional, defaults to https://app.stepyo.com.br
});

License

MIT