Skip to content

harveymmaunders/llm-emissions-tracker

Repository files navigation

LLM Emisisons Tracker

This project aims create a standardized way of tracking, storing and retreiving LLM emissions data.

Getting Started

Prerequisites

  • Node.js (v20+) and npm
  • Java (JDK 21)
  • Python (3.13+) and uv - Install uv
  • Docker and Docker Compose

Quick Start

# Clone the repository
git clone https://github.com/harveymmaunders/llm-emissions-tracker.git
cd llm-emissions-tracker

# Install Nx workspace
npm install

# Install project dependencies (optional - install only what you need)
npx nx install llm-emissions-tracker-sdk-javascript
npx nx sync llm-emissions-tracker-sdk-python

# Or install all dependencies
npm run install-all

# Build everything
npx nx run-many -t build

# Start database and API
npx nx up llm-emissions-tracker-db
npx nx dev llm-emissions-tracker

# Stop the database
npx nx down llm-emissions-tracker-db

# Run all tests
npx nx run-many -t test

Software Architecture

The LLM Emissions Tracker project has the following software architecture.

Projects

  • llm-emissions-tracker - Java/Quarkus API
  • llm-emissions-tracker-db - PostgreSQL database
  • llm-emissions-tracker-sdk-python - Python SDK
  • llm-emissions-tracker-sdk-javascript - JavaScript SDK

Software components diagram

Figure: Software architecture components and their interactions.

This is how users interact with the system.

Software components diagram

Figure: Software architecture components and user flows.

LLM Emissions Tracker DB

This is a SQL-based DB which stores all information related to LLM Emissions data. It has the following database schema:

Software components diagram

Figure: Database schema.

LLM Emissions Tracker API

This is an API built with Java/Quarkus. It has REST endpoints for retrieving data and a WebSocket connection for streaming Emissions data to the database.

LLM Emissions Tracker SDK

This is a python SDK which acts as a wrapper around the LLM Emissions Tracker API. This makes it easier to send and retrieve LLM Emissions data.

About

LLM Emissions Tracker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published