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

@royea/secret-sauce

v1.0.0

Published

Scan JS/TS codebases to find exposed business logic. Rates uniqueness (1-5 stars), assigns protection levels, and tells you exactly what to move server-side.

Readme

@royea/secret-sauce

Find the business logic you forgot to protect.

Scan any JavaScript/TypeScript codebase to identify exposed business logic — pricing formulas, scoring algorithms, AI prompts, game rules, rate limits — and get actionable migration guidance. Zero dependencies.

The Problem

Your SaaS pricing table is in utils/pricing.ts. Your AI system prompt is in lib/ai.ts. Your matching algorithm is in hooks/useScore.ts. All shipped to the browser. All visible in DevTools.

SecretSauce finds these patterns automatically, rates how unique they are (1-5 stars), and tells you exactly where to move them.

Install

npm install -g @royea/secret-sauce

Usage

# Scan a project
secret-sauce analyze ./src

# Output: findings grouped by protection level, with file paths and line numbers

Example Output

SECRET SAUCE — Business Logic Protection Report

SUMMARY
Total findings: 47    Needs server migration: 12

BY PROTECTION LEVEL
  [SERVER-ONLY]     3 findings   ← Move these NOW
  [SERVER-FETCH]    9 findings
  [CACHE+FETCH]    15 findings
  [DUAL]           14 findings
  [CLIENT-OK]       6 findings   ← These are fine

MIGRATION REQUIRED
  src/lib/ai.ts:45 [SERVER-ONLY] *****
  System prompt exposed in client bundle. Remove entirely; serve via authenticated API.

  src/utils/pricing.ts:12 [SERVER-FETCH] ****
  Pricing algorithm with weighted factors. Move to server endpoint, cache 1h.

  src/hooks/useScore.ts:78 [CACHE+FETCH] ***
  Custom scoring formula. Serve from API, encrypt cache, 24h TTL.

Protection Levels

| Level | Stars | Action | |-------|-------|--------| | CLIENT-OK | 1 | Safe on client. No action needed. | | DUAL | 2 | Keep on client, validate server-side too. | | CACHE+FETCH | 3 | Move to server. Cache locally (encrypted, 24h). | | SERVER-FETCH | 4 | Server API only. Re-fetch hourly. | | SERVER-ONLY | 5 | Remove from client entirely. Auth endpoints only. |

What It Detects

  • SCORING — Point values, level thresholds, ranking formulas
  • PRICING — Cost tables, discount logic, reward schedules
  • ALGORITHMS — Matching, sorting, trust scoring, weighted formulas
  • AI_PROMPTS — System prompts, model configs, prompt templates
  • AUTH_LOGIC — Token handling, permission checks, session logic
  • RATE_LIMITS — Throttling, daily caps, retry limits
  • GAME_RULES — Win conditions, state machines, game config
  • VALIDATION — Input constraints, regex patterns, allowed values

Programmatic API

import { scan, rate, protect, formatReport } from '@royea/secret-sauce';

const results = scan('./src');
const rated = rate(results);
const report = protect(rated, './src');
console.log(formatReport(report));

Why This Exists

Every code audit turns up the same thing: business logic shipped to the browser that shouldn't be. Manual review takes hours. SecretSauce does it in seconds.

No external dependencies. No API keys. Runs entirely on your machine.

License

MIT