Langfuse Backend Development Guidelines

•
81
•

Standardizes backend development within Langfuse’s Next.js 14, tRPC, and BullMQ monorepo architecture.

This skill provides comprehensive guidance for building and maintaining the Langfuse backend, focusing on a layered architecture that bridges Next.js web applications and Express-based worker services. It enforces best practices for tRPC procedure delegation, multi-tenant isolation with PostgreSQL and ClickHouse, and robust observability using OpenTelemetry. By integrating these guidelines, developers can ensure consistency across API endpoints, queue processors, and service layers while maintaining high standards for security, validation, and testing within a complex TypeScript monorepo.

主な機能

01Multi-tenant isolation strategies using dual-database systems (PostgreSQL + ClickHouse).
02Integrated observability patterns using OpenTelemetry, DataDog, and traceException wrappers.
03Comprehensive checklists for creating new features, public API endpoints, and queue workers.
04Layered architecture patterns for tRPC procedures, REST APIs, and BullMQ processors.
05Strict environment configuration and validation using Zod v4 and env.mjs.
0681 GitHub stars

ユースケース

01Implementing secure, multi-tenant data access and analytics for enterprise-grade applications.
02Scaling a Next.js 14 monorepo with complex tRPC routers and background processing requirements.
03Standardizing error handling and observability across distributed web and worker packages.