How 0xradioac7iv/solrpc works
Project type and purpose
• This is a full-stack system composed of:
• A backend “aggregator” service (Node.js + TypeScript) that load-balances, caches, and failovers Solana RPC calls.
• A frontend dashboard (Next.js + React) for real-time analytics and configuration.
File structure
• Top level:
• README.md, vercel.json (deployment)
• /aggregator – the backend service with Dockerfile, tsconfig, package.json
• /frontend – the Next.js dashboard, with components, hooks, lib, types
• Backend (/aggregator/src):
• core/ – balancing.ts, caching.ts, stats.ts, server.ts, config.ts, logger.ts
• api/routes – HTTP route definitions (dashboardRouteGroup.ts)
• transport/ – http.ts for outbound RPC requests
• utils/ – cachePolicy, requestHandler, retry, validation
• index.ts – startup entrypoint
• Frontend (/frontend/src):
• app/ – Next.js pages under /dash (analytics, endpoints, networks, settings)
• components/ui – design primitives (button, card, chart, etc.)
• components – higher-level UI (Navbar, SearchBar, metrics, etc.)
• hooks, lib/store, types – state management and type definitions
README
• Describes features: latency optimization, failover, multiple load-balancing algorithms, caching (in-memory, Redis, Memcached), analytics dashboard.
• Local setup instructions for both services.
Detail
• Four balancing algorithms as options branching off the Load Balancer.
• Where caching policies apply (e.g., route through cachePolicy.ts).
• Docker container boundary and note environment configs.
• Loop: stats → dashboard → updated balancing strategy.