The shared resources of the code repos

A shared resource is a thing that several code repos use and that no code repo owns, other than treetracker-infrastructure. This page says what each shared resource is, how a code repo uses it, and who looks after it. It shows today's state: each fact links to the file that proves it, at the snapshot that these docs describe. For how the code repos call each other at run time, see the ecosystem maps.

Resource Code repos that use it
Container registry 9 (8 push, 9 pull)
Clusters and deploys 8 (8 deploy)
Secrets in the cluster 6 (6 read)
API gateway and domains 7 (7 route)
Web hosting and CDN 3 (3 deploy)
Photo and upload storage 2 (2 write)
Shared database 6 (2 read, 4 write)
Message broker 2 (2 publish, 1 consume)
Sign-in 1 (1 sign in)
Monitoring and logs 0

Container registry

The container registry stores the Docker images of the code repos that run in the Kubernetes clusters. The images are in the greenstand namespace on Docker Hub.

How a code repo uses it

When a change merges to a release branch, the build workflow of the code repo builds the image and pushes it with the new version as its tag. The deploy step writes that tag into the manifests, and the cluster pulls the image. A pull request does not push an image. You do not need a Docker Hub login to work on a code repo.

Code repo Use Evidence
images-api push, pull build workflow, manifest
treetracker-admin-api push, pull build workflow, manifest
treetracker-airflow-dags pull Airflow DAG 1, Airflow DAG 2
treetracker-api push, pull build workflow, manifest
treetracker-field-data push, pull build workflow, manifest
treetracker-query-api push, pull build workflow, manifest
treetracker-tile-server push, pull build workflow, manifest, Dockerfile
treetracker-wallet-api push, pull build workflow, manifest
treetracker-web-map-client push, pull build workflow, manifest, test workflow

The names that you see in the workflows and the manifests:

Kind Name
Secret DOCKERHUB_TOKEN
Secret DOCKERHUB_USERNAME
Image greenstand/domain-migration-scripts
Image greenstand/images-api
Image greenstand/tile-server-base
Image greenstand/treetracker-admin-api
Image greenstand/treetracker-api
Image greenstand/treetracker-field-data
Image greenstand/treetracker-map-tile-server
Image greenstand/treetracker-query-api
Image greenstand/treetracker-wallet-api
Image greenstand/treetracker-web-map-client
Image greenstand/treetracker-web-map-client-dev
Image greenstand/treetracker-web-map-client-test

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-11-02).

Notes:

Who looks after it

No code repo and no Terraform file of the estate sets up the registry. The build workflows read their Docker Hub credentials from the secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN. For push access or a new image name, ask in Greenstand's Slack (Slack basics).

Clusters and deploys

The code repos that run as services deploy into the Kubernetes clusters: one cluster for each environment (development, test, and production). For the 4 ways that a code repo starts a deploy, see the platform map.

How a code repo uses it

Each code repo keeps its Kubernetes manifests in deployment/base. It keeps one overlay for each environment in deployment/overlays. A deploy uses the overlay of its environment. The code repos use 2 of the 4 ways:

Code repo Use Evidence
images-api deploy deploy workflow
treetracker-admin-api deploy deploy workflow
treetracker-api deploy deploy workflow
treetracker-field-data deploy deploy workflow
treetracker-query-api deploy build workflow, deploy workflow 1, deploy workflow 2
treetracker-tile-server deploy build workflow, deploy workflow
treetracker-wallet-api deploy deploy workflow
treetracker-web-map-client deploy deploy workflow

The names that you see in the workflows (each secret is a GitHub secret):

Kind Name
Secret DEV_CLUSTER_NAME
Secret DEV_DIGITALOCEAN_TOKEN
Secret DIGITALOCEAN_PRODUCTION_TOKEN
Secret DIGITALOCEAN_TOKEN
Secret K8S_NAMESPACE
Secret PRODUCTION_CLUSTER_NAME
Secret TEST_CLUSTER_NAME
Secret TEST_DIGITALOCEAN_TOKEN
Overlay deployment/overlays/development
Overlay deployment/overlays/prod
Overlay deployment/overlays/production
Overlay deployment/overlays/test

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-11-02).

Notes:

Who looks after it

treetracker-infrastructure sets up the clusters with Terraform. The workflows that apply the manifests need the GitHub secrets in the table above.

For access to a cluster, ask in Greenstand's Slack (Slack basics).

Secrets in the cluster

A Kubernetes Secret holds a value that a service reads at run time, for example the connection to the shared database. The code repos keep these values in git only in a sealed (encrypted) form.

How a code repo uses it

A writer encrypts the value with the public certificate of the SealedSecret controller of a cluster. The code repo keeps the result as a SealedSecret manifest. In the cluster, the SealedSecret controller makes a Kubernetes Secret from it. The service reads the Kubernetes Secret. An overlay can replace the SealedSecret of the base with its own.

