Skip to main content
Dani Tasheva

Professional · Frontend Engineer · 2024–2026

Turning carbon-accounting rules into a usable product

Business emissions data is full of dependencies: a site's country decides which fields apply, a vehicle's type decides the fuel questions, and commute numbers only make sense in pairs. I designed and implemented the frontend flow that asks each question at the right moment, so users never need to understand the calculation model.

Business Emissions Calculator, step 2 of 5, Fleet, with a gasoline car and a diesel truck.
Fleet step in the 2026 redesign, on staging. All five categories share one progress bar, so a business can skip one without losing its place.

At a glance

Reporting categories
5
Versions
3
Unit and component tests
95
Partnered with
Sustainability specialists, back-end developers, designers, and stakeholders
Scope
Sites, fleet, flights, commute, and IT equipment
Key technologies
React, TypeScript, React Hook Form, Zod, Zustand
The challenge
Turn interdependent carbon-accounting rules into a multi-step flow that is clear for users and predictable for the back end.
My contribution
Designed and built the flow, conditional validation, saved state, API mapping, results, and tests.
Outcome
Launched in October 2024, extended to saved portal calculations, and redesigned for 2026, now on staging.

Problem

Businesses needed to report emissions across sites, vehicle fleets, flights, employee commuting, and IT equipment without facing one overwhelming form. The form also had to catch answers that contradicted each other, and send the back end the same request format whichever path the user took.

The difficult part was not choosing a form library. It was learning the domain well enough to decide which questions depended on earlier answers, which rules belonged in the interface, and which calculations stayed authoritative on the back end.

Contribution

I owned

  • The five-category flow across sites, fleet, flights, commute, and IT equipment.
  • Conditional validation for location, vehicles, commute pairs, units, and periods.
  • Form state, validation rules, and saved answers kept separate from what is sent to the API.
  • Skipped steps, failed requests, partial results, unsaved changes, and the results view.
  • Saved portal calculations, including per-category offsets handed to the cart.
  • Frontend architecture, schemas, and tests for the 2026 redesign.

I partnered with

  • Sustainability specialists, to understand and validate domain rules.
  • Back-end developers, on what the interface validates and what the API receives.
  • Designers and stakeholders, on flow, language, and priorities.

Not mine

  • Emissions factors and methodology.
  • Back-end calculation services.

Solution

Three versions of one calculator, then the rules, state, and failure paths behind the 2026 redesign.

One calculator, three versions

The same five categories moved from an anonymous estimate, to saved calculations in the customer portal, to the 2026 redesign of the public site.

  1. 2024

    Public estimate

    Anonymous business visitors on the original platform.

    • Multi-step estimate across business emissions categories.
    • Results lead into a conversation with the Karbon-X team.

    We released it in October 2024 with the first platform, in time for the start of the Edmonton Oilers season.

    Original calculator, Sites tab, with Canada selected and a province field beside six energy inputs.
    2024 public estimate. The location rule was already there: the province field follows the country.
  2. 2025

    Saved calculations in the portal

    Signed-in business customers.

    • Calculations are saved, listed, reopened, and edited by category.
    • Leaving with unsaved changes asks for confirmation.
    • A single category can be handed to the cart for offsetting.

    The portal shipped in July 2025. I owned editing, saving, and per-category offsets.

    Portal Sites screen with a site emissions total, an offset cost, and a form for adding a United States site.
    2025 portal. Each category is edited on its own and shows its own offset cost. Sample figures.
  3. 2026

    Redesigned calculator

    The redesigned public site, finished and on staging.

    • Users can skip a step or finish early with partial results.
    • Domain rules live in Zod schemas, outside the step components.
    • Request helpers convert form values into stable API payloads.

    I led the frontend for the 2026 redesign until May 2026.

    Step 1 of 5, Sites, with Skip step and Finish and calculate in the footer.
    2026 redesign, on staging. Skip step and Finish & calculate sit on every step, so a business can leave a category out.

Five categories, one calculation

Each category asks only its own questions. One progress bar and shared Back and Next buttons keep the five steps a single calculation. These are the 2026 screens.

Step 1 of 5, Sites. Six energy inputs stay locked until a country is selected.
Energy inputs stay locked until a country is chosen, because emission factors depend on location.

