backend-dev-guidelines

Guide backend development practices for Langfuse's Next.js, tRPC, and Prisma stack.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/JadhavAnsh/blockcraft --skill backend-dev-guidelines-jadhavansh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/JadhavAnsh/blockcraft/tree/main/.agents/skills/backend-dev-guidelines
Command: npx skills add https://github.com/JadhavAnsh/blockcraft --skill backend-dev-guidelines-jadhavansh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to backend development in Langfuse's ecosystem, offering best practices, architecture patterns, and tools for efficient development.

Core Features & Use Cases

  • Development Guide: A detailed guide covering architecture, configuration, database patterns, and middleware.
  • Layered Architecture: Describes the three-layer architecture with API entry points, services, and data access.
  • Best Practices: Recommendations on procedures, services, error handling, testing, and data isolation.

Quick Start

Use the backend-dev-guidelines skill to review the architecture overview and learn about best practices for building a robust backend.

Frequently Asked Questions about backend-dev-guidelines

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

FAQPage Schema
What is the best way to structure a Next.js backend using tRPC and Prisma?

The best way to structure a Next.js backend with tRPC and Prisma is using a three-layer architecture. This pattern separates API entry points, services, and data access to enforce security, observability, and maintainability.

How do I configure database access patterns in a Prisma and ClickHouse stack?

To configure database access patterns in a Prisma and ClickHouse stack, implement a dedicated data access layer within your backend architecture. This isolates database queries from business logic, ensuring structured and maintainable data interactions.

How does middleware usage work in a layered tRPC architecture?

Middleware usage in a layered tRPC architecture operates at the API entry point level. It handles cross-cutting concerns like error handling and security procedures before routing requests to the underlying services and data access layers.

Can I use these backend development guidelines for a non-Langfuse Next.js application?

You can apply these backend guidelines to non-Langfuse Next.js applications, but they are specifically optimized for Langfuse's ecosystem. The practices heavily emphasize the specific configurations and observability tools used within Langfuse's stack.

What are the limitations of using a three-layer architecture for tRPC procedures?

A limitation of using a three-layer architecture for tRPC procedures is the potential for increased boilerplate code. Strict separation between API entry points, services, and data access requires careful error handling to prevent excessive abstraction overhead.