# FrigadeHQ/trench

Trench — Open-Source Analytics Infrastructure. A single production-ready Docker image built on ClickHouse, Kafka, and Node.js for tracking events. Easily build product analytics dashboards, LLM RAGs, observability platforms, or any other analytics product.

Repository: https://github.com/FrigadeHQ/trench
Canonical: https://ross.abutalabs.com/products/trench
Homepage: https://trench.dev
Language: TypeScript
License: MIT
License Family: permissive
Topics: clickhouse, clickhouse-database, clickhouse-server, kafka, open-source, tracking, tracking-events, nodejs, product-analytics, kafka-engine, event-replay, analytics, matomo, matomo-analytics, plausible-analytics, posthog, dashboard, dashboards, llm, rag
Last push: 2026-04-06T23:11:33+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 76, release rhythm 40, longevity 50
- inputs: {"age_days": 702, "days_push": 149, "days_rel": 637, "gap_med": 0.0, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1661, forks 65 (observed 2026-08-28T04:05:18.572881+00:00)

## What it is
Trench is an open-source event tracking and analytics infrastructure built on Apache Kafka and ClickHouse, shipped as a single production-ready Docker image. It is Segment API compliant (Track, Identify, Group), processes thousands of events per second, and supports real-time SQL/REST queries and webhook destinations.

## Use cases
- self-host product analytics event tracking
- replace a slow Postgres events table with ClickHouse-backed tracking
- build custom analytics dashboards like Google Analytics with Grafana
- store and query LLM/RAG usage events
- build an observability or analytics platform on tracked events
- forward tracked events to other destinations via webhooks

## When to choose
- you need high-throughput, real-time event tracking without managing Kafka and ClickHouse separately
- you want Segment API compatibility with full data ownership and GDPR compliance
- your relational database events table has become a scaling bottleneck

## When to avoid
- you need a turnkey hosted dashboard with built-in visualizations like PostHog or Plausible
- your event volume is small enough for a simple database table
- you cannot run Docker or manage self-hosted infrastructure

## Facets
- artifact type: service
- maturity: active
- function: analytics, streaming, webhook, http-server, api-framework
- domain: analytics, big-data, developer-tools, self-hosted
- platform: self-hosted, cloud
- tags: event-tracking, clickhouse, kafka, segment-api, product-analytics, gdpr-compliant, real-time-analytics, data-engineering, docker, nodejs, web-server

## Member repositories
- FrigadeHQ/trench (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:18.572881+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:36.082712+00:00, confidence not recorded.
  - readme: https://github.com/FrigadeHQ/trench (fetched 2026-08-28T04:05:18.572881+00:00, sha e24950a4a910)
  - homepage: https://trench.dev (fetched 2026-08-29T11:17:19.043552+00:00, sha d036ee38f013)
  - site_page: https://www.trench.dev/about (fetched 2026-08-29T11:17:19.052643+00:00, sha 1ccc21f63574)
  - site_page: https://docs.trench.dev (fetched 2026-08-29T11:17:19.054773+00:00, sha 3eb5c3a86c48)
- Data as of 2026-08-30T08:39:29.467469+00:00.