Code repo Use Evidence
treetracker-admin-api read manifest 1, manifest 2, manifest 3
treetracker-api read manifest 1, manifest 2, manifest 3
treetracker-field-data read manifest 1, manifest 2
treetracker-query-api read manifest
treetracker-tile-server read manifest
treetracker-wallet-api read manifest

The names that you see in the manifests (each secret is a Kubernetes Secret):

Kind Name
Secret aws-s3
Secret database-connection
Secret database-migration-connection
Secret query-api-database-connection
Secret rabbitmq-connection
Secret treetracker-api-database-connection
Secret treetracker-api-jwt
Secret treetracker-rabbitmq-connection
Secret treetracker-wallet-jwt-keys

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-11-02).

Notes:

Who looks after it

treetracker-infrastructure installs the SealedSecret controller in each cluster. To seal a new value, you need the public certificate of the SealedSecret controller of that cluster. treetracker-wallet-api holds no SealedSecret for its 3 Kubernetes Secrets (checked 2026-10-24).

For the certificate, ask in Greenstand's Slack (Slack basics).

API gateway and domains

The API gateway takes each request for an API and sends it to the service in the cluster. Each environment has its own host name for the gateway. For the place of the gateway, see the platform map.

How a code repo uses it

A code repo that serves an API adds a route to the gateway: a Mapping manifest with a path prefix. The gateway sends each request whose path starts with the prefix to the service of the code repo. It removes the prefix first. The web apps, the Android app, and the Airflow DAGs call the APIs through the gateway.

Code repo Use Evidence
images-api route manifest
treetracker-admin-api route manifest
treetracker-api route manifest
treetracker-field-data route manifest
treetracker-query-api route manifest
treetracker-tile-server route manifest
treetracker-wallet-api route manifest

The names that you see in the manifests:

Kind Name
Route /api/admin/
Route /field-data/
Route /images/
Route /query/
Route /tiles/
Route /treetracker/
Route /wallet/v2/

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-11-02).

Notes:

Who looks after it

treetracker-infrastructure runs the gateway. It sets up the DNS records of the host names of the gateway with Terraform. For a new host name or a change to the gateway, ask in Greenstand's Slack (Slack basics).

Web hosting and CDN

Static hosting serves the web apps of treetracker-admin-client, treetracker-wallet-admin-client, and treetracker-wallet-app: the browser gets the files of the app from a CDN. The files are in AWS S3 buckets, and AWS CloudFront is the CDN.

How a code repo uses it

The workflow that deploys a web app builds the app. Then it copies the files to the bucket of the environment (aws s3 sync). Then it clears the cache of the CDN (aws cloudfront create-invalidation). The workflow reads the bucket, the CDN distribution, and the AWS key from GitHub secrets. Each environment and each channel has its own GitHub secrets.

Code repo Use Evidence
treetracker-admin-client deploy deploy workflow
treetracker-wallet-admin-client deploy build workflow, deploy workflow 1, deploy workflow 2
treetracker-wallet-app deploy deploy workflow 1, deploy workflow 2, deploy workflow 3

The names that you see in the workflows (each secret is a GitHub secret):

Kind Name
Secret AWS_ACCESS_KEY_ID
Secret AWS_KEY_ID_DEV
Secret AWS_KEY_ID_PROD
Secret AWS_SECRET_ACCESS_KEY
Secret AWS_SECRET_DEV
Secret AWS_SECRET_PROD
Secret DEV_ALPHA_CDN_DISTRIBUTION_ID
Secret DEV_ALPHA_CDN_S3_BUCKET
Secret DEV_CDN_DISTRIBUTION_ID
Secret DEV_CDN_DISTRIBUTION_ID_FREETOWN
Secret DEV_CDN_S3_BUCKET
Secret DEV_CDN_S3_BUCKET_FREETOWN
Secret DEV_STAGING_CDN_DISTRIBUTION_ID
Secret DEV_STAGING_CDN_S3_BUCKET
Secret PROD_ALPHA_CDN_DISTRIBUTION_ID
Secret PROD_ALPHA_CDN_S3_BUCKET
Secret PROD_CDN_DISTRIBUTION_ID
Secret PROD_CDN_DISTRIBUTION_ID_FREETOWN
Secret PROD_CDN_S3_BUCKET
Secret PROD_CDN_S3_BUCKET_FREETOWN
Secret STAGING_CDN_DISTRIBUTION_ID
Secret STAGING_CDN_S3_BUCKET
Secret TEST_CDN_DISTRIBUTION_ID
Secret TEST_CDN_S3_BUCKET
Secret TEST_STAGING_CDN_DISTRIBUTION_ID
Secret TEST_STAGING_CDN_S3_BUCKET

Each fact was checked at the snapshot of its code repo (generated 2026-09-03 to 2026-10-17).

Notes:

