What problem does it solve?
This Skill provides a centralized, comprehensive guide to Langfuse's backend architecture and development patterns, reducing onboarding time and ensuring consistent, high-quality code across the monorepo. It helps developers quickly understand and apply best practices for tRPC, public APIs, services, databases, and testing, minimizing errors and rework.
Core Features & Use Cases
- Architectural Guidance: Explains the layered architecture, request flows, and separation of concerns for tRPC and public REST APIs, simplifying complex system understanding.
- Database Access Patterns: Details how to interact with PostgreSQL (Prisma) for transactional data and ClickHouse for analytics, emphasizing critical
projectId filtering for tenant isolation.
- Testing Strategies: Outlines various testing approaches (integration, tRPC, service, worker) to ensure robust and reliable backend components, saving time on manual QA.
- Use Case: When building a new tRPC endpoint for a UI feature, this skill guides you through defining the procedure, implementing business logic in a service, accessing the database while ensuring tenant isolation, and writing comprehensive tests to validate functionality.
Quick Start
When starting a new backend feature, begin by reviewing the "Architecture Overview" and "Routing Patterns" sections to understand the system's structure and how to define new endpoints or procedures.