devwithbobby

ClickHouse for Convex

A Convex component for buffering analytics events and flushing them to ClickHouse Cloud.

25 views

ClickHouse for Convex

ClickHouse for Convex

ClickHouse for Convex buffers analytics events in Convex and batch-flushes them to ClickHouse Cloud through the ClickHouse HTTP API.

Install the component with:

npm install @devwithbobby/clickhouse

Mount it in convex/convex.config.ts:

import { defineApp } from "convex/server";
import clickhouse from "@devwithbobby/clickhouse/convex.config.js";
 
const app = defineApp();
app.use(clickhouse);
 
export default app;

Features

Configure CLICKHOUSE_URL, CLICKHOUSE_USER, and CLICKHOUSE_PASSWORD in the Convex environment before connecting.

Resources