Repolode
joreilly

joreilly/ClimateTraceKMP

Kotlin/Compose Multiplatform sample showing Climate TRACE country emissions data on iOS, Android, desktop and web.

Stars
346
Forks
23
Open issues
8
Last commit
5 days ago

What is it?

ClimateTraceKMP is a Kotlin Multiplatform sample application that displays country-level greenhouse gas emissions data from climatetrace.org. Nearly all logic lives in the shared `composeApp` module — data layer, view models and Compose Multiplatform UI — which is consumed by the Android app, the iOS app, a desktop target and a Web (Wasm) target. The iOS client is hosted in SwiftUI and lets you implement the country list screen in either SwiftUI or Compose; selecting a country then navigates to the shared Compose emissions detail screen. A Kotlin Notebook is included for exploring the same data.

Beyond the UI clients, the repository packages the data for programmatic use. The `mcp-server` module uses the Kotlin MCP SDK to expose per-country emissions data as MCP tools, so it can be attached to a client such as Claude Desktop. The `agents` module contains an agent built with Google's Agent Development Kit for Kotlin that acts as an MCP client, connecting to `mcp-server` over Streamable HTTP to fetch emissions data as tools; an in-app Agents screen built with Koog queries the data through an LLM.

Supporting libraries include Ktor, Koin, KStore, Voyager and KoalaPlot. Builds are driven by Gradle tasks per target, and a Maestro UI test flow is shared by the Android and iOS clients and run in CI against an emulator and a simulator.

Key features

  • 01Shared Kotlin data layer, view models and Compose Multiplatform UI reused by Android, iOS, desktop and Web (Wasm) clients.
  • 02iOS app hosted in SwiftUI, with the country list screen implementable in either SwiftUI or Compose.
  • 03mcp-server module built on the Kotlin MCP SDK that exposes per-country emissions data as MCP tools for clients such as Claude Desktop.
  • 04ADK-based agent acting as an MCP client over Streamable HTTP, plus an in-app Agents screen built with Koog for LLM queries.
  • 05Kotlin Notebook for inspecting the same emissions data.
  • 06Maestro UI test flow shared by the Android and iOS clients and run in CI.

Use cases

  • Studying how a KMP project shares data, view models and Compose UI across mobile, desktop and web.
  • Feeding climate emissions data into an LLM assistant or agent through the MCP server.
  • Prototyping multi-platform clients from a single Kotlin codebase.
  • Exploring country emissions data interactively in a notebook.

Quick start

  1. 1

    Clone the repository and open the project folder

  2. 2

    Run the desktop app with Gradle

    ./gradlew :composeApp:run
  3. 3

    Run the web (Wasm) app in the browser

    ./gradlew :composeApp:wasmJsBrowserDevelopmentRun

Things to know

  • The iOS client requires Xcode to build and run.
  • The AI agent features need a Gemini API key.

In collections

Topics

FAQ

What is ClimateTraceKMP?
Kotlin/Compose Multiplatform sample showing Climate TRACE country emissions data on iOS, Android, desktop and web. ClimateTraceKMP is a Kotlin Multiplatform sample application that displays country-level greenhouse gas emissions data from climatetrace.org. Nearly all logic lives in the shared `composeApp` module — data layer, view models and Compose Multiplatform UI — which is consumed by the Android app, the iOS app, a desktop target and a Web (Wasm) target. The iOS client is hosted in SwiftUI and lets you implement the country list screen in either SwiftUI or Compose; selecting a country then navigates to the shared Compose emissions detail screen. A Kotlin Notebook is included for exploring the same data.
Is ClimateTraceKMP free to use? What license does it have?
ClimateTraceKMP is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is ClimateTraceKMP still maintained?
Actively maintained. The last commit to ClimateTraceKMP was on Nov 2, 2026.
What can I use ClimateTraceKMP for?
Studying how a KMP project shares data, view models and Compose UI across mobile, desktop and web. Feeding climate emissions data into an LLM assistant or agent through the MCP server. Prototyping multi-platform clients from a single Kotlin codebase. Exploring country emissions data interactively in a notebook.
How do I install ClimateTraceKMP?
Clone the repository and open the project folder Run the desktop app with Gradle: ./gradlew :composeApp:run Run the web (Wasm) app in the browser: ./gradlew :composeApp:wasmJsBrowserDevelopmentRun
Where can I get ClimateTraceKMP?
The source code and installation instructions are on GitHub: https://github.com/joreilly/ClimateTraceKMP

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects