A self-hosted product analytics platform: a tracking SDK, an event pipeline, and a dashboard.
InsightBoard is a Mixpanel/Amplitude-style product analytics stack you run yourself: drop the JS SDK into a web app, events flow through a FastAPI ingestion API and Kafka into ClickHouse, and a React dashboard turns that into event trends, retention funnels, session heatmaps, and custom boards.
- Event ingestion API: JWT-authenticated, Redis-backed sliding-window rate limiting, batches published to Kafka.
- JS/TS tracking SDK: batches events client-side, buffers to
localStoragewhen offline, flushes on an interval. - Streaming aggregation: a Kafka consumer batches events into
ClickHouse (
MergeTree/SummingMergeTreetables, partitioned by month) and rolls up hourly/daily aggregates for fast dashboard queries. - Dashboard: event trends, a funnel builder, session heatmaps, a drag-and-drop custom dashboard builder, and a live event feed, all in React + TypeScript + Tailwind.
flowchart LR
APP[Your web app] -->|track events| SDK[InsightBoard JS SDK]
SDK -->|batched POST /track| API
subgraph API["Ingestion API (FastAPI)"]
AUTH[JWT auth]
RATE[Redis rate limiter]
end
API -->|events| KAFKA[(Kafka)]
KAFKA --> AGG[Aggregator\nbatch consumer]
AGG -->|raw + rollups| CH[(ClickHouse)]
DASH[React Dashboard] -->|queries| CH
DASH -->|auth| API
git clone https://github.com/Heet852003/InsightBoard.git
cd InsightBoard
docker compose up -dOr run each piece directly:
# Ingestion API
cd backend/api
pip install -r requirements.txt
uvicorn app.main:app --reload
# Aggregator (separate terminal)
cd backend/aggregator
pip install -r requirements.txt
python app/main.py
# Dashboard (separate terminal)
cd frontend/dashboard
npm install
npm startPrerequisites: Node 16+, Python 3.9+, PostgreSQL, Kafka, Redis, ClickHouse
(or just use docker compose up -d).
import InsightBoard from "insightboard-sdk";
const ib = new InsightBoard({ apiKey: "YOUR_KEY", apiUrl: "https://your-api/track" });
ib.init("user-123");
ib.track("signed_up", { plan: "pro" });Events are queued client-side and flushed every 5 seconds (configurable),
so calling track never blocks the caller on a network round trip.
backend/api/ FastAPI ingestion API: auth, rate limiting, Kafka producer
backend/aggregator/ Kafka consumer that batches events into ClickHouse
frontend/dashboard/ React + TypeScript dashboard
sdk/js/ TypeScript client SDK (published as insightboard-sdk)
MIT. See LICENSE for details.