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

@xtatistix/bugline-sdk

v0.2.12

Published

Bugline SDK — in-app feedback and audit for React Native / Expo apps

Readme

Mobile Audit SDK

React Native / Expo compatible SDK for collecting structured notes on selected mobile UI elements.

The SDK is element based: users select a registered UI element, choose a nested child or parent when targets overlap, write a required note, save notes into a local queue, and submit the collected notes to your project API as plain JSON. Saved notes belong to an implicit draft audit session until the user submits or clears the queue.

Install

npm install @xtatistix/bugline-sdk

Peer dependencies:

npm install react react-native

Basic Usage

Wrap the app with AuditProvider and AuditSelectionRoot, then mark important UI elements with stable AuditSelectable ids.

import {
  AuditProvider,
  AuditSelectable,
  AuditSelectionRoot,
  AuditWidget,
  createAuditClient,
} from '@xtatistix/bugline-sdk';

const audit = createAuditClient({
  apiKey: 'project-api-key',
  endpoint: 'https://your-domain.com/api/audit/issues',
  environment: 'staging',
  projectId: 'mobile-app',
  sdkVersion: '0.1.0',
  reporter: {
    id: 'user-123',
    role: 'tester',
  },
  privacy: {
    enabled: true,
  },
});

export function App() {
  return (
    <AuditProvider client={audit}>
      <AuditSelectionRoot>
        <AuditSelectable id="top-bar" kind="navigation">
          <TopBar />
        </AuditSelectable>

        <AuditSelectable id="save-button" kind="button">
          <Button title="Save" />
        </AuditSelectable>

        <AuditWidget screenName="Profile" />
      </AuditSelectionRoot>
    </AuditProvider>
  );
}

Selection Behavior

  • Registered elements are measured by AuditSelectionRoot.
  • AuditSelectionOverlay outlines selectable elements while selection mode is active.
  • Tapping a point selects the smallest matching child by default.
  • The parent/child switcher lets the user move between nested targets.
  • Confirming a target opens a required note flow.
  • Saving a note keeps it in the local draft audit session.
  • Category and severity are optional note metadata.
  • Audit-only breadcrumbs track selection, save, delete, and submit events.
  • Submitting the saved session creates Firebase-friendly plain JSON payloads.

Example nested target order:

SaveText -> SaveButton -> TopBar

Transport Boundary

The mobile SDK does not connect to Firebase directly. It sends JSON to your HTTP endpoint. The recommended backend boundary is:

Mobile SDK -> Next.js API route handler -> Firebase

The built-in HttpAuditTransport sends:

  • content-type: application/json
  • x-audit-api-key when apiKey is configured
  • JSON body from buildElementNotePayload
  • batch JSON body with { "session": {...}, "notes": [...] } when multiple saved notes are submitted together

Privacy

Privacy masking is enabled by default in the payload builder. The SDK redacts common sensitive keys and string patterns before JSON leaves the app:

  • keys containing token, authorization, cookie, secret, password, email, or phone
  • email addresses
  • phone-like numeric strings
  • bearer/JWT/API-token-like values

Override the defaults through createAuditClient({ privacy: ... }).

Payload Shape

buildElementNotePayload(...) returns a plain JSON-compatible object with:

  • projectId
  • environment
  • sdkVersion
  • screenName
  • selectedElement
  • ancestors
  • children
  • note
  • category
  • severity
  • sessionId
  • breadcrumbs
  • createdAt

Element metadata can include stable ids, kind, text, testID, accessibilityLabel, role, path, bounds, and custom metadata.

Product Mobile App

The repository includes the product mobile app under apps/mobile. It is not a throwaway demo; this is the app surface we will keep evolving after the audit selection flow is stable.

Install mobile app dependencies:

cd apps/mobile
npm install

Start the mock endpoint from the repository root:

npm run mobile:mock-api

The mock server prints local network URLs. For a physical device, use the LAN URL it prints:

$env:EXPO_PUBLIC_AUDIT_ENDPOINT="http://YOUR_LAN_IP:4318/api/audit/issues"
cd apps/mobile
npm start

For iOS simulator or Android emulator, the mobile app has local defaults:

  • iOS simulator: http://127.0.0.1:4318/api/audit/issues
  • Android emulator: http://10.0.2.2:4318/api/audit/issues

Open selection mode from the floating Audit button, tap a nested element, switch parent/child if needed, and save a required note into the local queue. Double tap Audit to review saved notes, delete notes, or submit all saved notes together. Each queue is submitted as a draft audit session. The mock endpoint logs the received payloads and returns mock issueId values.

Submitted notes are stored in the mock server memory for the current process. After submitting the queue, download them as Markdown from:

http://YOUR_LAN_IP:4318/api/audit/issues.md

The current app includes a product-style audit workspace with queue, component-map, and settings surfaces so selection can be tested against nested navigation, segmented controls, panels, rows, buttons, and text nodes.

Package Commands

npm run typecheck
npm run build
npm pack --dry-run