Ship analytics across your entire stack
Define metrics once in TypeScript. Reuse across APIs, jobs, dashboards, and AI agents. Type-safe everywhere. No drift, no debates.
One definition. Any context. Zero drift.
No YAML · No string-concatenated SQL · No duplicated metrics
Waiting for command...
Everything is code
From schema to serving: analytics as a proper development platform
Schema introspection → type generation → query definitions → HTTP APIs. All wired together with end-to-end type safety. No config files, no string interpolation, no runtime surprises. Just code that scales with your team.
import { initServe } from '@hypequery/serve';
import { z } from 'zod';
import { db } from './analytics/client';
const { define, queries, query } = initServe({
context: () => ({ db }),
});
export const api = define({
queries: queries({
weeklyRevenue: query
.input(z.object({ startDate: z.string() }))
.query(async ({ ctx, input }) =>
ctx.db
.table('orders')
.where('created_at', 'gte', input.startDate)
.groupBy(['week'])
.sum('total', 'revenue')
.execute()
),
}),
}); Embedded
const revenue = await api.execute('weeklyRevenue'); API
POST /api/weeklyRevenue React
const { data } = useQuery('weeklyRevenue'); AI agent
{ "tool": "weeklyRevenue", "arguments": {} } The single source of truth for your data
Backend & platform
Backend and platform engineers pull the same hypequery definition into cron jobs, queues, and HTTP handlers so every service agrees on revenue math.
import { api } from '../analytics/api';
import { notifyOps } from '../lib/notifications';
export async function sendRenewalDigest() {
const digest = await api.run('renewalHealth', {
windowEnd: new Date().toISOString(),
});
await notifyOps('renewals', digest.rows);
} Why your org keeps rebuilding this layer
Every scaled ClickHouse team eventually builds the same thing: a type-safe semantic layer that hides schema complexity and exposes governed, reusable metrics. You just get to start there.
Your API reports $1.2M in revenue.
The dashboard shows $1.3M.
The Slack bot says $1.1M.
Someone tweaked a date filter.
Someone else “fixed” the exclusion logic.
An agent hallucinated a JOIN.
Suddenly "what's our revenue?" needs a Slack thread, a meeting, and three engineers debating whose SQL is right.
This is what happens when analytics doesn't have a platform.
One definition. Every consumer. Zero ambiguity.
An end-to-end platform for analytics development
Schema-aware, type-safe foundation
Your ClickHouse schema becomes a TypeScript SDK. Columns become types, tables become interfaces. Refactor with confidence, catch errors at build time.
Execute anywhere, not just via HTTP
Run queries directly in jobs, APIs, scripts, or agents. HTTP is optional, not required. Your metrics travel to where they're needed.
Metrics as first-class code citizens
Import definitions like any other module. Same query in your API, dashboard, cron job, and AI agent. One source of truth.
Auto-generated APIs with zero boilerplate
Every query becomes an HTTP endpoint with OpenAPI, input validation, and TypeScript clients. No controllers, no routing code, no YAML.
Tenant isolation at the platform level
Declare tenant patterns once. The platform auto-injects filters, validates auth, and guarantees isolation. Impossible to leak data between tenants.
Auth, observability & caching built in
Verify sessions, inject user context, control access, and cache at the query level. Security primitives and observability included, not bolted on.
Ship faster
Ready for a proper analytics platform?
Point hypequery at your ClickHouse cluster and get the full stack: schema-aware SDK, type-safe metrics, HTTP APIs, and observability. Everything wired together with end-to-end type safety.
Early adopter? DM us @hypequery — let's build this together.