backend-dev-guidelines

Provide backend development guidelines for Next.js 14, tRPC, Prisma, BullMQ, and ClickHouse projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates Hanzo's backend development practices into a single, coherent guide, replacing scattered notes with a consistent, reusable framework.

Core Features & Use Cases

  • Routing patterns: Clear separation of tRPC procedures, Public API routes, and worker entry points.
  • Service & Repository layering: Guidance on building protocol-agnostic services and reusable data access layers.
  • Observability & error handling: Standardized OpenTelemetry instrumentation and robust error transformation.
  • Configuration & testing: Enforced env validation, testing strategies, and tenant isolation patterns.

Quick Start

Use the backend-dev-guidelines to scaffold a new Next.js 14 + tRPC feature, implement a thin tRPC route, delegate to a service, and wire a repository call.

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 a Next.js 14 backend with tRPC and Prisma?

Structure your Next.js 14 backend using a layered architecture that separates tRPC routing, protocol-agnostic service layers, and repository data access. This enforces clear separation of concerns and standardizes environment validation across web and worker code.

What's the best way to handle errors and observability in a tRPC backend?

Handle errors and observability in a tRPC backend by implementing standardized OpenTelemetry instrumentation and robust error transformation. This ensures consistent tracing across service layers and clear error propagation to clients.

Does this backend architecture support background job processing with BullMQ?

Yes, this backend architecture supports BullMQ by defining clear worker entry points and routing patterns. It maintains separation of concerns by delegating job processing logic to shared service layers, ensuring consistency across web and worker environments.

How do I isolate tenant data when using Prisma and ClickHouse?

Isolate tenant data by applying tenant isolation patterns within the repository layer. This ensures Prisma and ClickHouse queries are scoped correctly, preventing cross-tenant data access across all service layer interactions.

What testing strategies should I use for a layered tRPC and Prisma backend?

Use testing strategies that validate the service and repository layers independently of tRPC routing. This approach ensures protocol-agnostic business logic functions correctly before integration testing the API entry points.

Do I need environment validation for a Next.js worker and web project?

Yes, environment validation is a core requirement for Next.js worker and web projects. Enforcing validation ensures missing or invalid configurations fail fast during startup, preventing runtime errors across shared code.