Skip to content

fanyilun0/kaito-data-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

212 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kaito Data Renderer

๐Ÿ‡บ๐Ÿ‡ธ English โ€ข ๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡

Live Demo Vue 3 ECharts Vercel

โœจ Project Overview

๐Ÿ“ˆ Kaito Data Renderer is a specialized data visualization platform for displaying Kaito Pre-TGE hot token mention rankings. Using modern web technology stack, the platform provides intuitive tables and charts to real-time display token social media mentions and ranking trend changes across different time periods, helping users quickly understand market hotspots and token popularity dynamics.

๐ŸŽฏ Core Features

๐Ÿ“Š Data Display

๐Ÿ“‹ Table View (index.vue)

  • ๐Ÿ† Real-time Leaderboard - Display token mention rankings across different time periods
  • ๐Ÿ“… Multi-temporal Dimensions - Support data viewing for 24h, 48h, 7d, 30d, 3m, 6m, 12m
  • ๐Ÿ” Smart Search - Support quick search by token name or symbol with real-time filtering
  • ๐Ÿ“ˆ Trend Analysis - Display token mention trends and percentage changes
  • ๐Ÿ“ฑ Responsive Design - Perfect adaptation for desktop and mobile devices
  • ๐ŸŽจ Interactive Sorting - Click table headers to sort by different fields

๐Ÿ“ˆ Chart View (chart-stack.vue)

  • ๐Ÿ“Š Stacked Area Chart - Use ECharts to display time-series changes of token mentions
  • ๐ŸŽฏ Configurable Display - Support showing top 10/15/20/25/50 tokens or all tokens
  • ๐Ÿ“… Time Range Selection - Support data display for recent 7/14/30/60/90 days or all time
  • ๐ŸŽจ Interactive Charts - Support zoom, pan, legend interaction and other functions
  • ๐Ÿ”„ State Reset - One-click reset chart view state
  • ๐Ÿ“Š Data Statistics - Display data range, days, token count and other statistics

๐Ÿ“ก Data Processing

  • ๐Ÿ“Š JSON Data Source - Structured token mention data with historical data backtracking
  • ๐Ÿ”„ Smart Caching - Browser local cache to improve data loading speed
  • ๐Ÿ’พ Dynamic Loading - Load data on demand for different time periods, reducing bandwidth consumption
  • ๐Ÿ” Real-time Filtering - Client-side data filtering and search with fast response
  • ๐Ÿ›ก๏ธ Data Validation - Complete data type checking and exception handling

๐ŸŽจ User Experience

  • ๐ŸŒ™ Dark Mode - Support light/dark theme switching
  • ๐Ÿ“ฑ Mobile First - Responsive design with perfect mobile device support
  • โšก Performance Optimization - Virtual scrolling, lazy loading and other performance optimizations
  • ๐Ÿ”” Smart Notifications - Friendly operation feedback and status prompts
  • ๐ŸŽฏ Accessibility - Follow WCAG accessibility design standards

๐ŸŒ Internationalization

  • ๐ŸŒ Bilingual Support - Complete Chinese and English internationalization
  • ๐Ÿ”„ Smart Language Detection - Auto-detect browser language and save user preference to localStorage
  • โšก Seamless Switching - Dynamic language switching without page refresh
  • ๐Ÿ“Š Full Coverage - All interface texts including tables, charts, notifications are internationalized
  • ๐Ÿ“… Date Localization - Automatic date format adjustment based on language

๐Ÿš€ Quick Start

๐Ÿ“‹ Requirements

  • ๐Ÿ’ป Node.js 18+ (recommended 20+)
  • ๐Ÿ“ฆ pnpm 8+ (recommended) or npm/yarn

โšก Local Development

# ๐Ÿ“ฅ Clone project
git clone https://github.com/fanyilun0/kaito-data-renderer.git
cd kaito-data-renderer

# ๐Ÿ“ฆ Install dependencies
pnpm install

# ๐Ÿš€ Start development server (http://localhost:3333)
pnpm dev

# ๐ŸŒ Open in browser
open http://localhost:3333

๐Ÿ—๏ธ Build & Deploy

# ๐Ÿ—๏ธ Build for production
pnpm build

# ๐Ÿ‘€ Preview build
pnpm preview

# ๐Ÿš€ Deploy to Vercel (requires Vercel CLI)
vercel deploy

๐Ÿงช Testing & Quality Check

# ๐Ÿงช Run unit tests
pnpm test

# ๐Ÿ” Code linting
pnpm lint

# ๐Ÿ”ง TypeScript type check
pnpm typecheck

# ๐Ÿ“ฆ Dependency update check
pnpm up

๐Ÿ“Š Data Structure

