Skip to content

Professional analytics web app/dashboard for Ronin blockchain gaming economy with real-time insights, network health monitoring, and comprehensive DeFi/NFT marketplace intelligence.

License

Notifications You must be signed in to change notification settings

joshuatochinwachi/Ronin-Ecosystem-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ronin Ecosystem Tracker

A comprehensive, production-grade analytics platform for the Ronin blockchain gaming economy. This project provides real-time insights into gaming performance, DeFi activity, NFT marketplace dynamics, and network health monitoring through multiple interfaces: a modern web dashboard, a Streamlit analytics app, and a robust FastAPI backend.

🌐 Live Applications

πŸ“Š Project Overview

This platform aggregates and visualizes data from 13 different data sources (1 CoinGecko + 12 Dune Analytics queries) to provide a holistic view of the Ronin Network ecosystem. The architecture consists of three main components:

  1. FastAPI Backend - Raw data pass-through with 24-hour intelligent caching
  2. Next.js Frontend - Modern, interactive web dashboard with real-time updates
  3. Streamlit App - Professional analytics interface with advanced visualizations

✨ Core Features

Analytics Capabilities

  • Gaming Intelligence: Player behavior analysis, game performance rankings, revenue optimization
  • DeFi Analytics: Liquidity flow analysis, trading patterns, whale activity monitoring
  • NFT Marketplace Intel: Collection performance metrics, floor price analytics, revenue breakdown
  • Network Health Monitoring: Real-time performance scoring, congestion analysis, predictive alerts
  • Token Holder Analytics: Distribution analysis, segmentation (whales, large holders, retail)
  • User Retention Analysis: Cohort-based retention tracking with interactive heatmaps

Technical Features

  • 24-hour intelligent caching system for optimal API usage
  • Real-time alert system with severity levels
  • Actionable recommendations and insights
  • Interactive charts and visualizations (Plotly, Recharts)
  • Dark/light mode with persistent preferences
  • Responsive design for all devices
  • Auto-refresh capabilities with manual override
  • Time-based filtering (7, 30, 90 days, all time)

πŸ—οΈ Architecture

System Design

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  External APIs  │────▢│  FastAPI Backend │────▢│  Application   β”‚
β”‚                 β”‚     β”‚  (Railway)       β”‚     β”‚                 β”‚
β”‚ β€’ Dune (x12)    β”‚     β”‚                  β”‚     β”‚ β€’ Next.js Web   β”‚
β”‚ β€’ CoinGecko     β”‚     β”‚ β€’ 24hr Cache     β”‚     β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚ β€’ Rate Limiting  β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚ β€’ Data Proxy     β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

  1. External APIs β†’ FastAPI fetches from Dune Analytics & CoinGecko
  2. Caching Layer β†’ 24-hour cache with joblib for persistent storage
  3. API Endpoints β†’ RESTful endpoints serve raw, unmanipulated data
  4. Frontend App β†’ Next.js consume API data
  5. User Interface β†’ Interactive visualizations and real-time updates

πŸ“‘ API Documentation

Base URL

Production: https://web-production-4fae.up.railway.app

Key Endpoints

CoinGecko Data

  • GET /api/raw/coingecko/ron - RON token market data

Dune Analytics Data (12 endpoints)

  • GET /api/raw/dune/ronin_daily_activity - Daily network metrics
  • GET /api/raw/dune/games_overall_activity - Gaming statistics
  • GET /api/raw/dune/games_daily_activity - Daily gaming activity
  • GET /api/raw/dune/user_activation_retention - User retention cohorts
  • GET /api/raw/dune/ron_current_holders - Token holder data
  • GET /api/raw/dune/ron_segmented_holders - Holder segmentation
  • GET /api/raw/dune/wron_active_trade_pairs - DEX trading pairs
  • GET /api/raw/dune/wron_whale_tracking - Whale wallet activity
  • GET /api/raw/dune/wron_volume_liquidity - Volume & liquidity
  • GET /api/raw/dune/wron_trading_hourly - Hourly trading patterns
  • GET /api/raw/dune/wron_weekly_segmentation - Weekly trader segments
  • GET /api/raw/dune/nft_collections - NFT marketplace data

Utility Endpoints

  • GET /api/cache/status - Cache status for all sources
  • POST /api/cache/refresh - Force refresh all data
  • POST /api/cache/clear - Clear all cached data
  • GET /api/bulk/all - Get all data sources at once

πŸ› οΈ Technology Stack

Backend (FastAPI)

  • Framework: FastAPI
  • Data Processing: Pandas, NumPy
  • Caching: Joblib (24-hour persistent cache)
  • APIs: Dune Analytics, CoinGecko Pro
  • Async Operations: aiohttp, asyncio
  • Deployment: Railway

Frontend (Next.js)

  • Framework: Next.js 15 with App Router
  • UI Library: React 19, TypeScript
  • Styling: Tailwind CSS v4, shadcn/ui
  • Charts: Recharts
  • Data Fetching: SWR (stale-while-revalidate)
  • Icons: Lucide React
  • Deployment: Vercel

πŸ“ Project Structure

