backend-dev-guidelines

Enforce layered Node.js/Express/TypeScript backend patterns with Zod and Sentry.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/BoraPerusic/agents --skill backend-dev-guidelines-boraperusic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/BoraPerusic/agents/tree/main/skills/to%20try/backend-dev-guidelines
Command: npx skills add https://github.com/BoraPerusic/agents --skill backend-dev-guidelines-boraperusic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies production-grade backend engineering practices, ensuring teams build reliable, observable, and maintainable services by enforcing a disciplined architecture and strong conventions.

Core Features & Use Cases

  • Layered architecture: Routes → Controllers → Services → Repositories with zero business logic in routes.
  • Robust backend patterns: centralized configuration (unifiedConfig), type-safe input validation (Zod), and comprehensive error handling with Sentry.
  • Observability and testing: built-in observability practices, unit/integration testing guidance, and clear governance for production-grade code.
  • Real-world guidance: frameworks for dependency injection, Prisma/repository usage, and consistent project structure across microservices.

Quick Start

Implement the backend-dev-guidelines in a Node.js/Express/TypeScript project by adopting the layered pattern, adding a unifiedConfig, Zod validation, and Sentry instrumentation, then align routes, controllers, services, and repositories with the prescribed conventions.

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 Node.js Express backend with TypeScript to keep business logic out of routes?

A layered backend architecture enforces a Routes → Controllers → Services → Repositories pattern, ensuring zero business logic in routes. This Node.js and TypeScript structure separates API contracts, data access, and logic for maintainable services.

What is the best way to validate API requests in a TypeScript Express application?

Type-safe input validation in an Express application is best handled using Zod schemas. By enforcing Zod validation at the controller layer, you ensure robust API contracts and prevent invalid data from reaching your backend services.

How do I set up centralized configuration and error handling for a production-grade Node.js API?

Centralized configuration in a Node.js API uses a unifiedConfig system to manage environment variables. Comprehensive error handling integrates Sentry to capture exceptions across the layered architecture, ensuring production reliability and observability.

Can I use Prisma with a layered backend architecture in TypeScript?

Yes, Prisma fits seamlessly into the repository layer of a layered TypeScript backend. This pattern isolates database queries within repositories, keeping services focused on domain logic while maintaining strict architectural boundaries.

How do I test Node.js Express routes and services to ensure deterministic backend behavior?

Deterministic backend testing requires a structured test suite covering unit and integration tests across routes, services, and repositories. This approach validates API contracts and logic without relying on external state or unpredictable side effects.

When should I enforce a strict layered architecture instead of a simpler Node.js structure?

Strict layered architecture is needed for production-grade backend services requiring high observability and maintainability. For complex Node.js projects, enforcing these conventions prevents code entanglement and ensures reliable, testable microservices.