Skip to content

About

A modern, real-time blockchain explorer for Tenzura and Bitcoin-based cryptocurrencies. Features live RPC data, MongoDB-powered rich lists, multi-coin support, and a polished shadcn/ui dashboard. Built with Next.js 15 + TypeScript.

Topics

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Tenzura Logo

Tenzura Explorer

A modern, real-time blockchain explorer for Tenzura and Bitcoin-based cryptocurrencies

🔗 Live Demo · Quick Start · Features · Architecture · Tenzura Core

Stars Forks License Next.js TypeScript Tailwind Demo

KawPow Bitcoin Based Fair Launch Gaming



✨ What is Tenzura Explorer?

Tenzura Explorer is a production-grade blockchain explorer purpose-built for the Tenzura Network and adaptable to any Bitcoin Core-compatible cryptocurrency. It delivers real-time on-chain data through a polished, responsive UI — giving your community a professional window into the blockchain.

Tenzura ($TENZ) is a fair-launch, community-governed cryptocurrency built on the KawPow proof-of-work algorithm with an advanced asset layer designed for gaming NFTs, true digital ownership, and play-to-earn integration. Zero pre-mine, zero ICO — pure decentralized value.

Why This Explorer?

❌ Most Explorers ✅ Tenzura Explorer
Proprietary / closed source 100% open source (MIT)
Bloated legacy stacks Modern Next.js 15 + React 19
Coin-specific, hard to fork Multi-coin support via .env config
No address tagging Built-in known-addresses system
Bare RPC-only Optional MongoDB for rich lists & analytics

📸 Screenshots

Live at chain.tenzura.io

📊 Dashboard
Real-time blockchain stats, latest blocks, and live transactions — all auto-refreshing every 30 seconds
🧱 Block Explorer 💸 Transaction Details
Browse blocks by height or hash with full metadata — size, difficulty, nonce, Merkle root Inspect inputs/outputs, amounts, confirmations, and timestamps for every transaction
👤 Address Lookup 💰 Rich List
Track balances, transaction history, and known-address labels with MongoDB sync Top holders by balance and total received — sort, filter, and explore
🌐 Network Peers 🔍 Advanced Search
View connected peers with geo-location, protocol version, and connection details Search by block height, block hash, transaction ID, or address in one input

🚀 Features

🔗 Real-Time Blockchain Data

  • Live Dashboard — Block count, difficulty, network hashrate, coin supply at a glance
  • Auto-refresh — Data updates every 30 seconds, no manual reload needed
  • Network Health — Active connections, chain name, protocol status in the header

🧱 Block Explorer

  • Browse blocks by height or hash
  • Full block details: size, difficulty, nonce, Merkle root, bits, timestamp
  • Transaction list per block with amounts and links
  • Previous/Next block navigation

💸 Transaction Explorer

  • View raw transaction data with inputs and outputs
  • Address-level amounts, confirmations, timestamp
  • Copy-friendly monospace TX hashes
  • QR code generation for addresses and transaction IDs

👤 Address Lookup (MongoDB)

  • Balance, total received, total sent
  • Full transaction history per address
  • Known-address tagging system (developer, exchange, foundation labels)

💰 Rich List (MongoDB)

  • Top addresses ranked by balance
  • Top addresses ranked by total received
  • Paginated, searchable, exportable

🌐 Network Insights

  • Peer list with geo-location (country + flag)
  • Protocol version and connection info
  • Real-time peer count

🔒 Admin Panel

  • Password-protected admin area
  • Manage known addresses (add/remove labels)
  • Server reload and health checks
  • Sync operation management

⚙️ Multi-Coin Ready

  • Configure for any Bitcoin Core-compatible chain via environment variables
  • Custom branding: coin name, symbol, logo
  • Tested with Tenzura, works with Bitcoin, Litecoin, Dogecoin, and any BTC-derivative

🏗️ Architecture

┌──────────────────────────────────────────────────────────────┐
│                        BROWSER                               │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐        │
│  │Dashboard │ │  Blocks  │ │   TXs    │ │ Richlist │        │
│  └─────┬────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘        │
└────────┼───────────┼────────────┼────────────┼───────────────┘
         │           │            │            │
         ▼           ▼            ▼            ▼
