Skip to content

warengonzaga/relay-protocol-stats

Relay Protocol Stats

GitHub Repo Banner

Bun Biome Deploy

A web dashboard for analyzing your Relay Protocol cross-chain transaction history. Paste a wallet address or ENS name — no wallet connection required.

✨ Features

  • Wallet Analytics — transaction count, total volume (USD), success rate, failed & refunded counts
  • Top Chains — favorite chain, top origin, top destination
  • Leaderboard — Supabase-powered ranking synced every 6 hours via GitHub Actions
  • ENS Support.eth domain resolution powered by viem
  • Shareable URLs — direct links to any wallet's stats
  • Pixel Avatars — unique avatar per wallet with Blockscan integration

🛠️ Tech Stack

Category Tools
Frontend React 19, TypeScript 5.9, Vite 7
Styling Tailwind CSS 4, shadcn/ui
Data Supabase, Relay API, Axios, Viem
Tooling Bun, Biome
CI/CD GitHub Actions, GitHub Pages

🚀 Getting Started

Prerequisites

Setup

bun install
cp .env.example .env  # configure your Supabase keys

Development

bun dev       # http://localhost:5173
bun run build # production build
bun preview   # preview production build

Linting

bun run lint      # check
bun run lint:fix  # auto-fix
bun run format    # format

⚙️ Environment Variables

See .env.example for all variables.

Variable Context Description
VITE_SUPABASE_URL Frontend Supabase project URL
VITE_SUPABASE_ANON_KEY Frontend Supabase anonymous key (safe to expose)
SUPABASE_URL Sync script Supabase project URL
SUPABASE_SERVICE_KEY Sync script Supabase service role key (keep secret)
RELAY_API_KEY Sync script Optional — higher Relay API rate limits

🗄️ Supabase Setup

  1. Create a Supabase project
  2. Run supabase/schema.sql to create tables and RLS policies
  3. Run supabase/functions.sql to create the upsert function
  4. Add the environment variables above to your .env and GitHub repository secrets

The leaderboard sync runs automatically via the sync workflow every 6 hours. First run seeds the cursor — data collection starts from that point forward (no historical backfill).

📁 Project Structure

relay-protocol-stats/
├── src/
│   ├── components/     # UI components (WalletInput, StatsDisplay, Leaderboard, etc.)
│   ├── services/       # API clients (relayApi, leaderboardApi, ens)
│   ├── pages/          # Route pages (LeaderboardPage)
│   ├── lib/            # Utilities (supabase client, helpers)
│   ├── types/          # TypeScript type definitions
│   ├── App.tsx         # Main app with routing
│   └── index.css       # Global styles and animations
├── scripts/            # Sync scripts (sync-leaderboard.ts)
├── supabase/           # Database schema and functions
├── .github/workflows/  # CI/CD (deploy, sync)
├── biome.json          # Linter/formatter config
└── package.json

🐛 Issues

Found a bug? Open an issue. Contributions welcome — see CONTRIBUTING.md.

🙏 Sponsor

Like this project? Leave a ⭐

Want to support my work? Become a sponsor 💖 or buy me a coffee

📋 Code of Conduct

Read the project's code of conduct.

📃 License

This project is licensed under MIT License.

📝 Author

This project is created by Waren Gonzaga, with the help of awesome contributors.

contributors


💻💖☕ by Waren Gonzaga | YHWH 🙏

About

Community-built dashboard for analyzing Relay Protocol wallet transaction history

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors