A comprehensive blockchain explorer and web interface for the WAYRU Network, a decentralized physical infrastructure network (DePIN) built on Solana. This application provides real-time visualization of network hotspots, staking operations, reward claiming, and network statistics.
WAYRU Explorer Web is a Next.js-based application that serves as the primary interface for interacting with the WAYRU Network. It enables users to:
- Explore Network Hotspots: Visualize WiFi hotspots on an interactive map powered by Mapbox
- Stake WAYRU Tokens: Stake tokens to hotspots to earn rewards
- Claim Rewards: Claim earned rewards from staking operations
- Unstake Tokens: Withdraw staked tokens from hotspots
- View Network Statistics: Monitor network metrics, total value locked, and network performance
- Real-time hotspot visualization on an interactive map
- Boosted zones and strategic area highlighting
- Hotspot details and statistics
- Device model and location type filtering
- Stake WAYRU tokens to network hotspots (NFNodes)
- Support for both initial and additional stakes
- NFT-based staking mechanism
- Real-time staking status and transaction tracking
- Claim rewards earned from staking
- Real-time reward calculation
- Socket-based transaction status updates
- Secure transaction signing via backend services
- Total hotspots count
- Total data transfer metrics
- Total WAYRU staked (TVL)
- Network score tracking (wUBI, wUPI)
- Active multipliers and boosted areas
- Historical charts and statistics
- English, Spanish, and Portuguese support
- Internationalized routing
- Dynamic dictionary loading
- Framework: Next.js 15.3.8 (App Router)
- Language: TypeScript
- Blockchain: Solana (via @solana/web3.js)
- Smart Contracts: Anchor Framework (@coral-xyz/anchor)
- UI Components: HeroUI (NextUI fork)
- Maps: Mapbox GL
- State Management: Zustand
- Data Fetching: SWR
- Real-time: Socket.io Client
- Styling: Tailwind CSS 4.x
- Animations: Framer Motion
explorer-web/
βββ app/ # Next.js app router pages
β βββ [lang]/ # Internationalized routes
β β βββ (explorer-map)/ # Map explorer pages
β β βββ (explorer-others)/ # Other explorer pages
β βββ api/ # API routes
βββ lib/
β βββ components/ # React components
β βββ services/
β β βββ blockchain/ # Blockchain service layer
β β βββ program/ # Anchor program setup
β β βββ solana/ # Solana utilities
β β βββ transactions/ # Transaction services β
β β βββ stake/ # Staking operations
β β βββ unstake/ # Unstaking operations
β β βββ claim/ # Reward claiming
β βββ stores/ # Zustand state stores
β βββ hooks/ # Custom React hooks
β βββ helpers/ # Utility functions
β βββ constants/ # App constants
βββ dictionaries/ # i18n translation files
βββ public/ # Static assets
The transaction services layer provides a clean abstraction for interacting with the WAYRU staking program on Solana. All blockchain operations are organized into three main categories:
The staking service handles all operations related to staking WAYRU tokens to network hotspots.
Key Files:
index.ts- Main orchestration function that handles the complete staking flowinitialize-nfnode.ts- Initializes NFNode entry on-chain (first-time setup)init-stake-nft.ts- Creates stake NFT and performs initial stake in one transactionstake-tokens.ts- Adds additional tokens to an existing stake
Features:
- Automatic detection of first-time vs. additional stakes
- NFT mint creation for new stakes
- Balance validation before staking
- Event-driven progress tracking
- Comprehensive error handling with human-readable messages
Usage Example:
import { stake } from '@/lib/services/blockchain/transactions/stake';
const signature = await stake({
externalNftMint: hotspotNftMint,
amount: 25000,
networkId: 1
});The unstaking service handles withdrawal of staked tokens from hotspots.
Key Features:
- Counter-based stake NFT detection
- Partial unstaking support
- Automatic account cleanup
- Transaction confirmation handling
Usage Example:
import { unstake } from '@/lib/services/blockchain/transactions/unstake';
const signature = await unstake({
externalNftMint: hotspotNftMint,
stakedData: userStakeData
});The claiming service manages reward distribution and transaction signing via backend services.
Key Files:
index.ts- Main claim orchestration with socket integrationsocket-helpers.ts- Socket.io helpers for transaction status tracking
Features:
- Backend-assisted transaction signing
- Real-time transaction status updates via WebSockets
- Automatic token refresh and reconnection
- Permission validation before claiming
- Support for initialization transactions
Usage Example:
import { claimRewards } from '@/lib/services/blockchain/transactions/claim';
const result = await claimRewards({
hotspotId: 123,
walletAddress: walletAddress,
externalNftMint: hotspotNftMint,
includeInitTx: false
});All transaction services follow a consistent pattern:
- Validation: Check prerequisites (balance, permissions, account existence)
- Account Derivation: Calculate PDAs (Program Derived Addresses) for on-chain accounts
- Transaction Building: Construct Anchor transactions with required accounts
- Signing: Sign transactions using wallet adapter
- Submission: Send transactions to Solana network
- Confirmation: Wait for transaction confirmation
- Event Emission: Emit events for UI state updates
- Error Handling: Provide user-friendly error messages
- NFNode: Network hotspot represented as an NFT
- Stake NFT: NFT minted when staking tokens, representing the stake position
- Deposit Entry: On-chain account tracking staked amount per stake NFT
- Token Storage: Authority account holding staked WAYRU tokens
- PDA (Program Derived Address): Deterministic addresses derived from seeds
- Node.js 18+ (or 20+ recommended)
- pnpm (package manager)
- Solana CLI (for local development, optional)
- Clone the repository:
git clone <repository-url>
cd explorer-web- Install dependencies:
pnpm install- Set up environment variables:
Create a
.env.localfile with the following variables:
NEXT_PUBLIC_TOKEN_MINT_WAYRU=<WAYRU_TOKEN_MINT_ADDRESS>
NEXT_PUBLIC_FOUNDATION_WALLET_ADDRESS=<FOUNDATION_WALLET>
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_MAPBOX_TOKEN=<MAPBOX_ACCESS_TOKEN>
# Add other required environment variables- Run the development server:
pnpm dev- Open http://localhost:3000 in your browser.
pnpm build
pnpm startpnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production server
- TypeScript strict mode enabled
- ESLint configuration included
- Follow Next.js App Router conventions
- Use functional components with hooks
The project includes Kubernetes deployment configurations in the kube/ directory for both development and production environments.
A Dockerfile is included for containerized deployments.
- Development:
kube/dev-az-1/ - Production:
kube/prod-az-1/
This repository is now open source and free for the community. Contributions are welcome!
This project is open source and available for use by the community.
For questions or issues, please refer to the repository's issue tracker.
With gratitude and love, we say goodbye. WAYRU is closing its doors, but we are leaving these repositories open and free for the community. May they continue to inspire builders, dreamers, and innovators.
With love, WAYRU
Note: This project is open source. Wayru, Inc and The Wayru Foundation are no longer operating entities, and will not provide any kind of support. The community is welcome to use, modify, and improve this codebase.