๐Ÿ“ Data File Format

public/data/
โ”œโ”€โ”€ kaito_data_20250418_24h.json   # 24h data
โ”œโ”€โ”€ kaito_data_20250418_48h.json   # 48h data
โ”œโ”€โ”€ kaito_data_20250418_7d.json    # 7d data
โ”œโ”€โ”€ kaito_data_20250418_30d.json   # 30d data
โ”œโ”€โ”€ kaito_data_20250418_3m.json    # 3m data
โ”œโ”€โ”€ kaito_data_20250418_6m.json    # 6m data
โ”œโ”€โ”€ kaito_data_20250418_12m.json   # 12m data
โ””โ”€โ”€ ...                            # Other date data

๐Ÿท๏ธ Data Field Description

interface TickerItem {
  ticker_id: string // Unique identifier
  ticker: string // Token symbol (e.g., "BTC", "ETH")
  fullname: string // Token full name (e.g., "Bitcoin", "Ethereum")
  logo?: string // Token icon URL
  rank: number // Current ranking

  // Mention percentages for different time periods
  last_24h_mindshare: number
  last_48h_mindshare: number
  last_7d_mindshare: number
  last_30d_mindshare: number
  last_3m_mindshare: number
  last_6m_mindshare: number
  last_12m_mindshare: number

  // Change ratios for different time periods
  change_24h_ratio: number
  change_48h_ratio: number
  change_7d_ratio: number
  change_30d_ratio: number
  change_3m_ratio: number
  change_6m_ratio: number
  change_12m_ratio: number
}

๐Ÿ“‹ Data File Structure

{
  "resultWithTicker": [
    {
      "ticker_id": "bitcoin",
      "ticker": "BTC",
      "fullname": "Bitcoin",
      "logo": "https://example.com/btc-logo.png",
      "rank": 1,
      "last_24h_mindshare": 25.5,
      "change_24h_ratio": 1.2
      // ... other fields
    }
    // ... more token data
  ]
}

๐Ÿ“ฑ Interface Features

๐Ÿ  Main Page - Table View (/)

๐Ÿ” Search and Filter Features

  • Smart Search Box - Real-time search for token names and symbols
  • Date Selector - Select data for specific dates
  • Time Period Switch - Dynamically switch between different time dimensions

๐Ÿ“Š Data Table

  • Ranking Display - Clear numerical ranking identification
  • Token Information - Symbol, full name and icon display
  • Mention Data - Current time period mention percentage
  • Trend Indicators - Color-coded rise/fall change rates
  • Interactive Sorting - Click table headers to sort by different fields

๐ŸŽจ Interface Features

  • Responsive Layout - Adaptive to desktop and mobile devices
  • Loading Animation - Elegant data loading states
  • Error Handling - Friendly error message prompts
  • Performance Optimization - Virtual scrolling for large data sets

๐Ÿ“ˆ Chart Page - Visualization View (/chart-stack)

๐Ÿ“Š Chart Configuration

  • Token Count Selection - Top 10/15/20/25/50 or all tokens
  • Time Range Selection - Recent 7/14/30/60/90 days or all time
  • Chart Type - Stacked area chart clearly showing trend changes

๐ŸŽฎ Interactive Features

  • Zoom & Pan - Mouse or touch operations for chart interaction
  • Legend Control - Click legend to show/hide specific tokens
  • State Reset - One-click reset chart to initial state
  • Responsive Chart - Adaptive to different screen sizes

๐Ÿ“ˆ Data Statistics

  • Data Range Display - Current displayed date range
  • Day Count - Actual included data days
  • Token Count - Currently displayed token count
  • Total Data - Available historical data total

๐ŸŽจ Common UI Components

๐Ÿงฉ Reusable Components

  • AppLayout - Unified page layout container
  • AppHeader - Page title and navigation
  • AppSelect - Unified style selector
  • TickerTableHeader - Table header component
  • TickerTableRow - Table row component
  • LanguageSwitch - Language switching component

๐ŸŒ Internationalization (i18n)

โœจ Features

  • โœ… Support Chinese (zh) and English (en) languages
  • โœ… Language preference auto-saved to localStorage
  • โœ… Auto-detect browser language for default language
  • โœ… Dynamic language switching without page refresh
  • โœ… Full interface text internationalization
  • โœ… Date format adjustment based on language

๐Ÿ“ File Structure

src/i18n/
โ”œโ”€โ”€ index.ts              # i18n configuration and utility functions
โ”œโ”€โ”€ locales/
โ”‚   โ”œโ”€โ”€ en.json          # English translations
โ”‚   โ””โ”€โ”€ zh.json          # Chinese translations

