This project is an example dashboard showing how to get started with hypequery and Next.js for type-safe analytics on ClickHouse.
- Type-safe queries using hypequery
- Modern UI components with Next.js, shadcn/ui, and Tremor
- Data visualised from ClickHouse
- Example: NYC Taxi Trips dataset
This dashboard uses the New York Taxi Data sample from ClickHouse:
- 3+ billion taxi and for-hire vehicle (Uber, Lyft, etc.) trips originating in New York City since 2009
- Includes pickup/dropoff times, locations, fares, passenger counts, and more
- Dataset documentation and schema
Table name: trips (or nyc_taxi.trips in some setups)
git clone <your-repo-url>
cd clickhouse-nextjs-dashboard-starter
npm installCopy .env.example to .env and fill in your ClickHouse credentials:
CLICKHOUSE_HOST=http://localhost:8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=
CLICKHOUSE_DATABASE=defaultUse the Hypequery CLI to introspect your ClickHouse schema and generate types:
npx hypequery-generate-typesnpm run devVisit http://localhost:3000 to see the dashboard.
- The app uses Hypequery's type-safe query builder to fetch data from the
tripstable. - Data is visualized using Tremor's AreaChart and shadcn/ui components.
- All queries and API routes are fully type-checked end-to-end.
MIT