The Next.js integration guide is currently under development. In the meantime, check out our Fastify integration guide which demonstrates similar patterns for integrating MooseStack with a TypeScript web framework.
If you need to track user events, run analytics queries, or build dashboards without deploying a separate analytics service, MooseStack lets you embed ClickHouse directly in your Next.js app with type-safe TypeScript models and queries. You keep Next.js as your only runtime while getting production-ready OLAP database capabilities.
This guide will show you how to:
moose/ directoryThe Fastify integration guide demonstrates the same patterns for integrating MooseStack with a TypeScript web framework.
You can use the same moose/ directory structure and TypeScript configuration as shown in the example for your Next.js app. The only difference is on integration point: you will call queries from your Next.js server-side code instead of your Fastify routes.
Full example coming soon.