๐Ÿ”„ Language Switching

Click the language selector in the page header navigation to switch languages:

  • ไธญๆ–‡ (Chinese)
  • English

๐Ÿ“ Adding New Translations

  1. Add English translation in locales/en.json
  2. Add corresponding Chinese translation in locales/zh.json
  3. Use t('key') function in components

Example:

<script setup>
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
</script>

<template>
  <div>{{ t('table.title') }}</div>
  <div>{{ t('notification.loadSuccess', { count: 5 }) }}</div>
</template>

๐Ÿš€ Deployment & Hosting

๐ŸŒ Vercel Deployment (Recommended)

  1. Connect Repository

    # Connect GitHub repository to Vercel
    vercel --prod
  2. Automatic Deployment

    • Push to main branch triggers automatic deployment
    • Support preview deployments and production deployments
    • Built-in CDN and edge function optimization
  3. Analytics Configuration

    • Enable Web Analytics in Vercel console
    • App integrated with @vercel/analytics/vue component
    • Automatically collect visit statistics and performance data

๐Ÿ”ง Other Deployment Platforms

# Netlify deployment
npm run build
# Upload dist folder to Netlify

# GitHub Pages deployment
npm run build
# Configure GitHub Actions for automatic deployment

# Self-hosted server
npm run build
# Deploy dist folder to web server

๐Ÿ“ˆ Data Update Process

๐Ÿ“… Automated Data Processing

# Python data processing script
python src/data_process.py

# Generated file format
kaito_data_{YYYYMMDD}_{duration}.json

๐Ÿ”„ Update Frequency

  • Daily Updates - Generate new data files daily
  • Multi-period Coverage - Cover all time dimensions from 24 hours to annual
  • Historical Data Retention - Complete preservation of historical data for trend analysis

๐Ÿ”ง Development Guide

๐Ÿ“ Project Structure

kaito-data-renderer/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ data/                   # Static data files
โ”‚   โ”‚   โ””โ”€โ”€ favicon.svg             # Website icon
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/             # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ AppHeader.vue      # Page header
โ”‚   โ”‚   โ”œโ”€โ”€ AppLayout.vue      # Layout container
โ”‚   โ”‚   โ”œโ”€โ”€ AppSelect.vue      # Selector component
โ”‚   โ”‚   โ”œโ”€โ”€ LanguageSwitch.vue # Language switcher
โ”‚   โ”‚   โ”œโ”€โ”€ TickerTableHeader.vue # Table header
โ”‚   โ”‚   โ””โ”€โ”€ TickerTableRow.vue    # Table row
โ”‚   โ”œโ”€โ”€ composables/           # Composable functions
โ”‚   โ”‚   โ”œโ”€โ”€ chartConfig.ts     # Chart configuration
โ”‚   โ”‚   โ”œโ”€โ”€ dark.ts           # Dark mode
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts          # Unified export
โ”‚   โ”‚   โ””โ”€โ”€ kaitoDataProcessor.ts # Data processing
โ”‚   โ”œโ”€โ”€ i18n/                 # Internationalization
โ”‚   โ”‚   โ”œโ”€โ”€ index.ts          # i18n configuration
โ”‚   โ”‚   โ””โ”€โ”€ locales/          # Translation files
โ”‚   โ”‚       โ”œโ”€โ”€ en.json       # English translations
โ”‚   โ”‚       โ””โ”€โ”€ zh.json       # Chinese translations
โ”‚   โ”œโ”€โ”€ pages/                # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ index.vue         # Table view
โ”‚   โ”‚   โ””โ”€โ”€ chart-stack.vue   # Chart view
โ”‚   โ”œโ”€โ”€ styles/
โ”‚   โ”‚   โ””โ”€โ”€ main.css          # Global styles
โ”‚   โ”œโ”€โ”€ App.vue               # Root component
โ”‚   โ””โ”€โ”€ main.ts               # Application entry
โ”œโ”€โ”€ test/                     # Test files
โ””โ”€โ”€ README.md                # Project documentation

๐Ÿ“„ License

๐Ÿ“œ This project is licensed under the MIT License

๐Ÿค Contributing

Welcome to submit Issues and Pull Requests!

  1. Fork the project
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Create Pull Request

๐Ÿ“‹ Development Standards

  • Use TypeScript for type-safe development
  • Follow ESLint code standards
  • Write unit tests to cover new features
  • Update relevant documentation

๐Ÿ™ Acknowledgments

  • ๐ŸŒŸ Thanks to Anthony Fu for providing the Vitesse template
  • ๐Ÿ“Š Thanks to Kaito for data support

โญ If this project helps you, please give it a star!

GitHub Stars GitHub Forks

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors