Footprints Domain
The Footprints domain handles supply chain impact calculations including modern slavery risk, carbon emissions, and biodiversity metrics.
Data Flow
Key Concepts
| Concept | Description |
|---|---|
| Footprint | Supply chain impact metrics (modern slavery risk, emissions, biodiversity) |
| Impact | Absolute value (e.g., 500 tonnes CO2) |
| Intensity | Value per unit spend (e.g., 2.5 kg CO2/USD) |
| Satellite | Data source containing impact factors by country/industry |
| Aquila1 | Industry classification system (based on NAICS) used for calculations |
Scope Emissions
The platform focuses on Scope 3 emissions (supply chain), but understanding all scopes is important:
| Scope | Description | Platform Coverage |
|---|---|---|
| Scope 1 | Direct emissions from owned sources | Not calculated |
| Scope 2 | Indirect from purchased energy | Not calculated |
| Scope 3 | All other indirect (supply chain) | Primary focus |
Calculation Requirements
To calculate a footprint, a transaction needs three pieces of information:
| Requirement | Purpose |
|---|---|
| Country (origin) | Geographic risk factors |
| Industry (Aquila1) | Sector-specific impact factors |
| Amount (USD) | Normalized spend value |
Transactions missing any of these are skipped in calculations.
ClickHouse Integration
Footprint calculations use ClickHouse for analytical queries (not Neo4j):
| Feature | Description |
|---|---|
| Session Caching | Deterministic session ID from input hash |
| TTL | 60-second cache on results |
| Distributed Locks | Prevent race conditions during calculation |
Business Rules
- Country and industry are required for calculation
- All amounts converted to USD before calculation
- Historical amounts adjusted for CPI inflation
- Risk thresholds determine high/medium/low classification
- Results cached for 60 seconds for performance
- Satellites are versioned by year; default is latest
Common Operations
Calculating Organisation Footprint
import { CalculateOrganisationFootprint } from '@repo/core';
const useCase = new CalculateOrganisationFootprint();
const footprint = await useCase.execute({
organisationId: 'org-123',
year: 2024,
});
// Result includes:
// - modernSlaveryRisk: { impact, intensity, riskLevel }
// - emissions: { impact, intensity, riskLevel }
// - biodiversity: { impact, intensity, riskLevel }Getting Portfolio Footprint
import { GetPortfolioFootprint } from '@repo/core';
const useCase = new GetPortfolioFootprint();
const portfolio = await useCase.execute({
accountId: 'account-123',
filters: { year: 2024, country: 'AU' },
});Risk Levels
Footprint results include risk classifications:
| Level | Description |
|---|---|
| Low | Below threshold for concern |
| Medium | Requires monitoring |
| High | Requires attention and mitigation |
| Critical | Immediate action required |
Related Files
| Type | Location |
|---|---|
| ClickHouse Queries | packages/core/src/infrastructure/clickhouse/ |
| Calculation Services | packages/core/src/domain/services/footprint/ |
| Use Cases | packages/core/src/application/use-cases/footprint/ |
| Satellites Data | packages/core/src/infrastructure/clickhouse/satellites/ |