A simple, multi-chain example dApp that shows how to interact with wallet connectors — built for clarity, learning, testing, and extension.
Live demo: https://dapp-example.yoroiwallet.com/
It may not look fancy, but it works and is meant as a reference for other projects on how to talk to wallet dApp-connectors.
- Cardano (CIP-30) — live, via browser wallet extensions (e.g. Yoroi)
- Ethereum (EIP-1193) — live, via
window.ethereum - Bitcoin — planned (provider is currently a stub)
- React 18 (functional components + hooks), JavaScript only (no TypeScript)
- Tailwind CSS + Material Tailwind
- Create React App + craco
- Cardano serialization via
@emurgo/cardano-serialization-lib-browser
Prerequisites: Node.js (see .nvmrc) and npm.
npm install # install dependencies
npm start # run the dev server at http://localhost:3000
npm run build # production build into ./buildA Cardano and/or Ethereum browser wallet extension is required to exercise the connect flows.
| Script | Description |
|---|---|
npm start |
Start the development server |
npm run build |
Production build |
npm test |
Run tests in watch mode |
npm run test:ci |
Run tests once (CI mode) |
npm run lint |
Lint src with ESLint |
npm run lint:fix |
Lint and auto-fix |
npm run format |
Format src with Prettier |
npm run format:check |
Check formatting without writing |
src/
hooks/ # Providers (one per chain) + network toggle + shared hooks
components/ # UI: access buttons, tabs, cards, shared inputs
utils/ # Helpers and blockchain utilities (cslTools, ethereumUtils, ...)
Each chain follows the same flow: Provider → Access Button → Main Tab →
Subtabs → Cards. See CLAUDE.md for the full architecture and
conventions.
The app uses a small debug-gated logger (src/utils/logger.js):
debug/log/infoprint only in development, or in a production build started withREACT_APP_DEBUG=true(see.env.example).warn/erroralways print.
You can toggle logs live from the browser console — no rebuild needed:
dappLogs.on() // enable and remember across reloads
dappLogs.off() // disable and remember across reloads
dappLogs.toggle() // flip current state
dappLogs.status() // -> true | false
dappLogs.reset() // forget the override, fall back to the build defaultTests use Jest + React Testing Library (via CRA). Run npm run test:ci for a
single pass, or npm test to watch. Tests and linting run in CI on pushes to
main and on pull requests.
Copy .env.example to .env to override defaults. Only
variables prefixed with REACT_APP_ are exposed to the app.