Engineering Impact: Inside the Tech Stack that Powers the Trillion Tree Campaign

When we talk about climate change, we usually talk about carbon, temperature, and policy. But at Plant-for-the-Planet, we also talk about scale.

The Trillion Tree Campaign isn’t just a slogan; it’s a logistical beast. How do you track planting data from 225+ projects globally? How do you visualize geospatial data for millions of trees without crashing a mobile browser? And how do you process donations from Apple Pay, Google Pay, and Stripe while ensuring every cent is traceable?

I spent a significant part of my career architecting solutions for these problems. While my previous post covered the why, this post covers the how.

Here is a technical deep dive into the development of Forest Cloud, the open-source platform driving the global reforestation movement.

The Core Stack: Performance Meets Purpose

The platform (web.plant-for-the-planet.org) needed to be fast, SEO-friendly (so projects get found), and capable of handling complex state management.

  • Frontend: We utilized Next.js (React) for its hybrid static/server-side rendering capabilities. This was crucial for indexing the individual pages of hundreds of planting projects.
  • Widgets: For embeddable components (like the tree counter you might see on partner sites), we used Svelte. Its compile-step approach meant we could ship tiny, highly performant bundles that didn’t drag down the host websites.
  • Backend: We leaned heavily into Serverless APIs. When traffic spikes during a climate awareness campaign, serverless functions scale instantly. We implemented aggressive caching strategies to ensure that the “Tree Counter” didn’t hammer our database on every page load.

Challenge 1: Visualizing the Invisible

One of my biggest tasks was making the data “real” for donors. A number on a screen is abstract; a satellite image of a restoration site is tangible.

We developed interactive maps using Mapbox GL JS and ESRI. The challenge here wasn’t just rendering a map; it was rendering heavy geospatial tree planting data alongside satellite imagery layers without killing performance.

By optimizing how we loaded vector tiles and managing state carefully, we created a seamless experience where users could zoom from a global view down to specific planting sites in the Yucatan. This accessibility directly correlated with impact: in 2021 alone, we saw a 378% increase in trees planted.

Challenge 2: DevOps & The “n8n on Heroku” Story

Automation is the silent hero of non-profits. We used n8n (a workflow automation tool) to glue various services together. However, deploying it cost-effectively was a hurdle.

I created the first-ever Docker implementation of n8n specifically for Heroku deployment. This allowed us to run complex workflows—like triggering emails or syncing data between CRMs—without managing a dedicated server. It was a perfect example of how “devops creativity” can save resources that are better spent on planting trees.

The Pipeline:

  • CI/CD: We moved to a strict version-controlled environment. I managed pipelines on Heroku, Vercel, and Gridpane, ensuring that code moved from develop to staging to production via automated GitHub Actions.
  • WordPress as Headless: We didn’t abandon WordPress; we just used it better. I wrote custom PHP plugins to expose WordPress content via REST APIs, effectively treating it as a Headless CMS. This gave the content team a familiar interface while keeping the frontend strictly React-based.

Challenge 3: Trust & Payments

The Transparency Standards at Plant-for-the-Planet are rigorous. We couldn’t just “take money”; we had to route it.

I worked on integrating a multi-gateway payment system including Stripe, PayPal, Apple Pay, and Google Pay. The complexity wasn’t just in the API calls, but in the webhooks—ensuring that when a payment succeeded, the “Tree Counter” updated, the donor got a receipt, and the specific planting project was credited, all in real-time.

Why This Matters

Open Source is usually associated with developer tools, but Green Open Source is a growing field. By making our repository public (GitHub Link), we invite developers to audit our code and contribute to climate justice.

This project wasn’t just about writing code; it was about building the digital soil in which a trillion trees could take root.


If you are interested in how we used Docker to containerize automation tools or want to discuss the geospatial challenges of mapping a trillion trees, feel free to reach out.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.