backend-dev-guidelines

Standardizes backend development across a Next.js 14/TypeScript monorepo with tRPC, Express, and BullMQ.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/teddylee777/LangGraph-Advanced-Tutorial --skill backend-dev-guidelines-teddylee777
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/teddylee777/LangGraph-Advanced-Tutorial/tree/main/Day-08/langfuse/.claude/skills/backend-dev-guidelines
Command: npx skills add https://github.com/teddylee777/LangGraph-Advanced-Tutorial --skill backend-dev-guidelines-teddylee777

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a standardized backend development blueprint for Langfuse's monorepo, helping teams implement features with consistent architecture, tenant isolation, observability, and test strategies.

Core Features & Use Cases

  • Three-layer architecture: Entry points (tRPC/public API) → Services → Repositories → Database (PostgreSQL + ClickHouse)
  • Tenant isolation: Enforce projectId filtering for multi-tenant data access
  • Observability & testing: OpenTelemetry-based logging and tests for web and worker
  • Reusable patterns: Service and repository templates for rapid feature development
  • Use Case: When starting a new backend feature, follow these guidelines to ensure quality and maintainability.

Quick Start

Follow the Quick Start to scaffold new backend features: create a tRPC router, a service, and a repository, and wire them with Zod v4 validation.

Frequently Asked Questions about backend-dev-guidelines

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

FAQPage Schema
How do I standardize backend architecture across a Next.js monorepo with tRPC and Express?

This Skill provides a three-layer architecture pattern—entry points (tRPC/public API) → services → repositories → databases—enforced across a Next.js 14/tRPC/Express/TypeScript monorepo. It standardizes feature implementation with consistent tenant isolation, observability, and testing strategies for web, worker, and shared packages.

How do I implement tenant isolation in a multi-tenant PostgreSQL and ClickHouse backend?

The Skill enforces projectId filtering across tRPC routers, services, and repositories to ensure multi-tenant data access is isolated. It applies tenant isolation patterns consistently to both PostgreSQL and ClickHouse queries, preventing cross-tenant data leaks in shared monorepo packages.

What's the best way to set up observability and error handling in a TypeScript backend with OpenTelemetry?

Use the traceException error handling pattern and OpenTelemetry-based logging documented in this Skill. It standardizes instrumentation across tRPC routers, services, BullMQ queue processors, and Redis queues, with Jest and Vitest testing strategies for web and worker environments.

How do I structure services and repositories for rapid feature development in a Prisma and ClickHouse stack?

Follow reusable service and repository templates provided by this Skill. Wire them with Zod v4 validation, configure dual database access through Prisma (PostgreSQL) and ClickHouse clients, and apply the three-layer architecture pattern to scaffold new features consistently.

Can I use this architecture with BullMQ queue processors and Redis in a monorepo?

Yes. The Skill covers async patterns, BullMQ queue processor design, Redis queue configuration, and OpenTelemetry instrumentation across web, worker, and shared packages within a monorepo, ensuring consistent observability and error handling for background jobs.

What environment configuration and validation does this Skill enforce for backend services?

The Skill enforces env.mjs configuration and Zod v4 validation patterns across the monorepo. It standardizes how environment variables are defined, validated, and consumed by tRPC routers, services, repositories, and worker processes.