A highly responsive, serverless EVM blockchain explorer that operates entirely in the browser.
Just as xylem tissue transports nutrients directly from a plant's roots to its leaves, this application connects directly to JSON-RPC and WebSocket (WSS) endpoints, bypassing centralized indexers entirely.
Xylem provides developers with a minimalist, clean, and unfiltered way to stream live blocks, inspect transactions, and monitor network health in real-time. It is designed as a stateless, backendless EVM explorer, ensuring privacy and direct interaction with the blockchain.
- Stateless & Backendless: Connects directly to RPC nodes; no intermediary servers or databases.
- Real-time Updates: Live streaming of blocks and transactions.
- Block Explorer: View detailed block information, including gas usage, miner details, and transaction lists.
- Transaction Details: Inspect transaction status, value, and gas fees.
- Address Details: Check wallet balances, transaction counts, and contract bytecode.
- Multi-Network Support: Easily switch between supported networks.
- Global Search: Quickly find blocks, transactions, or addresses.
- Gas Tracker: Monitor current gas prices.
Xylem can be configured in two ways:
- Environment Variables: For single-chain deployments or quick setups.
config/config.json: For multi-chain support and advanced configuration.
Create a .env file in the root directory (copy from .env.example):
| Variable | Description | Default (Sepolia) |
|---|---|---|
VITE_CHAIN_ID |
The Chain ID of the network | 11155111 |
VITE_CHAIN_NAME |
The display name of the network | Sepolia |
VITE_CHAIN_RPC_URL |
The HTTP JSON-RPC endpoint | https://rpc.sepolia.org |
VITE_CHAIN_WS_URL |
The WebSocket (WSS) endpoint | wss://rpc.sepolia.org |
VITE_CHAIN_SYMBOL |
The native currency symbol | ETH |
VITE_CHAIN_BLOCK_EXPLORER_URL |
URL to an external block explorer (optional) | https://sepolia.etherscan.io |
Note: Since Xylem is a client-side application, these variables are embedded into the build. You must provide them at build time.
To support multiple networks, create a config/config.json file. You can use config/config.json.template as a starting point.
{
"networks": [
{
"id": 1,
"name": "Ethereum",
"rpcUrl": "https://eth.merkle.io",
"wsUrl": "wss://eth.merkle.io",
"currency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"blockExplorerBaseUrl": "https://etherscan.io"
},
{
"id": 8453,
"name": "Base",
"rpcUrl": "https://mainnet.base.org",
"wsUrl": "wss://base-rpc.publicnode.com",
"currency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"blockExplorerBaseUrl": "https://basescan.org"
}
]
}If config.json is present, it will be loaded alongside any environment variables. If both are present, the environment variables will be added as an additional network (if valid).
Docker
You can deploy using Docker with either environment variables or by mounting a config.json file.
Option 1: Using Environment Variables (Single Chain)
# Build the Docker image
docker build \
--build-arg VITE_CHAIN_ID=1 \
--build-arg VITE_CHAIN_NAME="Ethereum Mainnet" \
--build-arg VITE_CHAIN_RPC_URL="https://eth.merkle.io" \
--build-arg VITE_CHAIN_WS_URL="wss://eth.merkle.io" \
--build-arg VITE_CHAIN_SYMBOL="ETH" \
-t xylem-explorer .
# Run the container
docker run -p 8080:80 xylem-explorerOption 2: Using config.json (Multi-Chain)
- Create your
config/config.jsonfile. - Build the image (no build args needed for config.json support, but the file must be present at build time).
# Copy config.json to config/config.json before building
cp config/config.json.template config/config.json
# Build
docker build -t xylem-explorer .
# Run
docker run -p 8080:80 xylem-explorerThe application will be available at http://localhost:8080.
Vercel
Xylem is optimized for Vercel deployment. Vercel deployments primarily support Environment Variables configuration.
-
Install Vercel CLI:
npm i -g vercel
-
Deploy: Set the environment variables in the Vercel Dashboard or
vercel.json(not recommended for secrets) before deploying.vercel --env VITE_CHAIN_RPC_URL="https://..." --env VITE_CHAIN_ID=1 ...
Alternatively, push to GitHub and connect your repository to Vercel for automatic deployments. A vercel.json is included for configuration.
Nginx
To deploy manually with Nginx, you can use either method.
Option 1: Build with Environment Variables
# Export variables
export VITE_CHAIN_ID=1
export VITE_CHAIN_NAME="Ethereum"
# ... other variables
# Build
npm run buildOption 2: Build with config.json
- Ensure
config/config.jsonexists and contains your network configuration. - Build the project:
npm run build
Then serve with Nginx:
-
Configure Nginx: Use the provided
nginx.confas a template. Copy it to/etc/nginx/sites-available/xylemand symlink tosites-enabled. -
Copy files: Copy the contents of the
distfolder to your Nginx root (e.g.,/var/www/xylem).
Caddy
Caddy is a modern web server that is easy to configure and use. A Caddyfile is provided for quick deployment.
-
Build the project: Configure your environment variables or
config.jsonas described above, then run the build command:npm run build
This command generates a
distfolder in the project root containing the production build. -
Serve with Caddy: Ensure you have Caddy installed.
Make sure the
Caddyfileand thedistfolder are in the same directory.Run the following command in that directory:
caddy run
The application will be available at
http://localhost.
This project is licensed under the MIT License - see the LICENSE file for details.
