Professional analytics web app/dashboard for Ronin blockchain gaming economy with real-time insights, network health monitoring, and comprehensive DeFi/NFT marketplace intelligence.
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
- Primary App/Dashboard (Next.js): https://www.ronhub.io/analytics
- API Backend: Hosted on Railway
๐ 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:
- FastAPI Backend - Raw data pass-through with 24-hour intelligent caching
- Next.js Frontend - Modern, interactive web dashboard with real-time updates
- 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
- External APIs โ FastAPI fetches from Dune Analytics & CoinGecko
- Caching Layer โ 24-hour cache with joblib for persistent storage
- API Endpoints โ RESTful endpoints serve raw, unmanipulated data
- Frontend App โ Next.js consume API data
- 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/ronindailyactivity- Daily network metricsGET /api/raw/dune/gamesoverallactivity- Gaming statisticsGET /api/raw/dune/gamesdailyactivity- Daily gaming activityGET /api/raw/dune/useractivationretention- User retention cohortsGET /api/raw/dune/roncurrentholders- Token holder dataGET /api/raw/dune/ronsegmentedholders- Holder segmentationGET /api/raw/dune/wronactivetrade_pairs- DEX trading pairsGET /api/raw/dune/wronwhaletracking- Whale wallet activityGET /api/raw/dune/wronvolumeliquidity- Volume & liquidityGET /api/raw/dune/wrontradinghourly- Hourly trading patternsGET /api/raw/dune/wronweeklysegmentation- Weekly trader segmentsGET /api/raw/dune/nft_collections- NFT marketplace data
Utility Endpoints
GET /api/cache/status- Cache status for all sourcesPOST /api/cache/refresh- Force refresh all dataPOST /api/cache/clear- Clear all cached dataGET /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
โโโ ronintrackerapp.py # Streamlit analytics app
โโโ requirements.txt # Python dependencies
โโโ .env # Environment variables (create locally)
โโโ rawdatacache/ # 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
- Telegram: @joshuatochinwachi
- X (Twitter): @defijosh
Built with โค๏ธ for the Ronin community