← ClaudeAtlas

backend-dev-guidelineslisted

Comprehensive backend development guide for Langfuse's Next.js 14/tRPC/Express/TypeScript monorepo. Use when creating tRPC routers, public API endpoints, BullMQ queue processors, services, or working with tRPC procedures, Next.js API routes, Prisma database access, ClickHouse analytics queries, Redis queues, OpenTelemetry instrumentation, Zod v4 validation, env.mjs configuration, tenant isolation patterns, or async patterns. Covers layered architecture (tRPC procedures → services, queue processors → services), dual database system (PostgreSQL + ClickHouse), projectId filtering for multi-tenant isolation, traceException error handling, observability patterns, and testing strategies (Jest for web, vitest for worker).
Microck/ordinary-claude-skills · ★ 394 · API & Backend · score 79
Install: claude install-skill Microck/ordinary-claude-skills
# Backend Development Guidelines ## Purpose Establish consistency and best practices across Langfuse's backend packages (web, worker, packages/shared) using Next.js 14, tRPC, BullMQ, and TypeScript patterns. ## When to Use This Skill Automatically activates when working on: - Creating or modifying tRPC routers and procedures - Creating or modifying public API endpoints (REST) - Creating or modifying BullMQ queue consumers and producers - Building services with business logic - Authenticating API requests - Accessing resources based on entitlements - Implementing middleware (tRPC, NextAuth, public API) - Database operations with Prisma (PostgreSQL) or ClickHouse - Observability with OpenTelemetry, DataDog, logger, and traceException - Input validation with Zod v4 - Environment configuration from env variables - Backend testing and refactoring --- ## Quick Start ### UI: New tRPC Feature Checklist (Web) - [ ] **Router**: Define in `features/[feature]/server/*Router.ts` - [ ] **Procedures**: Use appropriate procedure type (protected, public) - [ ] **Authentication**: Use JWT authorization via middlewares. - [ ] **Entitlement check**: Access resources based on resource and role - [ ] **Validation**: Zod v4 schema for input - [ ] **Service**: Business logic in service file - [ ] **Error handling**: Use traceException wrapper - [ ] **Tests**: Unit + integration tests in `__tests__/` - [ ] **Config**: Access via env.mjs ### SDKs: New Public API Endpoint Checklist (Web) - [