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-universal-dapp

v1.0.7

Published

CLI tool to scaffold Push Chain universal applications with Next.js or Vite

Readme

create-universal-dapp

A CLI tool to scaffold Push Chain applications with your choice of framework and tooling.

Quick Start

npm install -g create-universal-dapp
create-universal-dapp my-app

Or use npx:

npx create-universal-dapp my-app

Features

  • Multiple Frameworks: Choose between Next.js or Vite (React)
  • 🔧 ESLint: Optional code linting setup
  • 📦 Push Chain Integration: Pre-configured with @pushchain/core and @pushchain/ui-kit
  • 🚀 TypeScript: Full TypeScript support out of the box
  • 🎨 Styling: Tailwind CSS set up by default

Usage

Interactive Mode

Run the CLI without arguments to enter interactive mode:

create-universal-dapp

You'll be prompted to:

  1. Choose your project name
  2. Select a framework (Next.js or Vite)
  3. Enable/disable ESLint

Command Line Options

create-universal-dapp my-app --framework nextjs --eslint

Available options:

  • -f, --framework <framework>: Choose 'nextjs' or 'vite'
  • --eslint / --no-eslint: Include/exclude ESLint configuration

Generated Project Structure

Next.js Project

my-app/
├── src/
│   ├── app/
│   │   ├── globals.css
│   │   ├── layout.tsx
│   │   └── page.tsx
│   ├── components/
│   └── lib/
│       ├── pushchain.tsx    # Push Chain provider
│       └── utils.ts         # Utility functions
├── package.json
├── next.config.js
├── tsconfig.json
└── tailwind.config.js

Vite Project

my-app/
├── src/
│   ├── components/
│   ├── lib/
│   │   ├── pushchain.tsx    # Push Chain provider
│   │   └── utils.ts         # Utility functions
│   ├── App.tsx
│   ├── main.tsx
│   └── index.css
├── index.html
├── package.json
├── vite.config.ts
├── tsconfig.json
└── tailwind.config.js

Push Chain Integration

The generated project includes:

1. PushChain Provider

A React context provider that manages the Push Chain connection:

import { usePushChain } from '@/lib/pushchain'

function MyComponent() {
  const { pushChain, isConnected, connect, disconnect, error } = usePushChain()
  
  // Use Push Chain methods here
}

2. Demo Component

A working example showing how to:

  • Connect to Push Chain
  • Send messages
  • Handle errors
  • Display connection status

3. Environment Variables

Configure your Push Chain settings:

# Next.js
NEXT_PUBLIC_PUSHCHAIN_API_KEY=your_api_key_here
NEXT_PUBLIC_PUSHCHAIN_NETWORK=testnet

# Vite
VITE_PUSHCHAIN_API_KEY=your_api_key_here
VITE_PUSHCHAIN_NETWORK=testnet

Development

To work on this CLI tool:

git clone https://github.com/pushchain/create-universal-dapp
cd create-universal-dapp
npm install
npm run build
npm link

Then you can test it:

create-universal-dapp test-app

Scripts

  • npm run build - Build the CLI
  • npm run dev - Run in development mode
  • npm start - Run the built CLI

Next Steps

After creating your project:

  1. Configure Environment Variables: Set up your Push Chain API keys
  2. Customize the Integration: Replace example code with your specific Push Chain functionality
  3. Add Features: Build upon the generated structure
  4. Explore Push Chain: Check out the @pushchain/ui-kit for additional components

Contributing

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

License

MIT