Skip to content

A modern, real-time blockchain explorer built with React and TypeScript for exploring Cosmos-based blockchains, specifically designed for Coreum and other Cosmos SDK chains.

License

Notifications You must be signed in to change notification settings

Vector-6/Coreum-Explorer

Repository files navigation

Coreum Explorer (Dexplorer)

A modern, real-time blockchain explorer built with React and TypeScript for exploring Cosmos-based blockchains, specifically designed for Coreum and other Cosmos SDK chains.

Dexplorer Dashboard

๐ŸŒŸ Features

๐Ÿ“Š Real-time Dashboard

  • Live Block Monitoring: Real-time block updates with live streaming
  • Network Statistics: Current block height, active validators, transaction count, and block time
  • Network Health: Connection status, consensus metrics, and uptime monitoring
  • Recent Activity: Live feed of latest blocks and transactions

๐Ÿ” Blockchain Exploration

  • Blocks: Browse and search blocks with detailed information
  • Transactions: Real-time transaction feed with message type detection
  • Validators: Active validator list with voting power and commission rates
  • Accounts: Account details and transaction history
  • Proposals: Governance proposals with voting status and details

โš™๏ธ Network Parameters

  • Mint Parameters: Inflation rates, token supply, and minting rules
  • Staking Parameters: Unbonding periods, validator limits, and bond denominations
  • Distribution Parameters: Community tax, proposer rewards, and withdrawal settings
  • Slashing Parameters: Downtime penalties, double-signing penalties, and jail durations
  • Governance Parameters: Voting periods, deposit requirements, and quorum thresholds

๐ŸŽจ Modern UI/UX

  • Dark/Light Theme: Automatic theme switching with system preference detection
  • Responsive Design: Mobile-first design that works on all devices
  • Interactive Components: Hover effects, smooth transitions, and loading states
  • Real-time Updates: Live data streaming without page refreshes

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or pnpm

Installation

  1. Clone the repository

    git clone https://github.com/skc951201/Coreum-Explorer.git
    cd Coreum-Explorer
  2. Install dependencies

    npm install
    # or
    pnpm install
  3. Start development server

    npm run dev
    # or
    pnpm dev
  4. Open your browser Navigate to http://localhost:5173

Building for Production

npm run build
# or
pnpm build

The built files will be in the dist directory.

๐Ÿ”ง Configuration

RPC Endpoints

The explorer connects to Cosmos RPC endpoints via WebSocket. You can:

  1. Use predefined chains: Select from popular chains like Cosmos Hub and Osmosis
  2. Add custom RPC: Enter any Cosmos-compatible RPC endpoint
  3. Auto-reconnection: The app automatically reconnects to your last used endpoint

Supported Chains

  • Coreum: Primary target blockchain
  • Cosmos Hub: Full support for ATOM chain
  • Osmosis: DEX protocol exploration
  • Any Cosmos SDK Chain: Compatible with any Cosmos-based blockchain

๐Ÿ—๏ธ Architecture

Tech Stack

  • Frontend: React 18 + TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS + Custom Theme System
  • State Management: Redux Toolkit + Zustand
  • Blockchain: CosmJS (Cosmos JavaScript SDK)
  • UI Components: Custom components with Framer Motion
  • Icons: Lucide React + React Icons

Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ Layout/         # App layout and navigation
โ”‚   โ”œโ”€โ”€ ui/             # Basic UI components
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ pages/              # Route-based page components
โ”‚   โ”œโ”€โ”€ Home.tsx        # Dashboard
โ”‚   โ”œโ”€โ”€ Blocks.tsx      # Block explorer
โ”‚   โ”œโ”€โ”€ Transactions.tsx # Transaction explorer
โ”‚   โ”œโ”€โ”€ Validators.tsx  # Validator list
โ”‚   โ”œโ”€โ”€ Proposals.tsx   # Governance proposals
โ”‚   โ””โ”€โ”€ Parameters.tsx  # Network parameters
โ”œโ”€โ”€ rpc/                # Blockchain communication
โ”‚   โ”œโ”€โ”€ client/         # RPC client setup
โ”‚   โ”œโ”€โ”€ abci/           # ABCI queries
โ”‚   โ””โ”€โ”€ subscribe/      # WebSocket subscriptions
โ”œโ”€โ”€ store/              # State management
โ”‚   โ”œโ”€โ”€ connectSlice.ts # Connection state
โ”‚   โ”œโ”€โ”€ streamSlice.ts  # Real-time data
โ”‚   โ””โ”€โ”€ paramsSlice.ts  # Network parameters
โ”œโ”€โ”€ theme/              # Theme system
โ”œโ”€โ”€ utils/              # Utility functions
โ””โ”€โ”€ encoding/           # Message encoding/decoding

Key Features Implementation

Real-time Data Streaming

  • WebSocket Connections: Direct connection to Tendermint RPC
  • Event Subscriptions: New block and transaction events
  • State Persistence: Redux store with persistent data
  • Auto-reconnection: Automatic reconnection on connection loss

Message Decoding

  • Cosmos Types: Full support for Cosmos SDK message types
  • Transaction Parsing: Automatic message type detection
  • Event Processing: Real-time event parsing and display

Theme System

  • Dynamic Theming: Runtime theme switching
  • CSS Variables: Dynamic color system
  • System Preference: Automatic dark/light mode detection

๐Ÿ”Œ API Integration

RPC Methods Used

  • status() - Network status and latest block
  • block() - Block details by height
  • tx() - Transaction details by hash
  • abci_query() - Custom queries for validators, proposals, parameters
  • WebSocket subscriptions for real-time updates

Supported Queries

  • Validator information and voting power
  • Governance proposals and voting
  • Network parameters (mint, staking, distribution, slashing, governance)
  • Account balances and delegations

๐ŸŽจ Customization

Adding New Chains

  1. Add RPC endpoint to the chain list in src/components/Connect/index.tsx
  2. Update chain-specific configurations if needed
  3. Test with the new chain's RPC endpoint

Theming

  • Modify src/theme/colors.ts for color schemes
  • Update CSS variables in src/theme/ThemeProvider.tsx
  • Customize component styles in individual files

Adding New Features

  • Create new page components in src/pages/
  • Add routes in src/App.tsx
  • Implement RPC queries in src/rpc/abci/
  • Update navigation in src/components/Layout/

๐Ÿš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Configure build settings:
    • Build Command: npm run build
    • Output Directory: dist
  3. Deploy automatically on push to main branch

Other Platforms

  • Netlify: Use npm run build and deploy dist folder
  • GitHub Pages: Use GitHub Actions to build and deploy
  • Docker: Create Dockerfile for containerized deployment

๐Ÿค Contributing

We welcome contributions! Please see our contributing guidelines:

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

Development Guidelines

  • Follow TypeScript best practices
  • Use Prettier for code formatting
  • Write meaningful commit messages
  • Test your changes thoroughly
  • Update documentation as needed

๐Ÿ“ License

This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • CosmJS: For the excellent Cosmos JavaScript SDK
  • React Team: For the amazing React framework
  • Tailwind CSS: For the utility-first CSS framework
  • Cosmos Community: For the vibrant ecosystem and support

๐Ÿ“ž Support

๐Ÿ”ฎ Roadmap

  • Mobile App: React Native version
  • Advanced Analytics: Charts and graphs for network analysis
  • Multi-chain Support: Support for multiple chains simultaneously
  • Custom Themes: User-defined color schemes
  • Export Features: Data export capabilities
  • API Endpoints: REST API for external integrations
  • Notification System: Real-time alerts and notifications

Built with โค๏ธ for the Cosmos ecosystem

Dexplorer - Explore the Cosmos, one block at a time.

About

A modern, real-time blockchain explorer built with React and TypeScript for exploring Cosmos-based blockchains, specifically designed for Coreum and other Cosmos SDK chains.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages