Tree Mapper App

Tree Mapper extends the Plant-for-the-Planet App and allows on site coordinate submission during plantation.
https://github.com/Plant-for-the-Planet-org/treemapper

Category: Biosphere
Sub Category: Deforestation and Reforestation

Keywords

climate-change plant react-native reforestation

Keywords from Contributors

trillion-trees plant-trees tree-planting fire

Last synced: about 7 hours ago
JSON representation

Repository metadata

TreeMapper extends the Plant-for-the-Planet Platform and allows on site data registration for restoration initiatives.

README.md

TreeMapper

TreeMapper is an open-source forest monitoring platform built by Plant-for-the-Planet. It helps organizations record, track, and review tree planting and restoration activities in the field.

TreeMapper is part of the ForestCloud platform -- a suite of tools for managing large-scale planting programs.

Documentation: docs.treemapper.app


What TreeMapper does

TreeMapper lets field teams and project managers:

  • Record planting interventions and tree measurements in the field
  • Track tree growth, health, and remeasurements over time
  • Manage projects, sites, and species data
  • Upload bulk data and build custom data collection forms
  • Review and approve data through a built-in approval workflow
  • Explore data through maps and analytics dashboards
  • Collaborate across teams and workspaces

Apps in this repo

This is a monorepo managed with Turborepo and Yarn workspaces.

apps/
  mobile/    React Native + Expo field app (iOS and Android)
  web/       Next.js management dashboard
  server/    NestJS + Fastify API server
packages/
  shared-core/  Shared utilities used by the web app

Mobile app

The field app runs on iOS and Android. Field teams use it to:

  • Create and manage planting plots (point and polygon)
  • Record tree measurements and remeasurements
  • Capture photos and fill out custom survey forms
  • Browse projects and sites
  • Work with offline maps

Web dashboard

The web app is the management interface. It covers:

  • Project and site management
  • Team and workspace management
  • Bulk data upload
  • Custom form builder
  • Data exploration and map visualization
  • Intervention planning and approval tracking
  • Species management
  • Analytics and leaderboards
  • Onboarding workflows

API server

The NestJS server powers both the mobile and web apps. Key areas:

  • Authentication via Auth0
  • Project, site, tree, and intervention management
  • Species data
  • Approval board workflow
  • Notifications and audit logging
  • File storage via AWS S3 / Cloudflare R2
  • Background jobs via Bull + Redis
  • Public API for third-party access

Tech stack

Layer Technology
Mobile React Native 0.83, Expo SDK, Maplibre
Web Next.js 15, React 18, shadcn/ui, Tailwind, Mapbox
Server NestJS 11, Fastify, Drizzle ORM, PostgreSQL
Auth Auth0
Cache / Queue Redis, Bull
Storage AWS S3, Cloudflare R2
Shared TanStack Query, Zustand
Language TypeScript throughout

Getting started

Requirements

  • Node.js >= 18
  • Yarn 1 (classic)
  • PostgreSQL
  • Redis

Install

yarn install

Development

yarn web:dev          # Start the Next.js dev server
yarn server:dev       # Start the NestJS server in watch mode
yarn native:dev       # Start the Expo dev server (mobile)
yarn dev:fullstack    # Start web + server together

Database (server)

cd apps/server
yarn db:generate      # Generate Drizzle migrations
yarn db:migrate       # Apply migrations
yarn db:studio        # Open Drizzle Studio

Other commands

yarn build            # Build all apps
yarn type-check       # Type-check all apps
yarn lint             # Lint all apps

Environment variables

Each app has its own .env file. Copy the .env.example in each app directory and fill in the values.

  • apps/server/.env
  • apps/web/.env
  • apps/mobile/.env (see apps/mobile/.env.sample)

Never commit .env files. See the documentation for required variables.


Verify the Android APK

Every Android release on GitHub Releases is signed with Plant-for-the-Planet's PGP key. You can verify that the APK you downloaded is genuine and was not tampered with.

Each release includes three files:

  • TreeMapper_v1.0.0.apk -- the Android app
  • SHA256SUM.asc -- PGP-signed checksum of the APK
  • TREEMAPPER_DETACHED_SIGN.sign -- detached PGP signature of the APK

Download all three and keep them in the same folder.

Step 1 -- Get the Plant-for-the-Planet public key

gpg --keyserver hkps://keys.openpgp.org --recv-key "994D 147D 19D0 DFA4 38DA 99F3 A83D 08B1 7DA1 D37F"

Step 2 -- Verify the APK certificate

Rename a copy of the APK from .apk to .zip and extract META-INF/TREECOUN.RSA. Then run:

keytool -printcert -file TREECOUN.RSA

The certificate fingerprints should match exactly:

SHA1:   C6:6D:10:EF:C1:89:26:89:C3:93:81:C3:24:59:DA:08:31:BE:06:A2
SHA256: 33:F3:D2:3E:5D:82:AF:5D:4B:26:51:68:94:31:C4:DC:46:AB:7B:19:E3:13:E4:7E:F6:E7:2D:70:D9:D9:CA:6E

Step 3 -- Verify the APK checksum

shasum -a 256 --check SHA256SUM.asc

The output should show the APK filename followed by OK:

TreeMapper_v1.0.0.apk: OK

Step 4 -- Verify the checksum is signed by Plant-for-the-Planet

gpg --verify SHA256SUM.asc

Expected output:

using RSA key 994D147D19D0DFA438DA99F3A83D08B17DA1D37F
issuer "shyam.bhongle@plant-for-the-planet.org"
Good signature from "Plant-for-the-Planet (TreeMapper Release Key) <shyam.bhongle@plant-for-the-planet.org>"

Step 5 -- Alternate: verify using the detached signature

gpg --verify TREEMAPPER_DETACHED_SIGN.sign TreeMapper_v1.0.0.apk

Expected output:

using RSA key 994D147D19D0DFA438DA99F3A83D08B17DA1D37F
issuer "shyam.bhongle@plant-for-the-planet.org"
Good signature from "Plant-for-the-Planet (TreeMapper Release Key) <shyam.bhongle@plant-for-the-planet.org>"

Signing a release (maintainers only)

Before uploading an APK to GitHub Releases, sign it with the Plant-for-the-Planet PGP key. You will need the passphrase you set when generating the key.

Step 1 -- Generate the signed checksum

shasum -a 256 TreeMapper_v1.0.0.apk > SHA256SUM.asc
gpg --clearsign --output SHA256SUM.asc SHA256SUM.asc

Step 2 -- Generate the detached signature

gpg --detach-sign --armor --output TREEMAPPER_DETACHED_SIGN.sign TreeMapper_v1.0.0.apk

Step 3 -- Upload to GitHub Releases

Attach all three files to the GitHub release:

  • TreeMapper_v1.0.0.apk
  • SHA256SUM.asc
  • TREEMAPPER_DETACHED_SIGN.sign

Notes

  • The PGP key fingerprint is 994D 147D 19D0 DFA4 38DA 99F3 A83D 08B1 7DA1 D37F.
  • If you are on a new machine, import your private key first: gpg --import your-private-key.asc
  • Keep the private key and its passphrase secure. Never commit or share them.
  • Store a backup of the private key offline (e.g. encrypted USB drive).

Contributing

We welcome contributions. Please open an issue before starting work on a large change so we can discuss the approach first.

A few things to keep in mind:

  • This repo is public. Never commit secrets, credentials, or production data.
  • All dependencies are pinned to exact versions on purpose (supply-chain safety). Use yarn add <pkg>@<exact-version> and do not introduce ^ ranges.
  • The pre-commit hook will block commits that change dependency files unless you set ALLOW_DEP_CHANGE=1.
  • The mobile app (apps/mobile) is independent and does not share code with apps/web or apps/server.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 2,897
Total Committers: 19
Avg Commits per committer: 152.474
Development Distribution Score (DDS): 0.516

Commits in past year: 461
Committers in past year: 2
Avg Commits per committer in past year: 230.5
Development Distribution Score (DDS) in past year: 0.145