Who looks after it

treetracker-infrastructure sets up 4 static sites of treetracker-admin-client with Terraform: development, test, staging, and production. It sets up the development static site of treetracker-wallet-app with Terraform, and the test and production static sites with CloudFormation. The workflows that deploy the web apps need the GitHub secrets in the table above.

For access to a bucket or for a new static site, ask in Greenstand's Slack (Slack basics).

Photo and upload storage

The photo and upload storage keeps the photos of the captures, other images of the apps, and the batch uploads of the Android app. The files are in AWS S3 buckets.

How a code repo uses it

A code repo that writes to the storage uploads each file with an AWS client library. Some other code repos keep or show the web address of a photo. These code repos do not write to the storage (checked 2026-10-24).

Code repo Use Evidence
treetracker-android write build workflow
treetracker-wallet-api write manifest

The names that you see in the workflow and the manifest (each secret is a GitHub secret, except the Kubernetes Secret aws-s3):

Kind Name
Secret S3_DEV_IDENTITY_POOL_ID
Secret S3_PRODUCTION_IDENTITY_POOL_ID
Secret S3_TEST_IDENTITY_POOL_ID
Secret aws-s3

Each fact was checked at the snapshot of its code repo (generated 2026-09-03).

Notes:

Who looks after it

treetracker-infrastructure gives AWS users access to the storage with Terraform. No Terraform file of the estate sets up the buckets (checked 2026-10-24).

treetracker-infrastructure also gives one AWS user in each environment read access to the batch uploads.

For access to the storage, ask in Greenstand's Slack (Slack basics).

Shared database

Several code repos share one PostgreSQL database. For the place of the database, see the platform map. For which code repos read the data of other code repos, see the shared database map.

How a code repo uses it

A service reads the connection to the database from a Kubernetes Secret (see Secrets in the cluster). treetracker-api, treetracker-field-data, and treetracker-wallet-api each write to a schema of their own. The migration job of each of the 3 runs the migration tool db-migrate (see Clusters and deploys).

Code repo Use Evidence
treetracker-admin-api write manifest
treetracker-api write manifest 1, manifest 2
treetracker-field-data write manifest 1, manifest 2
treetracker-query-api read manifest
treetracker-tile-server read manifest
treetracker-wallet-api write manifest 1, manifest 2

The names that you see in the manifests (each secret is a Kubernetes Secret):

Kind Name
Secret database-connection
Secret database-migration-connection
Secret query-api-database-connection
Secret treetracker-api-database-connection
Schema field_data
Schema treetracker
Schema wallet

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-11-02).

Notes:

Who looks after it

treetracker-infrastructure sets up the database with Terraform. It also sets up the schemas and the database roles with Terraform. For a new schema or for access to the database, ask in Greenstand's Slack (Slack basics).

Message broker

The message broker carries events between services. The broker is RabbitMQ. For the place of the broker, see the platform map.

How a code repo uses it

A code repo names its queues and exchanges in a source file. A service publishes a message to a queue or an exchange, and another service consumes it. The service reads the connection to the broker from a Kubernetes Secret (see Secrets in the cluster).

Code repo Use Evidence
treetracker-admin-api publish source file
treetracker-api publish, consume source file 1, source file 2

The names that you see in the source files:

Kind Name
Queue admin-verifications
Queue capture-created
Queue raw-capture-rejected
Queue tree-created

Each fact was checked at the snapshot of its code repo (generated 2026-09-02 to 2026-09-03).

Notes:

Who looks after it

treetracker-infrastructure runs RabbitMQ in each cluster, with the RabbitMQ cluster operator. The broker client of a code repo creates the queues and the exchanges of its source file when it connects.

For access to the broker, ask in Greenstand's Slack (Slack basics).

Sign-in

The sign-in server holds user accounts and signs users in. The server is Keycloak. For the place of the server, see the platform map.

How a code repo uses it

A web app sends the user to the sign-in server and receives a token. The deploy workflow of the web app writes the address of the server, the realm, and the client into an .env file before the build.

Code repo Use Evidence
treetracker-wallet-app sign in deploy workflow 1, deploy workflow 2

The names that you see in the workflows:

Kind Name
Realm treetracker

Each fact was checked at the snapshot of its code repo (generated 2026-10-17).

Notes:

Who looks after it

treetracker-infrastructure runs Keycloak in each cluster. For a new client or a test account, ask in Greenstand's Slack (Slack basics).

Monitoring and logs

The monitoring and the logs show the state of the services in the clusters. This section is for maintainers.

How a code repo uses it

No code repo sets up metrics, traces, or logs of its own (checked 2026-10-24).

Who looks after it

treetracker-infrastructure holds the Ansible playbooks that install the tools for metrics, logs, and traces in a cluster. It also sets up a monitoring server with Terraform.

For access to the tools, ask in Greenstand's Slack (Slack basics).