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

@flowsterix/studio

v0.1.0

Published

SDK bridge for Flowsterix Studio — analytics, storage sync, and event ingestion

Readme

@flowsterix/studio

SDK bridge that connects Flowsterix to Flowsterix Studio. Intercepts analytics events and storage operations, serializes them to JSON-safe payloads, and ships them in batches to the Studio ingest endpoint.

Installation

npm install @flowsterix/studio @flowsterix/core

Quick Start

import { createStudioBridge } from '@flowsterix/studio'
import { createLocalStorageAdapter } from '@flowsterix/core'

const bridge = createStudioBridge({
  projectId: 'proj_abc',
  apiKey: 'sk_live_xxx',
  user: { id: 'user-123', traits: { plan: 'pro' } },
})

Then pass the bridge to your tour provider:

<TourProvider
  flows={flows}
  analytics={bridge.analytics}
  storageAdapter={bridge.storage({ inner: createLocalStorageAdapter() })}
>
  {children}
</TourProvider>

API

createStudioBridge(options)

Creates a bridge instance that intercepts tour events and syncs them to Studio.

Options

| Option | Type | Default | Description | |---|---|---|---| | projectId | string | required | Your Studio project ID | | apiKey | string | required | Studio API key | | endpoint | string | https://ingest.flowsterix.studio | Ingest endpoint URL | | user | UserContext | — | Initial user context ({ id, traits? }) | | debug | boolean | false | Include stack traces in error events | | batchSize | number | 20 | Events per batch before auto-flush | | flushIntervalMs | number | 5000 | Flush interval in milliseconds |

Returns StudioBridge

| Property | Type | Description | |---|---|---| | analytics | FlowAnalyticsHandlers | Pass to TourProvider's analytics prop | | storage | (params: { inner: StorageAdapter }) => StorageAdapter | Wraps a storage adapter with Studio sync | | identify | (params: { user: UserContext }) => void | Update user context mid-session | | flush | () => Promise<void> | Force-flush buffered events | | shutdown | () => void | Flush remaining events and clean up |

How It Works

  1. Analytics handlers — The bridge creates handlers for all 12 flow events (flowStart, stepEnter, etc.). Each handler serializes the event payload (stripping functions, React nodes, and converting RegExp to strings) and enqueues it for transport.

  2. Batched transport — Events are buffered and sent in batches via POST /v1/ingest. On failure, events are re-queued for the next flush. The buffer is capped at 500 events to prevent memory leaks.

  3. Storage sync — The storage wrapper delegates all reads/writes to your inner adapter (e.g. localStorage) and fire-and-forget enqueues storage.set/storage.remove events to Studio.

  4. Page unload — On visibilitychangehidden, remaining events are flushed via navigator.sendBeacon (with fetch + keepalive as fallback).

  5. Flow registration — Flows aren't registered upfront. Every event includes a serialized flow manifest, and the backend deduplicates by (projectId, flowId, version).

Identifying Users

Call identify() after authentication to attach user context to all subsequent events:

bridge.identify({
  user: { id: userId, traits: { plan: 'pro', role: 'admin' } }
})

Cleanup

Call shutdown() when your app unmounts to flush remaining events:

useEffect(() => {
  return () => bridge.shutdown()
}, [])

License

MIT