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-swarm-app

v4.1.1

Published

Scaffold a new [Swarm](https://ethswarm.org) decentralized storage app in seconds — like `create-react-app`, but for dapps.

Downloads

356

Readme

create-swarm-app

Scaffold a new Swarm decentralized storage app in seconds — like create-react-app, but for dapps.

Usage

npm init swarm-app --name <project-name> --type <template>

Example:

npm init swarm-app --name my-app --type node-ts

This creates a my-app/ directory with a working starter project. Then:

cd my-app
npm install
npm start

Templates

| Type | Language | Runtime | Best for | | ---------- | ----------------------- | -------------- | --------------------------------- | | node | JavaScript (CommonJS) | Node.js | Simple scripts, quick experiments | | node-esm | JavaScript (ES Modules) | Node.js | Modern JS with import/export | | node-ts | TypeScript | Node.js | Type-safe backend scripts | | vite-tsx | TypeScript + React | Browser (Vite) | Web UIs for Swarm storage |

What the generated app does

Every template comes with working example code that demonstrates the core Swarm workflow:

Node templates (node, node-esm, node-ts) generate a script that:

  1. Connects to your local Bee node
  2. Finds an existing usable postage batch, or buys new storage if none exists
  3. Uploads a text string to Swarm
  4. Downloads it back and prints the result along with the Swarm content hash

Vite template (vite-tsx) generates a React web app that:

  1. Gets or creates a postage batch via a button click
  2. Uploads a single file to Swarm
  3. Uploads a directory of files to Swarm
  4. Shows the resulting Swarm hash as a clickable link via the Bee gateway

Options

| Flag | Default | Description | | -------- | ----------------------- | ----------------------------------- | | --name | (required) | Project directory name | | --type | (required) | Template type (see above) | | --host | http://localhost:1633 | URL of your Bee node | | --auth | (none) | API key for authenticated Bee nodes |

Custom Bee host example:

npm init swarm-app --name my-app --type vite-tsx --host http://my-bee-node:1633

Generated project structure

Node template:

my-app/
├── src/
│   ├── index.ts      # Main script — upload/download example
│   └── config.ts     # Bee node URL and client setup
├── package.json
└── tsconfig.json     # (node-ts only)

Vite template:

my-app/
├── src/
│   ├── App.tsx       # React component with upload UI
│   ├── index.tsx     # React entry point
│   └── config.ts     # Bee node URL and client setup
├── index.html
├── package.json
└── tsconfig.json

About bee-js

Generated projects use bee-js, the official JavaScript/TypeScript client for Swarm. The key concepts demonstrated in the templates:

  • Postage batches — you pay for storage on Swarm by buying a postage batch. The templates handle finding an existing usable batch or purchasing one automatically.
  • Uploadbee.uploadData() / bee.uploadFile() / bee.uploadFiles() store content and return a content-addressed hash.
  • Downloadbee.downloadData(reference) retrieves content by its hash.

Further reading