backend-dev-guidelines

Guide Express/TypeScript microservice development with layered architecture, Zod validation, and Sentry instrumentation.

3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/joshka0/foxctl --skill backend-dev-guidelines-joshka0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/joshka0/foxctl/tree/main/docs/knowledge/backend-dev-guidelines
Command: npx skills add https://github.com/joshka0/foxctl --skill backend-dev-guidelines-joshka0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It standardizes how to build Node.js/Express/TypeScript backend microservices so new routes, controllers, services, repositories, and cross-cutting concerns follow consistent architecture, validation, error handling, and monitoring rules.

Core Features & Use Cases

  • Layered architecture enforcement: keeps responsibilities separated (routes → controllers → services → repositories → Prisma/DB).
  • Express design patterns: route delegation, BaseController usage, and middleware ordering guidelines.
  • Production-grade reliability: mandatory Sentry error capture, Zod input validation, unifiedConfig for configuration, and Prisma repository patterns.
  • Testing and refactoring guardrails: encourages unit/integration tests and provides an anti-patterns-to-best-practices workflow.

Quick Start

Use the backend-dev-guidelines skill when you are implementing a new Express endpoint or refactoring an existing service to follow routes → controllers → services → repositories with Sentry, Zod validation, and unifiedConfig.

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 Express TypeScript microservices with layered architecture?

Structure Express TypeScript microservices by delegating responsibilities across routes, controllers, services, and repositories. This layered architecture enforces separation of concerns, ensuring controllers handle HTTP requests while services manage business logic and repositories interact with the database.

What is the repository pattern in Prisma and when should I use it?

The repository pattern in Prisma abstracts database access behind repository classes instead of calling Prisma directly in services. Use it to centralize data access logic, making your Express microservices more testable and easier to maintain when scaling database operations.

How do I validate API request inputs in Express using Zod?

Validate API request inputs in Express using Zod by defining schemas and applying validation middleware before controllers. This approach ensures incoming data conforms to expected types, catching invalid requests early and preventing bad data from reaching your service layer.

Does this backend architecture pattern require Sentry for error monitoring?

This backend architecture pattern requires Sentry instrumentation for production-grade reliability. Capturing errors to Sentry is a mandatory cross-cutting rule within this workflow, ensuring that runtime exceptions and performance issues in your Express microservices are actively monitored.

Can I use process.env directly for configuration in TypeScript Express services?

You should avoid direct process.env usage in TypeScript Express services by utilizing a unifiedConfig-based configuration approach. Centralizing configuration management prevents scattered environment variable access and simplifies deployment across different microservice environments.