A blockchain explorer built with Next.js for Tenzura and other Bitcoin-based cryptocurrencies. This explorer connects directly to your blockchain node via RPC to provide real-time blockchain data and optionally uses MongoDB for enhanced features like address tracking and rich lists.
π Live Demo: https://chain.tenzura.io
π Support Development: Donate with Crypto
Note: This project was previously a private repository, so the git commit history may contain non-descriptive commit messages.
- Real-time Blockchain Data: Connects directly to your node via RPC for live stats
- Block Explorer: Browse blocks and view detailed block information
- Transaction Explorer: View transaction details with inputs/outputs
- Address Lookup: Search for specific addresses (requires MongoDB sync)
- Rich List: Top addresses by balance (requires MongoDB sync)
- Network Statistics: Difficulty, hash rate, peer connections
- Admin Panel: Manage known addresses and sync operations
- Multi-coin Support: Configurable for any Bitcoin-based cryptocurrency
- Modern UI: Built with Next.js, shadcn/ui and Tailwind CSS
- Frontend: Next.js 15, React 19, TypeScript
- UI: shadcn/ui, Radix UI, Tailwind CSS
- Database: MongoDB (optional - enables richlist and address features)
- Blockchain: Bitcoin Core RPC client
- Charts: Chart.js for statistics
The explorer works in two modes:
- Direct blockchain queries via RPC
- Real-time network statistics
- Block and transaction viewing
- Basic search functionality
- All RPC-only features PLUS:
- Address balance tracking
- Rich list functionality
- Transaction history for addresses
- Faster search and pagination
- Historical data storage
- Node.js (v18 or higher)
- A running blockchain node with RPC enabled (Tenzura or compatible Bitcoin-based coin)
- MongoDB (Optional - only needed for richlist and address features)
git clone https://github.com/soosho/tenzura-explorer.git
cd tenzura-explorer
npm install
Copy the example environment file and configure it:
cp .env.example .env
Edit the .env
file with your configuration:
# Blockchain node connection (REQUIRED)
WALLET_HOST=127.0.0.1
WALLET_PORT=9766
WALLET_USERNAME=your_rpc_username
WALLET_PASSWORD=your_rpc_password
# Explorer branding
NEXT_PUBLIC_COIN_NAME=Tenzura
NEXT_PUBLIC_COIN_SYMBOL=TENZ
NEXT_PUBLIC_LOGO_PATH=https://raw.githubusercontent.com/Tenzura/Tenzura/refs/heads/main/share/pixmaps/tenzura256.png
# Admin panel password
ADMIN_PASSWORD=your_admin_password
# MongoDB connection (OPTIONAL - only for richlist/address features)
MONGODB_URI=mongodb://username:password@localhost:27017/explorer
Ensure your blockchain node is running with RPC enabled. Add these lines to your coin's configuration file (e.g., tenzura.conf
):
rpcuser=your_rpc_username
rpcpassword=your_rpc_password
rpcport=9766
rpcallowip=127.0.0.1
server=1
daemon=1
txindex=1
If you want richlist and address tracking features, set up MongoDB and initialize:
npm run init-db
For initial sync of historical data to MongoDB:
npm run sync:index:reindex
For regular updates:
npm run sync:index:update
npm run dev
The application will be available at http://localhost:3000
npm run build
npm start
The explorer includes sync commands for maintaining blockchain data in MongoDB:
Command | Description |
---|---|
npm run sync:index:update |
Update from last synced block to current |
npm run sync:index:check |
Check for missing transactions/addresses |
npm run sync:index:reindex |
Full resync from genesis block |
npm run sync:index:richlist |
Update richlist only |
npm run sync:clean-locks |
Remove stale lock files |
npm run sync:force |
Force update (removes locks first) |
npm run sync:daemon |
Start automatic scheduled sync |
For production with MongoDB, run the sync daemon:
npm run sync:daemon
This keeps your MongoDB data synchronized with the blockchain automatically.
βββ app/ # Next.js app directory
β βββ api/ # API routes
β βββ blocks/ # Block explorer pages
β βββ tx/ # Transaction pages
β βββ address/ # Address pages
βββ components/ # React components
β βββ ui/ # shadcn/ui components
βββ lib/ # Utility libraries
β βββ blockchain.ts # Blockchain RPC client
β βββ mongodb.ts # Database connection
β βββ models.ts # Data models
βββ scripts/ # Sync and maintenance scripts
βββ config/ # Configuration files
βββ types/ # TypeScript type definitions
/api/stats
- Blockchain statistics/api/network
- Network information/api/getblock
- Get block by hash/height/api/getrawtransaction
- Get transaction by hash/api/getblockcount
- Current block count/api/getdifficulty
- Current difficulty/api/peers
- Connected peers
/api/blocks/latest
- Latest blocks from database/api/transactions/latest
- Latest transactions from database
To use this explorer with other Bitcoin-based cryptocurrencies:
- Update RPC Settings: Set the correct host, port, username, and password for your node
- Update Branding: Change coin name, symbol, and logo in environment variables
- Adjust Known Addresses: Edit
config/known-addresses.ts
for your coin's notable addresses
Example for Bitcoin:
WALLET_PORT=8332
NEXT_PUBLIC_COIN_NAME=Bitcoin
NEXT_PUBLIC_COIN_SYMBOL=BTC
NEXT_PUBLIC_LOGO_PATH=https://example.com/bitcoin-logo.png
The explorer should work with any Bitcoin Core compatible RPC interface.
If you find this project useful, consider supporting its development:
π Donate with Crypto - Bitcoin, Ethereum, and many other cryptocurrencies accepted
Your support helps keep this project maintained and improved!
If you encounter any issues:
- Check the Issues page
- Create a new issue with your setup details and error logs
Tenzura Explorer - Explore the blockchain with style and efficiency! π