A comprehensive Web3 application for tracking token balances, transaction history, DeFi positions, and yield analytics across multiple blockchain networks.
- Wallet Connection: MetaMask and WalletConnect support
- Multi-chain Support: Ethereum, Polygon, Arbitrum, Optimism
- Token Balances: Native tokens (ETH, MATIC) + ERC20 tokens (USDC, USDT, DAI, WETH)
- Transaction History: Scans recent blocks with address filtering
- DeFi Metrics:
- Aave positions (staking, lending, APY)
- Top Uniswap V3 pools (liquidity, volumes)
- Yield analytics (total value, average APY)
- Frontend: Next.js 15 (App Router), TypeScript, React 19
- Web3: Wagmi v2, Viem v2
- UI: Chakra UI v2
- Data: The Graph (GraphQL), React Query
- Styling: Emotion
Before installation, ensure you have:
- Node.js: version 18.x or higher
- npm or yarn or pnpm
- Git
- Browser with Web3 wallet: MetaMask, Coinbase Wallet, etc.
git clone https://github.com/eveiljuice/theopendashboard.git
cd theopendashboardnpm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root directory:
cp .env.example .env.localEdit .env.local and add your WalletConnect Project ID:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here- Go to https://cloud.walletconnect.com/
- Sign up or log in
- Create a new project
- Copy the Project ID from project settings
- Paste it into
.env.local
Note: Without Project ID, the app will work only with MetaMask/Injected providers. WalletConnect will not be available.
npm run dev
# or
yarn dev
# or
pnpm devThe application will open at http://localhost:3000
- Open the application in your browser
- Make sure you have MetaMask or another Web3 wallet installed
- Click the "Connect Wallet" button in the top right corner
- Select MetaMask or WalletConnect
- Confirm the connection in your wallet
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout with providers
β βββ page.tsx # Home page (Dashboard)
β βββ transactions/ # Transaction history page
β βββ defi/ # DeFi metrics page
β βββ providers.tsx # Web3 providers
β βββ globals.css # Global styles
β
βββ components/ # React components
β βββ wallet/ # Wallet components
β β βββ ConnectButton.tsx
β β βββ NetworkSwitcher.tsx
β β βββ WalletInfo.tsx
β βββ dashboard/ # Dashboard components
β β βββ BalanceCard.tsx
β β βββ TokenBalances.tsx
β βββ transactions/ # Transaction components
β β βββ TransactionHistory.tsx
β βββ defi/ # DeFi components
β β βββ StakingMetrics.tsx
β β βββ FarmingYields.tsx
β βββ analytics/ # Analytics
β β βββ YieldAnalytics.tsx
β βββ layout/ # Layout components
β β βββ Header.tsx
β β βββ Sidebar.tsx
β β βββ MainLayout.tsx
β βββ ui/ # UI providers
β βββ provider.tsx
β
βββ lib/ # Utilities and configuration
β βββ wagmi.ts # Wagmi configuration
β βββ constants.ts # Constants (token addresses, ABI, URLs)
β βββ getTransactions.ts # Utility for fetching transactions
β βββ graph/ # The Graph integration
β βββ client.ts # GraphQL clients
β βββ queries.ts # GraphQL queries
β
βββ .env.example # Example environment variables
βββ package.json # Dependencies
βββ tsconfig.json # TypeScript configuration
βββ next.config.ts # Next.js configuration
| Network | Chain ID | RPC | Block Explorer |
|---|---|---|---|
| Ethereum | 1 | Public RPC | etherscan.io |
| Polygon | 137 | Public RPC | polygonscan.com |
| Arbitrum | 42161 | Public RPC | arbiscan.io |
| Optimism | 10 | Public RPC | optimistic.etherscan.io |
Edit lib/constants.ts to add new tokens:
export const TOKENS = {
ethereum: {
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
// Add new token
NEWTOKEN: '0x...',
},
// ...
};If you want to use your own RPC endpoints (e.g., Infura, Alchemy), add to .env.local:
NEXT_PUBLIC_ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY
NEXT_PUBLIC_POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_KEYAnd update lib/wagmi.ts:
transports: {
[mainnet.id]: http(process.env.NEXT_PUBLIC_ETHEREUM_RPC_URL),
// ...
}- Connect your wallet
- On the home page (Dashboard), you'll see balances for all tokens
- Switch networks via Network Switcher in the header
- Balances automatically update when switching networks
- Navigate to the "Transactions" page via the sidebar menu
- The app scans the last 10 blocks
- You can switch to 50 blocks for deeper scanning
- Click "Refresh" to update data
- Click on transaction hash to open block explorer
- Navigate to the "DeFi" page
- "Your Positions" tab: your Aave positions with APY
- "Top Pools" tab: top Uniswap V3 pools by TVL
- Yield Analytics: overall statistics for your positions
The application uses public subgraph endpoints:
- Uniswap V3
- Aave V3
Note: Public endpoints may be slow or unavailable. For production, it's recommended to:
- Use The Graph Studio with your own API key
- Or run your own graph node
Public RPCs have rate limits. With a large number of requests, errors may occur. Recommendations:
- Use Infura, Alchemy, or other providers for production
- Configure request caching
- Add fallback transports
- β Never store private keys in code
- β Don't commit
.env.localto git - β Use only public blockchain read methods
- β All transactions are signed in the user's wallet
- Make sure MetaMask is unlocked
- Check that the site is not blocked in wallet settings
- Try reconnecting the wallet
- Check your internet connection
- Make sure the correct network is selected
- Try switching networks and switching back
- Subgraph may be temporarily unavailable
- Try refreshing the page after a few minutes
- Check subgraph status at https://thegraph.com
- This is normal if there are no transactions in recent blocks
- Increase the number of scanned blocks to 50
- For full history, use Etherscan API (requires additional development)
npm run build
npm run startContributions are welcome! Please feel free to submit a Pull Request.
MIT