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

create-swayapp

v1.1.0

Published

A CLI tool to scaffold Express.js projects with JWT authentication

Readme

create-swayapp

A CLI tool to quickly scaffold Express.js projects with JWT authentication boilerplate. Get started with a production-ready Express.js API in seconds!

Features

Zero Configuration - Get started immediately with a working Express.js + JWT setup
🔒 JWT Authentication - Pre-configured authentication with best practices
📦 Clean Scaffold - No git history, ready for your own repository
Validation - Smart project name validation and directory checks
🎨 Beautiful CLI - Interactive prompts with colored output
🚀 Modern Stack - Built with ES modules and latest Node.js features

Quick Start

npx create-swayapp

That's it! The CLI will guide you through the setup process.

Usage

Basic Usage

Run the command and follow the interactive prompts:

npx create-swayapp

You'll be asked for:

  1. Project name - The name of your new project (e.g., my-api)
  2. Target directory - Where to create the project (defaults to current directory)

Example

$ npx create-swayapp

🚀 Welcome to create-swayapp!

? Enter your project name: › my-awesome-api
? Enter target directory (leave empty for current directory): › ./projects

📦 Creating project: my-awesome-api...
   Location: /Users/you/projects/my-awesome-api

✅ Project created successfully!
   Git history has been removed - you have a fresh scaffold

Next steps:
  cd projects/my-awesome-api
  npm install
  npm run dev

What's Included?

The scaffolded project includes:

  • 🔐 JWT Authentication - Complete auth setup with token generation and verification
  • 🛣️ Express.js Server - Configured with best practices and middleware
  • 📁 Organized Structure - Clean, modular folder structure
  • 🔧 Environment Config - dotenv setup for environment variables
  • 📝 Documentation - Starter README with API documentation

Project Name Rules

Project names must:

  • Only contain letters (a-z, A-Z)
  • Numbers (0-9)
  • Hyphens (-)
  • Underscores (_)

Invalid: my app, my@app, my.app
Valid: my-app, my_app, myapp, MyApp123

Features in Detail

Directory Existence Check

The CLI checks if a directory already exists and prompts you to confirm before overwriting.

Graceful Cancellation

Press Ctrl+C or cancel any prompt to safely exit without creating partial files.

Custom Target Directory

Specify where you want to create your project:

  • . - Current directory (default)
  • ./projects - In a subdirectory
  • ../sibling - In a sibling directory
  • /absolute/path - Absolute path

Clean Git History

The scaffolded project has no git history from the template. You get a fresh start, ready to initialize your own git repository:

cd my-awesome-api
git init
git add .
git commit -m "Initial commit"

Requirements

  • Node.js 14.x or higher
  • npm 6.x or higher

Template

This CLI clones the express-jwt-scaffold template, which provides a solid foundation for building REST APIs with Express.js and JWT authentication.

Troubleshooting

Permission Errors

If you encounter permission errors, try running with sudo (not recommended) or fix your npm permissions:

npm config set prefix ~/.npm-global

Network Errors

If cloning fails, check your internet connection and ensure GitHub is accessible.

Directory Already Exists

The CLI will prompt you to confirm before overwriting. Choose "No" to cancel or "Yes" to proceed.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT © Swayam Prajapat

Links


Made with ❤️ by Swayam Prajapat