backend-dev-guidelines

Provide backend development guidelines for Langfuse's Next.js 14 monorepo.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/MohsinCreed/LangfuseOllama --skill backend-dev-guidelines-mohsincreed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/MohsinCreed/LangfuseOllama/tree/main/.claude/skills/backend-dev-guidelines
Command: npx skills add https://github.com/MohsinCreed/LangfuseOllama --skill backend-dev-guidelines-mohsincreed

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes a consistent and robust backend development framework for Langfuse's monorepo, ensuring maintainability, scalability, and adherence to best practices across all backend services.

Core Features & Use Cases

  • Standardized Architecture: Enforces a layered architecture (tRPC/API → Services → Repositories → Database) for clear separation of concerns.
  • Consistent Patterns: Provides guidelines for tRPC routers, public API routes, services, repositories, database access (PostgreSQL/ClickHouse), observability (OpenTelemetry/DataDog), and testing (Jest/Vitest).
  • Use Case: When developing a new tRPC endpoint for user authentication, consult this Skill to understand the correct procedure definition, middleware application, service delegation, and testing strategy.

Quick Start

Follow the backend development guidelines to create a new tRPC router and service.

Frequently Asked Questions about backend-dev-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure tRPC routers and services in a TypeScript monorepo?

Structure tRPC routers and services in a TypeScript monorepo using a layered architecture: tRPC/API routes delegate to services, which call repositories for database access via Prisma or ClickHouse, ensuring clear separation of concerns and maintainability.

What is the best way to validate API requests in a tRPC backend?

The best way to validate API requests in a tRPC backend is using Zod validation schemas within your procedure definitions to enforce data integrity before passing requests to the underlying service layer.

How do I implement background jobs with BullMQ queue processors in a Next.js 14 backend?

Implement BullMQ queue processors in a Next.js 14 backend by following standardized backend guidelines that define how to structure processor files, delegate tasks to services, and integrate observability tools like OpenTelemetry for job tracing.

Does this backend architecture support observability with OpenTelemetry and DataDog?

Yes, this backend architecture supports observability with OpenTelemetry and DataDog by providing consistent patterns for integrating tracing and monitoring across tRPC routers, public API endpoints, and queue processors.

What testing strategies should I use for a TypeScript monorepo backend?

Use Jest and Vitest testing strategies for a TypeScript monorepo backend by writing tests that validate tRPC procedure definitions, service layer logic, and repository interactions with PostgreSQL and ClickHouse databases.

How do I access PostgreSQL and ClickHouse databases in a layered backend architecture?

Access PostgreSQL and ClickHouse databases in a layered backend architecture through repository components that handle database interactions, receiving data requests from the service layer to maintain separation from business logic.