Kaizen
Browse modulesInsightsinsights/serverFunctions

Function: createInsightsServices()

function createInsightsServices(options: CreateInsightsServicesOptions): InsightsServices;

Defined in: server/insights/factory.ts:109

Create ready-to-use insights services.

Resolves the ambient primary Prisma client from the registry — call initPrismaClient / registerPrismaClient on @the-kaizen-labs/taproot/persistence at startup first. Call this per-request (or per-unit-of-work), not once at startup, so getActorId resolves fresh for each request's audit fields.

Mirrors createFormServices from forms/server — ambient client, per-request construction, property-access schema probe.

Parameters

ParameterType
optionsCreateInsightsServicesOptions

Returns

InsightsServices

On this page