Name Email Commits
shyambhongle s****e@g****m 1403
Norbert Schuler n****r@e****e 352
Ankit Gupta a****9@g****m 342
Tejas Sonar t****7@g****m 240
haideralishah h****h@g****m 201
Sagar s****r@a****e 108
Mayank Kumawat m****5@g****m 69
snyk-bot s****t@s****o 62
Bright Amidiagbe c****1@g****m 58
Shreyas Chorge s****1@g****m 24
Rupam Kairi r****i@h****m 9
gagangupta27 g****7@g****m 8
Harsh Vitra j****4@g****m 6
Harsh Vitra h****a@H****l 5
dependabot[bot] 4****] 4
Plant-for-the-Planet it@p****g 2
haideralishah n****9@g****m 2
Filip Rosian f****n@x****o 1
Harsh Vitra h****a@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 509
Total pull requests: 555
Average time to close issues: 11 months
Average time to close pull requests: about 1 month
Total issue authors: 13
Total pull request authors: 16
Average comments per issue: 0.41
Average comments per pull request: 1.83
Merged pull request: 322
Bot issues: 0
Bot pull requests: 69

Past year issues: 31
Past year pull requests: 53
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 19 days
Past year issue authors: 7
Past year pull request authors: 4
Past year average comments per issue: 0.03
Past year average comments per pull request: 1.75
Past year merged pull request: 7
Past year bot issues: 0
Past year bot pull requests: 31

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/Plant-for-the-Planet-org/treemapper

Top Issue Authors

  • Plant-for-the-Planet (368)
  • norbertschuler (69)
  • sagararyal (26)
  • ankitecd (17)
  • tejassonar (8)
  • anna-gee-planet (5)
  • aishwaryadwivedi18 (4)
  • shyambhongle (4)
  • haideralishah (2)
  • felixfinkbeiner (2)
  • jmiridis (2)
  • licaon-kter (1)
  • 8sami (1)

Top Pull Request Authors

  • norbertschuler (118)
  • sagararyal (102)
  • snyk-bot (85)
  • dependabot[bot] (62)
  • shyambhongle (62)
  • ankitecd (52)
  • tejassonar (36)
  • captainamiedi (20)
  • lingohub[bot] (7)
  • harshvitra (4)
  • mayankkumawat (2)
  • Shreyaschorge (1)
  • gagangupta27 (1)
  • jmiridis (1)
  • haideralishah (1)

Top Issue Labels

  • bug (437)
  • bugsnag (367)
  • production (293)
  • 1.0.8 (77)
  • testflight (72)
  • 1.0.9 (51)
  • enhancement (49)
  • 1.0.0 (46)
  • 1.0.6 (39)
  • 2.0.0 (33)
  • Priority (28)
  • 1.0.1 (21)
  • native (20)
  • 1.0.11 (14)
  • 1.0.2 (13)
  • 2.0.6 (11)
  • 1.0.7 (9)
  • 2.0.1 (9)
  • 2.0.4 (7)
  • 2.0.3 (6)
  • tooling (5)
  • 1.0.3 (5)
  • 1.0.4 (4)
  • 2.1.0 (4)
  • backend (3)
  • 2.2.0 (3)
  • 2.6.0 (2)
  • 2.0.7 (2)
  • 1.0.5 (2)
  • development (2)

Top Pull Request Labels

  • dependencies (62)
  • javascript (38)
  • Should we close this? (8)
  • ruby (1)
  • Priority (1)

Dependencies

package.json npm
  • @babel/core ^7.16.0 development
  • @babel/runtime ^7.16.0 development
  • @react-native-community/eslint-config ^2.0.0 development
  • @types/d3-shape ^3.0.2 development
  • @types/jest ^26.0.24 development
  • @types/jwt-decode ^3.1.0 development
  • @types/react ^17.0.33 development
  • @types/react-native ^0.63.56 development
  • @types/react-native-auth0 ^2.5.9 development
  • @types/react-native-material-menu ^1.0.6 development
  • @types/react-native-share ^3.3.3 development
  • @types/react-native-vector-icons ^6.4.9 development
  • @types/react-test-renderer ^17.0.1 development
  • @types/uuid ^8.3.1 development
  • babel-eslint ^10.1.0 development
  • babel-jest ^26.6.3 development
  • babel-plugin-module-resolver ^4.1.0 development
  • babel-plugin-transform-remove-console ^6.9.4 development
  • eslint ^7.32.0 development
  • eslint-import-resolver-babel-module ^5.3.1 development
  • eslint-plugin-import ^2.25.2 development
  • eslint-plugin-prettier ^4.0.0 development
  • eslint-plugin-react ^7.26.1 development
  • eslint-plugin-react-native ^3.11.0 development
  • jest ^26.6.3 development
  • metro-react-native-babel-preset ^0.67.0 development
  • prettier ^2.4.1 development
  • react-test-renderer 17.0.2 development
  • typescript ^4.4.4 development
  • @react-native-community/async-storage ^1.12.1
  • @react-native-community/checkbox ^0.5.9
  • @react-native-community/datetimepicker ^3.5.2
  • @react-native-community/masked-view ^0.1.11
  • @react-native-community/netinfo ^8.3.0
  • @react-native-community/toolbar-android ^0.2.1
  • @react-native-mapbox-gl/maps ^8.5.0
  • @react-navigation/drawer ^5.12.9
  • @react-navigation/native ^5.9.8
  • @react-navigation/stack ^5.14.5
  • @turf/area ^6.5.0
  • @turf/bbox ^6.5.0
  • @turf/boolean-point-in-polygon ^6.5.0
  • @turf/buffer ^6.5.0
  • @turf/center ^6.5.0
  • @turf/distance ^6.5.0
  • @turf/helpers ^6.5.0
  • @types/react-native-snap-carousel ^3.8.5
  • axios ^0.27.2
  • buffer ^6.0.3
  • bugsnag-react-native ^2.23.10
  • d3-shape ^3.0.1
  • i18next ^20.6.1
  • jail-monkey ^2.6.0
  • jwt-decode ^2.2.0
  • moment ^2.29.2
  • react 17.0.2
  • react-native 0.68.2
  • react-native-auth0 ^2.10.0
  • react-native-camera ^3.43.9
  • react-native-config 1.4.5
  • react-native-device-info ^8.4.4
  • react-native-document-picker ^5.2.0
  • react-native-draggable-flatlist ^2.6.2
  • react-native-dropdown-picker ^5.2.3
  • react-native-fs ^2.18.0
  • react-native-geolocation-service ^5.2.0
  • react-native-gesture-handler ^1.9.0
  • react-native-get-random-values ^1.7.0
  • react-native-inappbrowser-reborn ^3.6.3
  • react-native-linear-gradient ^2.5.6
  • react-native-localize ^1.4.3
  • react-native-material-menu ^2.0.0
  • react-native-modal-datetime-picker ^8.9.3
  • react-native-reanimated ^1.13.2
  • react-native-redash ^16.2.2
  • react-native-safe-area-context ^3.3.2
  • react-native-screens ^2.18.1
  • react-native-share ^5.3.0
  • react-native-snackbar ^2.4.0
  • react-native-snap-carousel ^3.9.1
  • react-native-svg ^12.3.0
  • react-native-tab-view ^2.15.2
  • react-native-vector-icons ^6.7.0
  • react-native-zip-archive ^5.0.6
  • realm 10.2.0
  • uuid ^8.3.2
