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

rugi-auth

v2.5.0

Published

Centralized authentication service with multi-app role management

Readme

Rugi Auth

A secure, centralized authentication service with multi-app role management. Built with Express, TypeScript, and Prisma.

🚀 Quick Start

Prerequisites:

1. Create New Project

Use the CLI to scaffold a new authentication server. This sets up the project structure, keys, and configuration for you.

npx rugi-auth init <your-project-name>

Follow the interactive prompts to configure your project.

2. Start Services

Navigate to your new project directory and start the infrastructure (PostgreSQL & Redis).

cd <your-project-name>
docker-compose up -d

Note: Redis is auto-configured on port 6380 to avoid conflicts.

3. Initialize

Run the setup script to migrate the database, generate keys, and create your superadmin account.

# Run database migrations
npm run prisma:migrate

# Complete setup (Keys, Default App, Superadmin)
npm run setup

4. Run Server

npm run dev

The API will be available at http://localhost:7100.


🔑 Key Features

  • Centralized Auth: Single user identity across multiple applications.
  • Security First:
    • RSA Keys: RS256 JWT signing.
    • Argon2id: Memory-hard password hashing.
    • Rate Limiting: Redis-backed distributed rate limiting.
    • Protection: Patched against timing attacks and IP spoofing.
  • Role Management: Granular, app-specific roles.
  • OTP Support: Secure email-based one-time passwords.
  • Audit Logs: detailed tracking of all security events.

🔌 API Reference

Full documentation is available at /docs (Swagger UI) when the server is running.

| Method | Endpoint | Description | | :--- | :--- | :--- | | POST | /register | Register a new user | | POST | /login | Login with email/password | | POST | /refresh | Refresh access token | | POST | /revoke | Revoke refresh token | | GET | /me | Get current user profile | | GET | /.well-known/jwks.json | Public keys (JWKS) |


🛠 Project Structure

  • src/ - Source code
  • prisma/ - Database schema
  • keys/ - Generated RSA keys (Do not commit!)
  • docker/ - Docker configuration

⚙️ Configuration

Copy .env.example to .env to customize settings.

Key Variables:

  • DATABASE_URL: Postgres connection string.
  • REDIS_HOST / REDIS_PORT: Redis connection (defaults to Docker values).
  • JWT_ACCESS_TOKEN_EXPIRY: Duration of access tokens (default: 10m).

🛡️ deployment

For production:

  1. Keys: Ensure keys/ directory is secure and persistent.
  2. Redis: Configure a persistent Redis instance for rate limiting in .env.
  3. Process Manager: Use PM2 (npm run start:pm2) or Docker.