A modern, responsive interface for interacting with blockchain
Live Demo β’ Features β’ Getting Started β’ Zombienet Setup β’ Development β’ Deployment
- π Flexible Network Connection - Connect to any chain, including local Zombienet and public nodes
- π Chain State Explorer - Query and visualize on-chain storage
- π Extrinsics Submission - Submit transactions with proper parameter handling
- πΈ Token Transfers - User-friendly interface for sending tokens
- π Multiple Wallet Support - Compatible with Polkadot.js Extension and Sub Wallet Extension
- π± Responsive Design - Works on desktop and mobile devices
- Node.js 16+
- npm or yarn
- Polkadot.js browser extension (for signing transactions)
- Zombienet (for local development)
-
Clone the repository:
git clone https://github.com/mdprana/substrate-dev-template.git cd polkadot-parachain-interface
-
Install dependencies:
npm install # or yarn install
-
Start the development server:
npm start # or yarn start
-
Open http://localhost:3000 in your browser.
To test with a local network, you can use Zombienet to spawn a development chain.
-
Download Zombienet from the official GitHub repository.
-
Make Zombienet executable and add it to your PATH:
chmod +x zombienet-linux # or zombienet-macos, etc. sudo mv zombienet-linux /usr/local/bin/zombienet
-
Download the required binaries:
zombienet setup polkadot polkadot-parachain
-
Make the binaries executable and add them to your PATH:
sudo mv ./polkadot ./polkadot-execute-worker ./polkadot-parachain ./polkadot-prepare-worker /usr/local/bin
Create a file named network.toml
with the following content:
[settings]
timeout = 120
[relaychain]
[[relaychain.nodes]]
name = "alice"
validator = true
[[relaychain.nodes]]
name = "bob"
validator = true
[[parachains]]
id = 100
[parachains.collator]
name = "collator01"
Run the following command to start your local network:
zombienet -p native spawn network.toml
You should see output similar to this:
Network launched ππ
Namespace: zombie-75a01b93c92d571f6198a67bcb380fcd
Provider: native
Node Information
Name: alice
Direct Link: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer
Prometheus Link: http://127.0.0.1:55310/metrics
...
Note the WebSocket URL from the output (e.g., ws://127.0.0.1:55308
). You'll use this to connect your interface to the local node.
In the application, use the Network Selector in the Home page to:
- Select from predefined networks (Polkadot, Kusama, Westend)
- Enter a custom endpoint (like your local Zombienet node)
Note: The WebSocket port for local Zombienet changes each time you restart it. Update the endpoint accordingly.
- Start Zombienet using the command above
- Copy the WebSocket URL from the output (e.g.,
ws://127.0.0.1:55308
) - Run your React application locally (
npm start
) - Use the Network Selector to enter the WebSocket URL and connect
The project is configured for easy deployment to Netlify. You can see a live demo at https://mdprana-polkadotjs-interface.netlify.app/.
- Fork this repository
- Sign up for Netlify and connect your GitHub account
- Create a new site from the repository
- Configure the build settings:
- Build command:
npm run build
oryarn build
- Publish directory:
build
- Build command:
- Add the environment variable:
REACT_APP_WS_ENDPOINT=wss://westend-rpc.polkadot.io
- Deploy!
Note: When deployed to Netlify, the application can't directly connect to your local Zombienet node due to browser security restrictions. Use public nodes (like Westend) for testing the deployed version.
You can customize the interface by replacing the images in the public/images
and src/assets
directories:
- Logo: Update
public/logo.png
andpublic/logo192.png
with your project logo - Interface Screenshot: Replace
docs/images/interface-screenshot.png
with a screenshot of your interface - Favicon: Replace
public/favicon.ico
with your own favicon
For more information on the Polkadot.js API and associated libraries, check out:
This project is licensed under the MIT License - see the LICENSE file for details.
- Polkadot.js for the excellent API
- Zombienet for local development tools