┌──────────────────────────────────────────────────────────────┐
│                    NEXT.JS 15 APP ROUTER                     │
│  ┌──────────────────────────────────────────────────────┐   │
│  │                  FRONTEND (React 19)                  │   │
│  │  ┌────────┐  shadcn/ui  ┌────────┐  Tailwind CSS 4   │   │
│  │  │ Chart.js│  components │  SWR   │  recharts         │   │
│  │  └────────┘              └────────┘                   │   │
│  └──────────────────────────────────────────────────────┘   │
│                         │                                    │
│  ┌──────────────────────┴──────────────────────────────┐    │
│  │                  API ROUTES                          │    │
│  │  ┌────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐  │    │
│  │  │ /stats │ │ /getblock│ │/getrawtx │ │ /peers  │  │    │
│  │  └────────┘ └──────────┘ └──────────┘ └─────────┘  │    │
│  │  ┌─────────────┐ ┌────────────┐ ┌──────────────┐    │    │
│  │  │ /blocks/    │ │ /txs/      │ │ /geoip       │    │    │
│  │  │ latest      │ │ latest     │ │              │    │    │
│  │  └─────────────┘ └────────────┘ └──────────────┘    │    │
│  └──────────────────────┬──────────────────────────────┘    │
└─────────────────────────┼───────────────────────────────────┘
                          │
              ┌───────────┴───────────┐
              ▼                       ▼
┌──────────────────────┐  ┌──────────────────────────┐
│   BITCOIN CORE RPC   │  │   MONGODB (optional)      │
│                      │  │                          │
│  • getblockchaininfo │  │  • blocks collection      │
│  • getblock          │  │  • transactions collection│
│  • getrawtransaction │  │  • addresses collection   │
│  • getnetworkinfo    │  │  • richlist collection    │
│  • getpeerinfo       │  │  • peers collection       │
│  • getblockhash      │  │  • markets collection     │
│                      │  │  • heavy voting data      │
│  Real-time, always   │  │                          │
│  available           │  │  Historical, indexed      │
└──────────────────────┘  └──────────────────────────┘

Data Flow

  1. User Request → Next.js frontend makes API calls to route handlers
  2. Read Path → Route handlers query either RPC directly (real-time) or MongoDB (indexed/historical)
  3. Write Path → Background sync scripts (npm run sync:*) pull blocks/txs from RPC → index into MongoDB
  4. Daemon Mode → npm run sync:daemon runs scheduled syncs via node-cron for continuous indexing
  5. Rich Lists → Computed from MongoDB address balances, refreshed on demand or by sync

Two Operating Modes

Mode Requires Features
RPC-Only 🌐 Just your coin daemon Blocks, transactions, network stats, search
Full 🗄️ RPC + MongoDB Everything above plus: addresses, rich list, transaction history, fast pagination

⚡ Quick Start

Prerequisites

  • Node.js ≥ 18
  • A running blockchain node with RPC enabled (Tenzura or compatible)
  • MongoDB (optional — only for rich lists & address tracking)

1. Clone & Install

git clone https://github.com/soosho/tenzura-explorer.git
cd tenzura-explorer
npm install

2. Configure

cp .env.example .env

Edit .env with your node's RPC credentials:

# REQUIRED — Blockchain Node
WALLET_HOST=127.0.0.1
WALLET_PORT=9766
WALLET_USERNAME=your_rpc_username
WALLET_PASSWORD=your_rpc_password

# 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
ADMIN_PASSWORD=your_secure_password

# OPTIONAL — MongoDB (for rich features)
MONGODB_URI=mongodb://localhost:27017/explorer

3. Configure Your Coin Daemon

Add to your tenzura.conf (or bitcoin.conf):

rpcuser=your_rpc_username
rpcpassword=your_rpc_password
rpcport=9766
rpcallowip=127.0.0.1
server=1
txindex=1

4. (Optional) Initialize MongoDB & Sync

# Initialize database collections
npm run init-db

# Full sync from genesis (first time)
npm run sync:index:reindex

# Or: start the auto-sync daemon
npm run sync:daemon

5. Launch

# Development
npm run dev               # → http://localhost:3000

# Production
npm run build && npm start

🛠️ Advanced

Multi-Coin Configuration

This explorer works with any Bitcoin Core-compatible blockchain. Just change the environment variables:

Coin WALLET_PORT NEXT_PUBLIC_COIN_SYMBOL
Tenzura 9766 TENZ
Bitcoin 8332 BTC
Litecoin 9332 LTC
Dogecoin 22555 DOGE
Ravencoin 8766 RVN

Sync Commands Reference

