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

@samarthchavda/create-auth-backend

v1.0.1

Published

Scaffold a production-ready login/signup backend (JWT, RBAC, rate limiting) in one command — FastAPI+PostgreSQL or Express+MongoDB

Readme

create-auth-backend

A one-command scaffolder for a production-ready login/signup backend — JWT access + refresh tokens, bcrypt password hashing, role-based middleware, rate limiting on auth routes, and Docker setup, in either FastAPI + PostgreSQL or Express + MongoDB.

Try it locally right now (no publishing needed)

cd create-auth-backend
npm link
create-auth-backend myapp --stack fastapi
# or
create-auth-backend myapp --stack express

npm link registers this folder as a global command on your machine, so create-auth-backend works from anywhere.

Usage

create-auth-backend <project-name> --stack <fastapi|express>

Example:

create-auth-backend taskflow-auth --stack express
cd taskflow-auth
cp .env.example .env
npm install
npm run dev

Every run also generates fresh random JWT secrets into your .env.example — no more copy-pasting the same secret across projects.

What gets generated

  • POST /api/auth/signup — register (email/password validated, password hashed with bcrypt)
  • POST /api/auth/login — returns access token (short-lived) + refresh token (long-lived)
  • POST /api/auth/refresh — exchange refresh token for a new pair
  • POST /api/auth/logout — blacklists the current access token
  • GET /api/auth/me — current user, requires valid access token
  • Example protected + role-restricted routes showing the middleware pattern
  • Rate limiting on all auth endpoints (default: 5 attempts / 5 min per IP)
  • Dockerfile + docker-compose.yml with the matching database container

Publish it so you can run it with npx from anywhere (any machine)

npm login
npm publish

Once published:

npx create-auth-backend myapp --stack fastapi

Extending it

Both templates follow controller → routes → middleware separation, so adding new protected features (e.g. a /api/tasks resource in a TaskFlow-style app) means just importing requireAuth / get_current_user and building on top — auth is already solved.