backend-dev-guidelines-universal

Provides framework-agnostic backend architecture patterns covering layered design, error handling, and testing strategies.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/dallascrilley/dowser --skill backend-dev-guidelines-universal-dallascrilley
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: backend-dev-guidelines-universal
Source: https://github.com/dallascrilley/dowser/tree/main/skills/backend-dev-guidelines-universal
Command: npx skills add https://github.com/dallascrilley/dowser --skill backend-dev-guidelines-universal-dallascrilley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend developers often struggle to structure applications consistently across different frameworks, leading to tangled business logic in controllers, inconsistent error responses, and untestable code. ## Core Features & Use Cases - Layered Architecture Patterns: Defines clear responsibilities for Routes, Controllers, Services, and Repositories with pseudo-code and framework-specific examples for Express, Django, Go, and more. - Error Handling Strategy: Provides a structured error taxonomy (validation, auth, not found, conflict, server errors) with a universal JSON error response format and layer-specific handling rules. - Testing & Validation Guidance: Outlines a test pyramid (60% service unit tests, 30% integration, 10% E2E) plus input versus business validation strategies. - Use Case: When starting a new REST API in NestJS or refactoring a monolithic Django app, apply these patterns to separate concerns, standardize API responses, and make each layer independently testable. ## Quick Start Ask the AI to design a layered architecture for a new posts API with controllers, services, repositories, and consistent error responses.

Frequently Asked Questions about backend-dev-guidelines-universal

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

FAQPage Schema
How do I structure a backend application with layered architecture?▼

Organize code into four layers: Routes map HTTP endpoints, Controllers handle request/response parsing, Services contain business logic, and Repositories manage database access. Keep controllers thin and services framework-agnostic so each layer is independently testable.

What is the difference between controller validation and service validation?▼

Controller validation checks HTTP-level concerns like required fields, types, and formats using tools like Zod, Pydantic, or Joi. Service validation enforces business rules such as state transitions, cross-field logic, and authorization checks.

Does this layered pattern work with Django and FastAPI?▼

Yes, the patterns are framework-agnostic and include adaptation examples for Django, FastAPI, Express, NestJS, Fastify, Go, and Spring Boot. Map routes, controllers, services, and repositories to your framework's routing, handlers, and data access mechanisms.

How should backend errors be structured in API responses?▼

Return a consistent JSON envelope with success flag and an error object containing code, message, details array, and timestamp. Map business and data errors to appropriate HTTP status codes like 400, 401, 404, 409, and 500 at the controller layer.

When should I not use a strict layered architecture?▼

Strict layering adds overhead for very small services, prototypes, or single-endpoint APIs where simplicity matters more. The guidelines emphasize ruthless simplicity: start simple and introduce layers only as complexity grows.