{"id":29560939,"url":"https://github.com/soosho/tenzura-explorer","last_synced_at":"2025-07-18T15:39:28.758Z","repository":{"id":304496445,"uuid":"986305433","full_name":"soosho/tenzura-explorer","owner":"soosho","description":"A modern blockchain explorer for Tenzura and Bitcoin-based cryptocurrencies built with Next.js. Features real-time RPC data, optional MongoDB sync for rich lists, and multi-coin support.","archived":false,"fork":false,"pushed_at":"2025-07-13T12:28:45.000Z","size":236,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-13T14:26:11.616Z","etag":null,"topics":["bitcoin","block-explorer","blockchain","cryptocurrency","explorer","nextjs","tenzura","typescript"],"latest_commit_sha":null,"homepage":"https://chain.tenzura.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soosho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://nowpayments.io/donation/soosho"]}},"created_at":"2025-05-19T12:12:28.000Z","updated_at":"2025-07-13T12:29:41.000Z","dependencies_parsed_at":"2025-07-13T14:36:52.477Z","dependency_job_id":null,"html_url":"https://github.com/soosho/tenzura-explorer","commit_stats":null,"previous_names":["soosho/tenzura-explorer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/soosho/tenzura-explorer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soosho%2Ftenzura-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soosho%2Ftenzura-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soosho%2Ftenzura-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soosho%2Ftenzura-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soosho","download_url":"https://codeload.github.com/soosho/tenzura-explorer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soosho%2Ftenzura-explorer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265787617,"owners_count":23828459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","block-explorer","blockchain","cryptocurrency","explorer","nextjs","tenzura","typescript"],"created_at":"2025-07-18T15:39:28.091Z","updated_at":"2025-07-18T15:39:28.747Z","avatar_url":"https://github.com/soosho.png","language":"TypeScript","funding_links":["https://nowpayments.io/donation/soosho"],"categories":[],"sub_categories":[],"readme":"# Tenzura Explorer\n\nA 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.\n\n🔗 **Live Demo**: [https://chain.tenzura.io](https://chain.tenzura.io)  \n💝 **Support Development**: [Donate with Crypto](https://nowpayments.io/donation/soosho)\n\n\u003e **Note**: This project was previously a private repository, so the git commit history may contain non-descriptive commit messages.\n\n## Features\n\n- **Real-time Blockchain Data**: Connects directly to your node via RPC for live stats\n- **Block Explorer**: Browse blocks and view detailed block information  \n- **Transaction Explorer**: View transaction details with inputs/outputs\n- **Address Lookup**: Search for specific addresses (requires MongoDB sync)\n- **Rich List**: Top addresses by balance (requires MongoDB sync)\n- **Network Statistics**: Difficulty, hash rate, peer connections\n- **Admin Panel**: Manage known addresses and sync operations\n- **Multi-coin Support**: Configurable for any Bitcoin-based cryptocurrency\n- **Modern UI**: Built with Next.js, shadcn/ui and Tailwind CSS\n\n## Tech Stack\n\n- **Frontend**: Next.js 15, React 19, TypeScript\n- **UI**: shadcn/ui, Radix UI, Tailwind CSS  \n- **Database**: MongoDB (optional - enables richlist and address features)\n- **Blockchain**: Bitcoin Core RPC client\n- **Charts**: Chart.js for statistics\n\n## Architecture\n\nThe explorer works in two modes:\n\n### 1. **RPC-Only Mode** (MongoDB not required)\n- Direct blockchain queries via RPC\n- Real-time network statistics\n- Block and transaction viewing\n- Basic search functionality\n\n### 2. **Full Mode** (MongoDB required)  \n- All RPC-only features PLUS:\n- Address balance tracking\n- Rich list functionality  \n- Transaction history for addresses\n- Faster search and pagination\n- Historical data storage\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) (v18 or higher)\n- A running blockchain node with RPC enabled (Tenzura or compatible Bitcoin-based coin)\n- [MongoDB](https://www.mongodb.com/docs/manual/installation/) *(Optional - only needed for richlist and address features)*\n\n## Installation\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/soosho/tenzura-explorer.git\ncd tenzura-explorer\n```\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Set Up Environment Variables\n\nCopy the example environment file and configure it:\n\n```bash\ncp .env.example .env\n```\n\nEdit the `.env` file with your configuration:\n\n```env\n# Blockchain node connection (REQUIRED)\nWALLET_HOST=127.0.0.1\nWALLET_PORT=9766\nWALLET_USERNAME=your_rpc_username\nWALLET_PASSWORD=your_rpc_password\n\n# Explorer branding\nNEXT_PUBLIC_COIN_NAME=Tenzura\nNEXT_PUBLIC_COIN_SYMBOL=TENZ\nNEXT_PUBLIC_LOGO_PATH=https://raw.githubusercontent.com/Tenzura/Tenzura/refs/heads/main/share/pixmaps/tenzura256.png\n\n# Admin panel password\nADMIN_PASSWORD=your_admin_password\n\n# MongoDB connection (OPTIONAL - only for richlist/address features)\nMONGODB_URI=mongodb://username:password@localhost:27017/explorer\n```\n\n### 4. Set Up Your Blockchain Node\n\nEnsure your blockchain node is running with RPC enabled. Add these lines to your coin's configuration file (e.g., `tenzura.conf`):\n\n```conf\nrpcuser=your_rpc_username\nrpcpassword=your_rpc_password\nrpcport=9766\nrpcallowip=127.0.0.1\nserver=1\ndaemon=1\ntxindex=1\n```\n\n### 5. Initialize Database (Optional - for MongoDB features only)\n\nIf you want richlist and address tracking features, set up MongoDB and initialize:\n\n```bash\nnpm run init-db\n```\n\n### 6. Sync Blockchain Data (Optional - for MongoDB features only)\n\nFor initial sync of historical data to MongoDB:\n\n```bash\nnpm run sync:index:reindex\n```\n\nFor regular updates:\n\n```bash\nnpm run sync:index:update\n```\n\n## Running the Application\n\n### Development Mode\n\n```bash\nnpm run dev\n```\n\nThe application will be available at [http://localhost:3000](http://localhost:3000)\n\n### Production Mode\n\n```bash\nnpm run build\nnpm start\n```\n\n## Sync Commands (MongoDB Features)\n\nThe explorer includes sync commands for maintaining blockchain data in MongoDB:\n\n| Command | Description |\n|---------|-------------|\n| `npm run sync:index:update` | Update from last synced block to current |\n| `npm run sync:index:check` | Check for missing transactions/addresses |  \n| `npm run sync:index:reindex` | Full resync from genesis block |\n| `npm run sync:index:richlist` | Update richlist only |\n| `npm run sync:clean-locks` | Remove stale lock files |\n| `npm run sync:force` | Force update (removes locks first) |\n| `npm run sync:daemon` | Start automatic scheduled sync |\n\n### Automated Sync\n\nFor production with MongoDB, run the sync daemon:\n\n```bash\nnpm run sync:daemon\n```\n\nThis keeps your MongoDB data synchronized with the blockchain automatically.\n\n## Project Structure\n\n```\n├── app/                    # Next.js app directory\n│   ├── api/               # API routes\n│   ├── blocks/            # Block explorer pages\n│   ├── tx/                # Transaction pages\n│   └── address/           # Address pages\n├── components/            # React components\n│   └── ui/               # shadcn/ui components\n├── lib/                  # Utility libraries\n│   ├── blockchain.ts     # Blockchain RPC client\n│   ├── mongodb.ts        # Database connection\n│   └── models.ts         # Data models\n├── scripts/              # Sync and maintenance scripts\n├── config/               # Configuration files\n└── types/                # TypeScript type definitions\n```\n\n## API Endpoints\n\n### Direct RPC Endpoints (always available)\n- `/api/stats` - Blockchain statistics  \n- `/api/network` - Network information\n- `/api/getblock` - Get block by hash/height\n- `/api/getrawtransaction` - Get transaction by hash\n- `/api/getblockcount` - Current block count\n- `/api/getdifficulty` - Current difficulty  \n- `/api/peers` - Connected peers\n\n### MongoDB-dependent Endpoints (require sync)\n- `/api/blocks/latest` - Latest blocks from database\n- `/api/transactions/latest` - Latest transactions from database\n\n## Configuration for Other Coins\n\nTo use this explorer with other Bitcoin-based cryptocurrencies:\n\n1. **Update RPC Settings**: Set the correct host, port, username, and password for your node\n2. **Update Branding**: Change coin name, symbol, and logo in environment variables\n3. **Adjust Known Addresses**: Edit `config/known-addresses.ts` for your coin's notable addresses\n\nExample for Bitcoin:\n\n```env\nWALLET_PORT=8332\nNEXT_PUBLIC_COIN_NAME=Bitcoin  \nNEXT_PUBLIC_COIN_SYMBOL=BTC\nNEXT_PUBLIC_LOGO_PATH=https://example.com/bitcoin-logo.png\n```\n\nThe explorer should work with any Bitcoin Core compatible RPC interface.\n\n## Support the Development\n\nIf you find this project useful, consider supporting its development:\n\n🚀 **[Donate with Crypto](https://nowpayments.io/donation/soosho)** - Bitcoin, Ethereum, and many other cryptocurrencies accepted\n\nYour support helps keep this project maintained and improved!\n\n## Issues\n\nIf you encounter any issues:\n\n1. Check the [Issues](https://github.com/soosho/tenzura-explorer/issues) page\n2. Create a new issue with your setup details and error logs\n\n---\n\n**Tenzura Explorer** - Explore the blockchain with style and efficiency! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoosho%2Ftenzura-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoosho%2Ftenzura-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoosho%2Ftenzura-explorer/lists"}