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

create-cfast

v0.2.0

Published

Scaffold a fully wired Cloudflare Workers + React Router project with cfast

Downloads

308

Readme

create-cfast

Scaffold a fully wired Cloudflare Workers + React Router project in one command.

npm create cfast@latest my-app

No boilerplate. No copy-pasting API keys into the wrong file. No figuring out how to wire Drizzle to D1. The scaffolder asks you what you need, sets up every package, and gives you a running app with auth, permissions, and email working out of the box.

What It Does

Interactive Setup

$ npm create cfast@latest my-app

  Welcome to cfast!

  Project name: my-app

  Which packages do you need?
  [x] @cfast/auth       - Authentication (magic email + passkeys)
  [x] @cfast/permissions - Permission system
  [x] @cfast/db          - D1 database with Drizzle
  [x] @cfast/ui          - Auto-forms and permission-aware components
  [ ] @cfast/admin       - Admin panel
  [x] @cfast/email       - Email via Mailgun
  [x] @cfast/router      - Multi-action routes & pagination

  UI library:
  (*) MUI Joy UI
  ( ) Headless (bring your own)

  Let's set up your API keys.
  We'll configure these per environment (dev / staging / production).

  Mailgun API Key (dev): ****
  Mailgun domain (dev): sandbox1234.mailgun.org
  Mailgun API Key (production): **** (or press Enter to set later)
  Mailgun domain (production): mail.myapp.com

  Cloudflare Account ID: ****

  Creating project...
  Installing dependencies...
  Setting up wrangler.toml...
  Generating Drizzle schema...
  Creating example routes...

  Done! Next steps:
    cd my-app
    pnpm dev

What You Get

my-app/
├── app/
│   ├── routes/
│   │   ├── _index.tsx              # Home page
│   │   ├── login.tsx               # Magic link + passkey login
│   │   └── dashboard.tsx           # Authenticated route example
│   ├── db/
│   │   ├── schema.ts               # Drizzle schema with auth tables
│   │   └── migrations/             # D1 migrations
│   ├── auth.ts                     # @cfast/auth config
│   ├── permissions.ts              # @cfast/permissions definitions
│   └── emails/
│       ├── magic-link.tsx          # react-email template
│       └── welcome.tsx             # react-email template
├── wrangler.toml                   # Pre-configured with D1, KV bindings
├── .dev.vars                       # Local development secrets
├── .env.staging                    # Staging API keys
├── .env.production                 # Production API keys (empty, fill in later)
├── drizzle.config.ts               # Drizzle Kit config for D1
├── package.json
└── tsconfig.json

Environment-Aware Secrets

The scaffolder creates separate secret files per environment and configures wrangler to use them:

  • .dev.vars — Local development (Mailgun sandbox, etc.)
  • .env.staging — Staging environment keys
  • .env.production — Production keys (created empty with comments about what's needed)

All secret files are added to .gitignore automatically.

Working Examples

The generated project includes working examples of:

  • Magic link authentication — Send a magic link, verify it, create a session
  • Passkey registration and login — Full WebAuthn flow
  • Permission-guarded routes — Loader that requires authentication
  • Multi-action route — Create and delete in the same page
  • Auto-generated form — Form derived from the Drizzle schema
  • Email sending — Welcome email sent after registration

Post-Scaffold Commands

After scaffolding, you can:

pnpm dev                    # Start local development (wrangler + react-email preview)
pnpm db:generate            # Generate D1 migrations from schema changes
pnpm db:migrate:local       # Apply migrations to local D1
pnpm db:migrate:remote      # Apply migrations to remote D1
pnpm deploy:staging         # Deploy to staging
pnpm deploy:production      # Deploy to production