How calpa/orbitgo works
Main system components
• Frontend: This is the core React + TypeScript application that handles UI, routing, state management, Web3 integration, and manages real-time updates.
• Backend Integration: Cloudflare Workers act as the permissionless API, exposing endpoints for token data and webhook management. This also includes key aspects like caching, rate limiting, CORS, and error handling.
• Features/Services: Specific components such as the token terminal for portfolio tracking, advanced analytics (charts, data grid), and detailed webhook management (creation, monitoring, and multi-address support).
• Supported Networks: Represent the various blockchain networks (Ethereum, Arbitrum, Base, Kaia, Optimism, Polygon) from which token balances and protocol data are fetched.
File structure to extract further details
• The “src” folder contains key directories:
– components: Contains reusable UI pieces (e.g., BalanceCard, Navbar, Sidebar, and specialized webhook components).
– routes: Organized views and pages following a route hierarchy (dashboard, about, notifications). This emphasizes the separation of concerns and routing logic.
– utils and constants: Hold all configuration constants (e.g., chains.json, networks.ts) and utility functions (e.g., format.ts, coins utilities) that are critical for managing chain and token data.
– services and store: Responsible for handling the API calls (portfolio.ts, transactions.ts) and application state (Jotai atoms, TanStack Query integration).
• Configuration files like tsconfig, vite.config, and eslint configurations guarantee uniform development standards.
Summarize architectural patterns and technologies
• Architectural Pattern: The project uses a typical full-stack separation where the frontend operates independently from backend APIs. There is a clear division between concerns through dedicated directories (components, routes, store, types).
• Technologies: React (UI), TypeScript (strong typing), Vite (build tool), TailwindCSS (styling), TanStack Query & Jotai (state & data management), and web3 integrations with wagmi and RainbowKit.
• Routing is managed via TanStack Router, allowing modular and logical UI navigation.
• API Integration: Clearly defined endpoints in the README (for tokens and webhooks) mean that the frontend communicates with Cloudflare Workers, ensuring secure and efficient data retrieval.
Instructing the principal software engineer
• Be as detailed as possible: for every component, indicate its role and any dependencies (e.g., “UI Components” rely on TailwindCSS for styling and Framer Motion for animations; API interactions are managed via axios calls in src/axios.ts).
• Use standardized notation to mark internal modules (e.g., routers, stores, utilities) and external integrations (web3 wallet connectors).
Happy diagramming!