apps/server/package.json npm
  • @eslint/js 9.39.4 development
  • @nestjs/cli 11.0.21 development
  • @nestjs/schematics 11.1.0 development
  • @nestjs/testing 11.1.24 development
  • @types/jest 29.5.14 development
  • @types/node 22.19.19 development
  • @types/pg 8.20.0 development
  • @types/supertest 6.0.3 development
  • drizzle-kit 0.31.10 development
  • eslint 9.39.4 development
  • eslint-config-prettier 10.1.8 development
  • eslint-plugin-prettier 5.5.6 development
  • globals 16.5.0 development
  • jest 29.7.0 development
  • prettier 3.8.3 development
  • supertest 7.2.2 development
  • ts-jest 29.4.11 development
  • ts-node 10.9.2 development
  • tsconfig-paths 4.2.0 development
  • typescript 5.9.3 development
  • typescript-eslint 8.60.0 development
  • @aws-sdk/client-s3 3.1057.0
  • @aws-sdk/s3-request-presigner 3.1057.0
  • @fastify/compress 8.3.1
  • @fastify/static 8.3.0
  • @nestjs/axios 4.0.1
  • @nestjs/cache-manager 3.1.2
  • @nestjs/common 11.1.24
  • @nestjs/config 4.0.4
  • @nestjs/core 11.1.24
  • @nestjs/jwt 11.0.2
  • @nestjs/passport 11.0.5
  • @nestjs/platform-express 11.1.24
  • @nestjs/platform-fastify 11.1.24
  • @nestjs/swagger 11.4.4
  • @turf/boolean-valid 7.3.5
  • @turf/invariant 7.3.5
  • axios 1.19.0
  • cache-manager 7.2.8
  • class-transformer 0.5.1
  • class-validator 0.14.4
  • dotenv 16.6.1
  • drizzle-orm 0.45.2
  • fastify 5.8.5
  • handlebars 4.7.9
  • jwks-rsa 3.2.2
  • nodemailer 9.0.5
  • passport 0.7.0
  • passport-jwt 4.0.1
  • pg 8.21.0
  • reflect-metadata 0.2.2
  • rxjs 7.8.2
  • uuid 11.1.1
Dockerfile docker
  • base latest build
  • node 22-alpine build
packages/shared-core/package.json npm
  • zustand 5.0.14
apps/web/package.json npm
  • @eslint/eslintrc 3.3.5 development
  • @tailwindcss/postcss 4.3.0 development
  • @types/node 20.19.41 development
  • @types/react 19.2.15 development
  • @types/react-dom 19.2.3 development
  • eslint 9.39.4 development
  • eslint-config-next 15.4.2 development
  • shadcn 4.8.3 development
  • tailwindcss 4.3.0 development
  • tw-animate-css 1.4.0 development
  • typescript 5.9.3 development
  • @dnd-kit/core 6.3.1
  • @dnd-kit/sortable 10.0.0
  • @dnd-kit/utilities 3.2.2
  • @radix-ui/react-collapsible 1.1.12
  • @tmcw/togeojson 7.1.2
  • @turf/turf 7.3.5
  • animal-avatar-generator 1.2.0
  • class-variance-authority 0.7.1
  • clsx 2.1.1
  • cmdk 1.1.1
  • date-fns 4.4.0
  • framer-motion 12.40.0
  • i18next 25.7.3
  • lucide-react 1.17.0
  • maplibre-gl 5.24.0
  • next 16.2.11
  • next-themes 0.4.6
  • papaparse 5.5.3
  • radix-ui 1.4.3
  • react 19.2.0
  • react-day-picker 10.0.1
  • react-dom 19.2.0
  • react-dropzone 14.4.1
  • react-i18next 16.5.0
  • react-map-gl 8.1.1
  • react-toastify 11.1.0
  • recharts 3.8.1
  • shared-core *
  • sharp 0.35.3
  • tailwind-merge 3.6.0
  • uuid 11.1.1
  • zustand 5.0.14
yarn.lock npm
  • 2335 dependencies