Learning the rules before modelling the form

I worked with sustainability specialists to map realistic reporting scenarios, and with back-end developers to decide what the interface checks and what the back end calculates. These are the rules behind three of the steps, with the message a user sees.

  1. Sites

    • When
      The country has regional emission factors, such as Canada or the United States
      Then
      The site can't be saved until a region is chosen.
      Message: “Please select a region for the chosen country.”
    • When
      Every energy value is empty or zero
      Then
      The site can't be saved, and one message appears on the first energy field.
      Message: “At least one energy input must be provided and greater than 0.”
  2. Fleet

    • When
      The vehicle is electric
      Then
      The form asks for a location instead of a fuel type, because grid emissions depend on it.
    • When
      The vehicle runs on fuel
      Then
      The form asks for a fuel type and not a location.
      Message: “Please select fuel type.”
  3. Commute

    • When
      A travel mode has employees but no distance
      Then
      The form asks for the average daily distance for that mode.
      Message: “Please enter average distance travelled per day”
    • When
      A travel mode has a distance but no employees
      Then
      The form asks for the number of employees for that mode.
      Message: “Please enter Number of Employees”

Separating form state, domain state, and API shape

Each layer has one job, which made each boundary easier to reason about and to test.

  1. 01

    React Hook Form

    Interaction, touched state, and field errors.

  2. 02

    Zod schemas

    Domain rules, including the conditional ones above.

  3. 03

    Zustand stores, one per category

    Saved work across steps, so going back does not lose answers.

  4. 04

    Request helpers

    One payload per category. Mileage becomes annual mileage, country becomes home base, and an electric vehicle sends fuel type Electric.

  5. 05

    Back-end calculation

    Emissions factors and the authoritative result. Not frontend work.

Designing failure and partial-progress states

Users skip optional categories, go back, hit failed requests, or finish with only some categories filled in. Each of those needs a clear state, not only the happy path.

  • Validation

    Each message sits on the field that needs it and says what to enter, for example “Please select fuel type.”

    2024 and 2026

  • Skipped step

    Every category can be skipped, and the progress bar still shows where the user is.

    2026 redesign

  • Request failure

    If a step can't be sent, the message names the step and asks the user to try again, for example “Failed to submit fleet data. Please try again.” Saved answers are kept.

    2026 redesign

  • Partial result

    A calculation can finish with only some categories. In the portal, one category can also be handed to the cart on its own.

    2025 portal

    Partial footprint breakdown for fleet, flights, and commute, with commute employee and distance cards below.
    Fleet, flights, and commute are filled in; Sites and Server (renamed IT Equipment in 2026) are not. Commute can go to the cart by itself. Sample figures.
  • Unsaved changes

    Leaving an edited calculation asks for confirmation first.

    2025 portal

Making the result readable

The breakdown pairs a chart with a card per category, so totals and shares can be read as text, not only by color. Each card points to the category details below it.

Carbon footprint breakdown with a chart and cards for commute, flights, sites, server, and fleet.
2025 portal breakdown. Sample figures.

Quality

Tests focus on the places where a wrong answer would reach the API.

Testing the risky boundaries

The 2026 calculator has 95 unit and component tests, and they cover four areas.

Schemas
Conditional region, electric and fuel-powered vehicles, commute pairs, and at-least-one-input rules.
Request helpers
Number parsing, field renames, and defaults.
Step components
Validation messages, Next, Back, and Skip, and finishing early from saved totals.
Failure paths
A failed request shows an error and leaves saved work unchanged.

Constraints

  • The 2026 calculator and customer portal redesign is finished and on staging. It is not public yet, because the rest of the new website is not ready to replace the current one.
  • What I'd measure next: completion and drop-off by step, how often each category is skipped, and how many estimates lead to a conversation with the team.
  • Portal amounts in the captures are sample figures, not a customer result and not a measured outcome.

The project changed how I approach complex forms. The hardest frontend work often happens before the component is written. Early conversations with sustainability specialists produced simpler rules, clearer interfaces, and more stable tests than framework knowledge alone could provide.

Next project

Dayflow

A routine planner I built on a realtime canvas foundation, with typed blocks, permissions, and constrained assistant changes.

Read the Dayflow case study

Have a role or a project in mind?

Email is the direct way to reach me.