Command Purpose
npm run sync:index:update Update from last synced block to tip
npm run sync:index:check Repair missing transactions/addresses
npm run sync:index:reindex Full resync from genesis
npm run sync:index:richlist Recompute rich list only
npm run sync:market Update market/exchange data
npm run sync:daemon Auto-sync daemon (cron-scheduled)
npm run sync:clean-locks Remove stale lock files
npm run sync:force Clean locks + update

Custom Known Addresses

Label important addresses in config/known-addresses.ts:

"TpFA1tzWgz1t2G8edzi65G5UJLkNscgXHX": {
  label: "Foundation Wallet",
  description: "Tenzura development & ecosystem fund",
  type: "foundation",
  verified: true
}

Deploy to Production

# Self-hosted
npm run build && npm start

# Vercel / Docker
# Standard Next.js deployment — see next.config.ts

📁 Project Structure

tenzura-explorer/
├── app/                          # Next.js App Router
│   ├── api/                      # REST API routes (RPC proxy + MongoDB)
│   │   ├── stats/route.ts        # Blockchain statistics
│   │   ├── getblock/route.ts     # Block by hash/height
│   │   ├── getrawtransaction/    # Raw transaction data
│   │   ├── blocks/latest/        # Paginated blocks from DB
│   │   ├── transactions/latest/  # Latest transactions from DB
│   │   ├── network/route.ts      # Network info
│   │   ├── peers/route.ts        # Peer list with geo-data
│   │   ├── qr/route.ts           # QR code generation
│   │   ├── geoip/route.ts        # Geo-location lookups
│   │   └── admin/                # Protected admin endpoints
│   ├── blocks/page.tsx           # Blocks list with pagination
│   ├── block/[height]/page.tsx   # Single block detail
│   ├── txs/page.tsx              # Transactions list
│   ├── tx/[txid]/page.tsx        # Single transaction detail
│   ├── address/[address]/page.tsx # Address detail & history
│   ├── richlist/page.tsx         # Top addresses by balance
│   ├── peers/page.tsx            # Network peer map
│   ├── search/page.tsx           # Universal search
│   ├── admin/                    # Admin panel (password-protected)
│   └── page.tsx                  # Home dashboard
├── components/ui/                # shadcn/ui (50+ components)
├── lib/
│   ├── blockchain.ts             # Bitcoin Core RPC client
│   ├── blockchain-api.ts         # Higher-level query API
│   ├── mongodb.ts                # MongoDB connection & caching
│   ├── models.ts                 # TypeScript type definitions
│   └── utils.ts                  # Formatting & helpers
├── config/
│   └── known-addresses.ts        # Address labeling system
├── scripts/
│   ├── sync.ts                   # Main sync engine
│   ├── init-db.ts                # Database setup
│   ├── run-sync.ts               # Background sync daemon
│   └── clean-locks.ts            # Lock file management
├── hooks/                        # Custom React hooks
├── types/                        # Additional TypeScript types
├── middleware.ts                 # Route protection & redirects
└── .github/FUNDING.yml           # Sponsor configuration

🔌 API Endpoints

Always Available (RPC)

Endpoint Description
GET /api/stats Blockchain stats (blocks, difficulty, hashrate, supply)
GET /api/network Network info (connections, protocol, subversion)
GET /api/getblock?hash= Block by hash or height
GET /api/getrawtransaction?txid= Raw transaction by TXID
GET /api/getblockcount Current tip height
GET /api/getblockhash?height= Block hash at height
GET /api/getdifficulty Current network difficulty
GET /api/getnetworkhashps Estimated network hashrate
GET /api/peers Connected peer information with geo-data
GET /api/qr?data= QR code PNG for any string

MongoDB-Dependent

Endpoint Description
GET /api/blocks/latest?limit=&offset= Paginated latest blocks
GET /api/transactions/latest?limit=&offset= Paginated latest transactions
GET /api/info Rich list & supply summary
GET /api/geoip?ip= Geo-location lookup for IP

🤝 Community & Support


🧑‍💻 Contributing

Contributions are welcome! Whether it's a bug fix, feature, documentation improvement, or just a star — everything helps.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-thing)
  3. Commit your changes (git commit -m 'Add amazing thing')
  4. Push to the branch (git push origin feature/amazing-thing)
  5. Open a Pull Request

See CONTRIBUTING.md for more details.


📄 License

MIT © soosho


Built with ❤️ for the Tenzura community · chain.tenzura.io

About

A modern, real-time blockchain explorer for Tenzura and Bitcoin-based cryptocurrencies. Features live RPC data, MongoDB-powered rich lists, multi-coin support, and a polished shadcn/ui dashboard. Built with Next.js 15 + TypeScript.

Topics

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages