Introduction
Welcome to the hypequery docs. Find all the resources to get started.
What is hypequery?
hypequery is a code-first semantic layer for ClickHouse, built for TypeScript teams who want scalable, type-safe analytics.
Instead of scattering SQL across applications, dashboards, and scripts, hypequery gives you a single, versioned place where analytics logic lives. In code.
hypequery is a library, not a hosted platform. It integrates directly with your existing ClickHouse setup and runs wherever your application runs.
hypequery consists of a number of small, opt-in packages for building type-safe analytics:
-
Query builder (
@hypequery/clickhouse) Write type-safe ClickHouse queries in TypeScript -
Datasets (semantic layer) (
@hypequery/datasets) Define metrics, dimensions, and reusable analytics logic -
Runtime / APIs (
@hypequery/serve) Expose queries and datasets via APIs with validation, auth, and multi-tenancy -
Extras
@hypequery/mcp→ Query datasets from AI models@hypequery/react→ Hooks for frontend apps
Choose your path
If you're new, follow this path:
- Start with the query builder to run type-safe queries locally
- Add datasets to define shared metrics and dimensions
- Use
serve()when you want to expose queries as APIs
Get Started
Start with either the builder-first route or the reusable-query runtime route
Look up connection options, client setup, and ClickHouse configuration details
Browse full working apps and framework examples in the examples repo
Framework Setup
See how the query-and-serve path fits into a Vite app
Mount the runtime inside a Next.js App Router project
Run the runtime behind a dedicated Node.js server
Use these once you are ready to mount the runtime inside an app or server.
Explore More
Build and compose queries with the fluent API
Look up the detailed API docs
Read the ClickHouse-specific behavior that matters when using the builder and runtime