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

proofly-js

v1.0.1

Published

A tiny JS tracking library for personal conversion tracking with a local dashboard

Readme

Proofly JS

Self-hosted visitor & conversion tracker.

Track page views, clicks & scrolls on your website — keep your tracking data private, store it locally, and share your live visitor proof with anyone!


✨ What is this?

Proofly JS lets you:

  • 📊 Embed a simple tracker in any website (Next.js, Express.js, static HTML, etc.)
  • 📡 Send tracking data to your own Relay server
  • 📁 Store all visits in your local folder (./proofly/visits.json)
  • 👀 Run a local dashboard at http://localhost:4000 to watch visitors in real-time

No 3rd-party SaaS, no signups — your site, your data.


📦 1️⃣ Install the library

npm install proofly-js


⚙️ 2️⃣ Add the tracker to your site
➜ Example: Next.js

// pages/_app.tsx
import { useEffect } from 'react';
import { initProofly } from 'proofly-js';

export default function App({ Component, pageProps }) {
  useEffect(() => {
    initProofly({
      siteId: 'YOUR_SITE_ID',
      relayUrl: 'https://your-relay-server.onrender.com',
    });
  }, []);

  return <Component {...pageProps} />;
}


➜ Example: Express.js
In your EJS or HTML template:

html
Copy
Edit
<script type="module">
  import { initProofly } from '/node_modules/proofly-js/index.js';

  initProofly({
    siteId: 'YOUR_SITE_ID',
    relayUrl: 'https://your-relay-server.onrender.com',
  });
</script>


➜ Example: Plain HTML

html
Copy
Edit
<script type="module">
  import { initProofly } from '/node_modules/proofly-js/index.js';

  initProofly({
    siteId: 'YOUR_SITE_ID',
    relayUrl: 'https://your-relay-server.onrender.com',
  });
</script>


Run this command in your project root:
✅ Step 1 — Run the CLI
npx proofly-init

✅ This will:

Prompt you to enter your siteId (for example: my-portfolio)

Auto-create a local-dashboard/ folder with a local Socket.IO + Express server

Auto-create a proofly/ folder with visits.json to store your visitor data locally

The siteId you enter here must match the siteId you use in your initProofly({ siteId, relayUrl }) snippet on your actual website — that’s how your local dashboard knows which site’s traffic to watch!

---

✅ Step 2 — Install & start dashboard

cd local-dashboard
npm install
npm start
Your dashboard will run at: http://localhost:4000

It connects to your Relay server and displays every visit in real-time.

🗂️ 5️⃣ Where your data lives
✅ Visits are saved in ./proofly/visits.json
✅ The local dashboard reads & updates this file
✅ You keep everything — no cloud database needed

⚡ Full usage example
import { initProofly } from 'proofly-js';

initProofly({
  siteId: 'my-portfolio',
  relayUrl: 'https://my-relay.onrender.com',
});
🗂️ Example project structure

my-project/
├── pages/_app.tsx
├── node_modules/
├── local-dashboard/     # created by CLI
├── proofly/visits.json  # auto created
└── ...


🧩 Available CLI commands

Command	Description
npx proofly-init	Creates local-dashboard/ and proofly/visits.json automatically



✅ Ready to go
1️⃣ Embed the tracker
2️⃣ Deploy the Relay server
3️⃣ Run your local dashboard
4️⃣ Show your visitors, keep your data private.


❤️ License

MIT — Self-host forever. No vendor lock-in.
Built for indie devs, freelancers, and privacy lovers.