Onboarding Guide: treetracker-admin-client (Treetracker Admin Panel Client)

Generated from the Understand-Anything knowledge graph. Source commit ecbfe05.

Project Overview

The Treetracker Admin Panel Client is the React web frontend Greenstand staff use to verify, process, and manage tree-planting data (captures, growers, species) collected by the Treetracker mobile app. It is built with create-react-app and Material UI, and is mid-migration from a single legacy dedicated API to a set of focused Greenstand microservices (treetracker-api, earnings-api, field-data, query-api, regions-api, reporting, stakeholder-api).

The code follows a recurring Context provider → API client → page/feature component pattern repeated per feature area (Captures, Growers, Species, Regions, Stakeholders, Messaging, Earnings/Payments), all gated behind a global AppContext for auth/session/permissions.

Architecture Layers

Key Concepts

Guided Tour

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

  1. Project Overview: README.md and package.json establish the purpose (Admin Panel frontend), the API migration context, and the Material UI + Redux/Rematch + CRA foundation.
  2. Application Bootstrap: src/index.js renders the app and registers the service worker, delegating to src/init.js for early setup before src/App.js becomes the root component.
  3. Routing and Global Providers: Routers.js wires every route (Verify, Growers, Messaging, Species, Payments, Earnings, Stakeholders) behind AppContext; theme.js supplies the shared Material UI theme.
  4. API / Service Layer: treeTrackerApi.js is the central API client; apiUtils.js provides shared request helpers; growers.js shows the per-microservice module pattern.
  5. The Context / State Pattern: CapturesContext, VerifyContext, and CaptureDetailContext show the recurring Context-wraps-API pattern repeated per feature.
  6. Feature Vertical: Capture Verification: Verify.js, CaptureFilter.js, and Captures/CaptureTable.js compose a full workflow screen on top of the Context layer.
  7. The Filter Domain Model: models/Filter.js and FilterGrower.js show the getWhereObj() convention; models/auth.js adds permission-checking helpers.
  8. Feature Vertical: Messaging: MessagingContext, api/messaging.js, Messaging.js, and MessageBody.js reinforce the pattern with a chat-style UI shape.
  9. CI/CD Pipeline: treetracker-frontend-pr.yml (lint/build on PR), build_and_release.yaml (build, semantic-release, deploy to dev CDN on push), and deploy.yaml (manual promotion to staging/production via S3/CloudFront).
  10. Testing Strategy: Jest and Cypress: verify.test.js (Jest/RTL), capturesFilter.spec.py.js (Cypress E2E), and Filter.spec.py.js (Cypress component test) show the three testing tiers.

File Map (by layer)

Complexity Hotspots

Approach these areas carefully: they carry the most logic or the largest connectivity (51 file-level nodes rated complex; the most connected ones are listed here):


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