Skip to content
create-bsv-app

Quick start

Go from an empty folder to a running BSV app with a connected wallet, passwordless login and signed API calls.

One command gives you a React client, an Express server, a Connect wallet button and two working demos, with providers, routes and CORS already wired. You won't write any key-handling or transaction code to get there.

Before you start#

You need two things:

  • Node.js 22 or newer. Run node -v to check. Older versions are unsupported and may fail in odd ways.
  • A BRC-100 wallet. We recommend BSV Browser (opens in a new tab). It's free and runs on macOS, Windows, iOS and Android. It holds your keys, so your app never does.

Create your app#

Scaffold the project#

Pick your package manager:

npx create-bsv-app@latest my-app \
  --starter full-stack \
  --capabilities wallet-login,signed-requests \
  --yes

That's a React + Express app with all three capabilities. wallet-connect is always included. --yes skips the prompts, and dependencies install before the command exits.

Start both apps#

Terminal
cd my-app
npm run dev

The root dev script starts the Vite client on http://localhost:5173 and the Express server on http://localhost:3000 together. Press Ctrl + C once to stop both.

Connect your wallet#

Open http://localhost:5173. You'll see BSV app and a Connect wallet button.

  • Desktop wallet open? Approve the request in BSV Browser. The page switches to Connected: 02ab…. That hex string is your identity key.
  • No desktop wallet found? A dialog offers Connect with a mobile wallet. Scan the QR code with BSV Browser on your phone and you're paired.

Try the demos#

Once you're connected, a Demos list appears:

  • Wallet login → signs a login proof and sends it to POST /api/login. The server verifies it and replies with your identity key.
  • Signed request demo → signs a single API call to POST /api/echo, bound to its exact body.

Both pages log every step, so you can watch the full exchange between wallet, client and server.

Other ways to start#

Answer prompts instead of passing flags. Run the command with no arguments and the CLI asks for the mode, starter, name, stack, capabilities, package manager and network:

Terminal
npx create-bsv-app@latest

Use a form in your browser. --ui opens a local, single-use configurator on 127.0.0.1 that walks through the same questions:

Terminal
npx create-bsv-app@latest --ui --dir my-app

Copy a finished example app. Clone one of the complete examples and read its README:

Terminal
npx create-bsv-app@latest my-meter-app --starter meter --yes

Where to next#