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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@capturoo/store

v4.2.0

Published

Store component of the Capturoo JS SDK

Readme

Leads Dashboard SDK

Internal SDK for Dashboard

Quickstart

Introduction

The Capturoo system, including Authentication (Auth) and Database (Firestore) is hosted on the Firebase platform. This Dashboard SDK (Node.js Client) is used to interface to the underyling Capturoo system without the need to make calls to Firebase directly.

Create a Cloud Firestore project

If you wish to test from a fresh project follow these instructions.

  1. Open the Firebase Console and create a new project.
  2. In the Database section, click the Get Started button for Cloud Firestore.
  3. Select a starting mode for your Cloud Firestore Security Rules: Locked mode Denies all reads and writes from mobile and web clients. Firestore Security Rules
  4. Click Enable.
  5. Navigate to the capturoo-api repository's function directory and deploy the firestore rules:
cd ~/projects/capturoo/capturoo-api/functions
npm run deploy-firestore-rules-staging

Quickstart

Make a new project directory and setup your project. Install the capturoo-dashboard-sdk

mkdir testproject; cd testproject
npm init
npm install capturoo-dashboard-sdk

The Dashboards SDK (Node.js Client) is written using ES7 async/await syntax so maybe need to surround you outermost calls with an asyncronous IIFE.

(async () => {
  // your code goes here
})();

Since the SDK is a client SDK you will need to initialise it with the Firebase web app config.

Navigate to the Firebase project home.

Firestore Security Rules

Select Add Firebase to your web app.

Firebase Web App Config

Copy the config object portion only and paste this to a config.js file in your project. Add the module.exports = config; line to ensure your config is exported.

JavaScript Configuation File

In your project directory write the following code to a file test.js. Use the follow code to initiase the SDK, passing the config object to the DashboardSDK client.

(async () => {
  const config = require('./config');
  const DashboardSDK = require('capturoo-dashboard-sdk');
  const sdk = new DashboardSDK(config);

  // ...
})();

To test your configuration your JavaScript using Node. If there are no errors your configuration is complete.

node test.js

Use the example code for specific usecases. See below.

Example Code

Examples of how to call the Dasboard SDK (Node.js Client) can be found in the examples directory.

Run Test

npm run test

For unit testing leads:

npm run test ./test/leads.test.js