ronin-ecosystem-tracker/
β”œβ”€β”€ main.py                      # FastAPI backend application
β”œβ”€β”€ ronin_tracker_app.py         # Streamlit analytics app
β”œβ”€β”€ requirements.txt             # Python dependencies
β”œβ”€β”€ .env                         # Environment variables (create locally)
β”œβ”€β”€ raw_data_cache/             # Cache directory (auto-created)
β”œβ”€β”€ frontend/                    # Next.js application
β”‚  β”œβ”€β”€ app/
β”‚  β”‚   β”œβ”€β”€ api/                    # Next.js API routes (proxy layer)
β”‚  β”‚   β”‚   β”œβ”€β”€ coingecko/
β”‚  β”‚   β”‚   β”‚   └── ron/
β”‚  β”‚   β”‚   β”‚       └── route.ts    # RON token data endpoint
β”‚  β”‚   β”‚   └── dune/
β”‚  β”‚   β”‚       β”œβ”€β”€ games-overall/
β”‚  β”‚   β”‚       β”œβ”€β”€ games-daily/
β”‚  β”‚   β”‚       β”œβ”€β”€ ronin-daily/
β”‚  β”‚   β”‚       β”œβ”€β”€ retention/
β”‚  β”‚   β”‚       β”œβ”€β”€ holders/
β”‚  β”‚   β”‚       β”œβ”€β”€ segmented-holders/
β”‚  β”‚   β”‚       β”œβ”€β”€ trade-pairs/
β”‚  β”‚   β”‚       β”œβ”€β”€ whales/
β”‚  β”‚   β”‚       β”œβ”€β”€ volume-liquidity/
β”‚  β”‚   β”‚       β”œβ”€β”€ hourly/
β”‚  β”‚   β”‚       β”œβ”€β”€ weekly-segmentation/
β”‚  β”‚   β”‚       └── nft-collections/
β”‚  β”‚   β”œβ”€β”€ layout.tsx              # Root layout with theme provider
β”‚  β”‚   β”œβ”€β”€ page.tsx                # Main dashboard page
β”‚  β”‚   └── globals.css             # Global styles and design tokens
β”‚  β”œβ”€β”€ components/
β”‚  β”‚   β”œβ”€β”€ ui/                     # shadcn/ui components
β”‚  β”‚   β”œβ”€β”€ animated-background.tsx # Particle animation system
β”‚  β”‚   β”œβ”€β”€ gaming-economy.tsx      # Gaming metrics section
β”‚  β”‚   β”œβ”€β”€ header.tsx              # Dashboard header with refresh
β”‚  β”‚   β”œβ”€β”€ hero-section.tsx        # RON token overview
β”‚  β”‚   β”œβ”€β”€ katana-dex.tsx          # DEX analytics section
β”‚  β”‚   β”œβ”€β”€ network-activity.tsx    # Network activity charts
β”‚  β”‚   β”œβ”€β”€ network-health.tsx      # Network health metrics
β”‚  β”‚   β”œβ”€β”€ nft-collections.tsx     # NFT collections table
β”‚  β”‚   β”œβ”€β”€ nft-marketplace.tsx     # NFT marketplace section
β”‚  β”‚   β”œβ”€β”€ retention-heatmap.tsx   # Cohort retention heatmap
β”‚  β”‚   β”œβ”€β”€ theme-provider.tsx      # Dark/light mode provider
β”‚  β”‚   β”œβ”€β”€ theme-toggle.tsx        # Theme switcher button
β”‚  β”‚   β”œβ”€β”€ token-holders.tsx       # Token holder analytics
β”‚  β”‚   └── token-metrics.tsx       # Token metrics cards
β”‚  β”œβ”€β”€ hooks/
β”‚  β”‚   β”œβ”€β”€ use-mobile.tsx          # Mobile detection hook
β”‚  β”‚   └── use-toast.ts            # Toast notification hook
β”‚  β”œβ”€β”€ lib/
β”‚  β”‚   └── utils.ts                # Utility functions (cn, etc.)
β”‚  └── public/                     # Static assets
β”œβ”€β”€ Notebooks/                   # Jupyter notebooks for analysis
└── README.md                   # This file

πŸ”§ Configuration

Caching System

  • Duration: 24-hour cache lifecycle
  • Storage: Local filesystem using Joblib
  • Validation: Automatic cache expiration and refresh
  • Background Tasks: Auto-refresh every 24 hours
  • Efficiency: Shared cache across all users

πŸ“ˆ Performance Considerations

  • API Rate Limits: 24-hour caching minimizes API calls
  • Memory Management: Efficient pandas operations for large datasets
  • Lazy Loading: Progressive component loading for better UX
  • Auto-refresh: Smart revalidation with SWR
  • Background Tasks: Non-blocking data refresh operations

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • KTTY World - For inspiring this analytics tool
  • Ronin Network - For building an innovative gaming-focused blockchain
  • Dune Analytics - For comprehensive on-chain data access
  • CoinGecko - For reliable market data and pricing
  • Vercel - For seamless frontend deployment
  • Railway - For reliable backend hosting
  • Streamlit - For the excellent analytics framework

πŸ“§ Contact

Created by Jo$h - DeFi Analytics Specialist

For questions, suggestions, or collaboration opportunities, feel free to reach out!


Built with ❀️ for the Ronin community

About

Professional analytics web app/dashboard for Ronin blockchain gaming economy with real-time insights, network health monitoring, and comprehensive DeFi/NFT marketplace intelligence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published