Skip to content

Case study

Persustain

Backend AI pipelines and deterministic emissions logic for an MVP sustainability app

Explainable AIBackendSustainabilityFirebaseTypeScript
Persustain splash screen on a smartphone resting on a laptop keyboard
Role
AI & Backend Engineer
Timeline
January 2026 – April 2026
Team
ISM Creative Company
Tools
Firebase (Cloud Functions, Firestore)TypeScriptOpenAI APIClimatiq API

← All projects

Overview

Persustain is an AI-supported sustainability platform designed to help users better understand the environmental impact of their daily behaviors through explainable carbon estimation, personalized sustainability insights, and contribution-based tracking.

The project explored a central question:

How can AI systems communicate environmental impact in ways that are understandable, trustworthy, and meaningful to non-expert users?

My primary contribution focused on designing and implementing the backend AI architecture powering:

  • Emissions estimation
  • Activity normalization
  • Sustainability insight generation
  • Contribution aggregation
  • Recommendation systems

Rather than using AI purely for prediction or automation, the platform treated AI as an interpretive layer, helping users understand how sustainability data is generated, what assumptions are being made, and how everyday actions connect to larger environmental outcomes.

Problem

Many green apps bury methodology or mix generative guesses with totals. The product goal was credible numbers plus readable explanations, not the other way around.

  • Keep calculation paths deterministic
  • Isolate AI for narrative and caveats only
  • Scale cleanly as more users aggregate contributions

My role

Hands-on backend and AI implementation for the MVP.

  • Cloud Functions architecture and APIs
  • OpenAI and Climatiq integration
  • Emissions and avoided-emissions semantics
  • Firestore queries, aggregation, and cache keys

System design

Architecture split deterministic environmental math from generative interpretation: models never fabricated core emission totals.

Deterministic

  • Baselines and activity math
  • Aggregation and trends
  • Stored totals users can trace

AI-assisted

  • Explanations and summaries
  • Recommendation rationales
  • Assumption callouts where useful

That boundary improved reliability and made dashboards easier to reason about.

Emissions model

Early logic treated every logged action as additive emissions until we introduced avoided emissions and net framing.

  • Actual CO₂
  • Avoided CO₂
  • Net impact

Net emissions

net_co2_kg = actual_co2_kg − avoided_co2_kg

Virtuous behaviors (e.g. biking vs driving) showed as reductions versus baseline instead of oddly positive-only totals.

Product surface

What the backend backed in the MVP:

Baseline

Onboarding-derived weekly baseline.

Activity pipeline

Normalize logs → estimates → optional LLM explanations.

Dashboard

Trends and insights from stored aggregates.

Contributions

User-scoped aggregation into program-style rollups.

Technical development

Backend stack:

  • Firebase Cloud Functions (2nd Gen)
  • Firestore
  • TypeScript
  • OpenAI API
  • Climatiq API

Representative callable units:

  • normalizeAndExplainActivity
  • generateBaselineInsight
  • generatePatternInsights
  • generateEvidencePackSummary
  • recommendProjectAndGoals

Multi-user aggregation exposed stale cross-user reads when caches and keys weren’t fully user-scoped. Tightened query shapes, cache keys, and refresh behavior so aggregates stayed isolated and predictable.

Outcome

The final MVP included:

  • onboarding-based emissions baselines
  • AI-generated sustainability insights
  • activity normalization infrastructure
  • contribution aggregation systems
  • recommendation logic
  • scalable backend AI pipelines
  • user-scoped dashboard architecture

The project was later discussed in the context of future:

  • verification systems
  • sustainability registries
  • certification workflows
  • scalable contribution infrastructure

Reflection

Persustain became one of my strongest explorations of the intersection between:

  • human-centered AI
  • explainability
  • sustainability systems
  • backend architecture
  • interaction design

One of the most valuable lessons from the project was recognizing that backend decisions are also UX decisions.

The structure of emissions logic, aggregation systems, and AI explanations directly influenced:

  • how users interpreted environmental impact
  • how trustworthy the platform felt
  • how sustainability behaviors were emotionally framed

This project strengthened my interest in building AI systems that combine technical implementation with human-centered interaction design and systems thinking.