Onboarding Guide: treetracker-wallet-admin-client (Wallet Admin Client)

Generated from the Understand-Anything knowledge graph. Source commit 62a60f3.

Project Overview

The Treetracker Wallet Admin Client is the Greenstand admin panel for wallets. Wallet owners use it to display and transfer tokens and transactions, create sub-wallets, and configure a wallet's appearance. It is a React single-page app (Create React App) that talks to the Greenstand wallet API over axios.

The code follows a layered, feature-oriented flow: route table → page → context provider → API client module → wallet API, with a shared MUI theme and reusable UI components across every feature.

Architecture Layers

Key Concepts

Guided Tour

Follow these steps in order to learn the codebase end to end:

  1. Project Overview: Read the README.md for purpose, use cases, and local development setup.
  2. Application Entry & Bootstrap: src/index.js mounts the root App; src/App.js wires the MUI theme provider, auth provider, layout shell, and route table.
  3. Routing & App Shell: ClientRoutes.js maps URLs to pages and enforces auth; Layout.js provides the sidebar Menu shell and mounts the Transfers/TrustRelationships providers.
  4. Authentication: auth-context.js declares the shared context; AuthProvider.js manages login/logout, token storage, and JWT decode; Login.js collects wallet/password/API key.
  5. The API Client Layer: apiClient.js (axios instance + 401 interceptor) underpins wallets.js, transfers.js, and trust_relationships.js.
  6. State Management Contexts: WalletsContext, TransfersContext, and TrustRelationshipsContext own feature state, filters, and pagination.
  7. Wallets Feature: MyWallets.js lists wallets with a create action; Wallet.js is the detail view; CreateManagedWallet.js creates sub-wallets.
  8. Transfers & Sending Tokens: MyTransfers.js renders the transfers table; SendTokens.js orchestrates wallet selection and trusted/untrusted transfer tabs; TransferFilter.js shapes queries.
  9. Trust Relationships Feature: TrustRelationship.js + TrustRelationshipTable.js show and act on relationships; CreateTrustRelationship.js requests new ones; TrustRelationShipFilter.js backs the queries.
  10. Shared UI Components & Theme: theme.js (MUI palette/typography), Table.js (reusable grid), Message.js, and Loader.js provide consistent presentation and feedback.
  11. Project Manifest & Environment Config: package.json declares the stack and CRA scripts; the .env.* files supply per-environment settings such as the wallet API base URL.
  12. Build, Release & Deployment: build-release.yaml builds, semantic-releases, and deploys on push; deploy.yaml is the manual per-environment deploy.

File Map (by layer)

Complexity Hotspots

Approach these areas carefully: they carry the most logic or the largest surface:


Regenerate with /understand then /understand-onboard. See docs/regenerating.md in the docs repo.