apps/mobile/package.json npm
  • @babel/core 7.29.7 development
  • @babel/plugin-proposal-export-namespace-from 7.18.9 development
  • @types/react ~19.2.10 development
  • @typescript-eslint/eslint-plugin 7.18.0 development
  • @typescript-eslint/parser 7.18.0 development
  • babel-plugin-module-resolver 5.0.3 development
  • eslint 8.57.1 development
  • eslint-config-prettier 9.1.2 development
  • eslint-plugin-jest 27.9.0 development
  • eslint-plugin-react 7.37.5 development
  • prettier 3.8.3 development
  • react-native-svg-transformer 1.5.3 development
  • typescript ~5.9.2 development
  • @bugsnag/expo 55.0.0
  • @expo/metro-runtime ~55.0.12
  • @expo/vector-icons 15.1.1
  • @gorhom/bottom-sheet 5.2.8
  • @maplibre/maplibre-react-native 11.2.1
  • @react-native-async-storage/async-storage 2.2.0
  • @react-native-community/datetimepicker 8.6.0
  • @react-native-community/netinfo 11.5.2
  • @react-native-masked-view/masked-view 0.3.2
  • @react-navigation/bottom-tabs 7.16.2
  • @react-navigation/native 7.2.5
  • @react-navigation/native-stack 7.16.0
  • @react-navigation/stack 7.6.13
  • @realm/react 0.20.0
  • @reduxjs/toolkit 2.11.2
  • @shopify/flash-list 2.0.2
  • @turf/area 6.5.0
  • @turf/bbox 6.5.0
  • @turf/boolean-point-in-polygon 6.5.0
  • @turf/distance 6.5.0
  • @turf/helpers 6.5.0
  • @turf/turf 7.3.1
  • d3-shape 3.2.0
  • expo 55.0.26
  • expo-application ~55.0.15
  • expo-build-properties ~55.0.14
  • expo-clipboard ~55.0.13
  • expo-constants ~55.0.16
  • expo-crypto ~55.0.15
  • expo-device ~55.0.17
  • expo-document-picker ~55.0.13
  • expo-file-system ~55.0.22
  • expo-font ~55.0.8
  • expo-haptics ~55.0.14
  • expo-image ~55.0.11
  • expo-image-manipulator ~55.0.17
  • expo-image-picker ~55.0.20
  • expo-linear-gradient ~55.0.14
  • expo-linking ~55.0.15
  • expo-localization ~55.0.15
  • expo-location ~55.1.10
  • expo-secure-store ~55.0.14
  • expo-splash-screen ~55.0.21
  • expo-status-bar ~55.0.6
  • expo-system-ui ~55.0.18
  • expo-web-browser ~55.0.16
  • i18next 25.7.3
  • jszip 3.10.1
  • moment 2.30.1
  • moti 0.28.1
  • onesignal-expo-plugin 2.5.0
  • posthog-react-native 4.46.2
  • react 19.2.0
  • react-i18next 16.5.0
  • react-native 0.83.6
  • react-native-auth0 5.6.0
  • react-native-avoid-softinput 8.0.2
  • react-native-bouncy-checkbox 4.1.2
  • react-native-draggable-flatlist 4.0.3
  • react-native-dropdown-picker 5.4.6
  • react-native-element-dropdown 2.12.4
  • react-native-gesture-handler ~2.30.0
  • react-native-get-random-values 1.11.0
  • react-native-input-outline 1.5.2
  • react-native-modal 14.0.0-rc.1
  • react-native-nitro-image 0.15.0
  • react-native-nitro-modules 0.35.9
  • react-native-onesignal 5.4.5
  • react-native-pager-view 8.0.0
  • react-native-popover-view 6.1.0
  • react-native-reanimated 4.2.1
  • react-native-reanimated-carousel 4.0.3
  • react-native-safe-area-context 5.6.2
  • react-native-screens ~4.23.0
  • react-native-share 12.2.6
  • react-native-snackbar 2.6.2
  • react-native-svg 15.15.3
  • react-native-swipeable-item 2.0.9
  • react-native-switch 1.5.1
  • react-native-tab-view 3.5.2
  • react-native-toast-notifications 3.4.0
  • react-native-vision-camera 5.0.11
  • react-native-webview 13.16.0
  • react-native-worklets 0.7.4
  • react-native-youtube-iframe 2.4.1
  • react-redux 9.2.0
  • realm 20.2.0
  • redux-persist 6.0.0
  • uuid 13.0.1

Score: 6.836259277277067