This project aims create a standardized way of tracking, storing and retreiving LLM emissions data.
- Node.js (v20+) and npm
- Java (JDK 21)
- Python (3.13+) and uv - Install uv
- Docker and Docker Compose
# 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 testThe LLM Emissions Tracker project has the following software architecture.
llm-emissions-tracker- Java/Quarkus APIllm-emissions-tracker-db- PostgreSQL databasellm-emissions-tracker-sdk-python- Python SDKllm-emissions-tracker-sdk-javascript- JavaScript SDK
Figure: Software architecture components and their interactions.
This is how users interact with the system.
Figure: Software architecture components and user flows.
This is a SQL-based DB which stores all information related to LLM Emissions data. It has the following database schema:
Figure: Database schema.
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.
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.