backend-services

Design reusable Drumr Framework backend services with constructor injection and lifecycle hooks.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/slingr-stack/qa-test-drumr --skill backend-services
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-services
Source: https://github.com/slingr-stack/qa-test-drumr/tree/main/project-management-app/.agents/skills/backend-services
Command: npx skills add https://github.com/slingr-stack/qa-test-drumr --skill backend-services

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design reusable backend logic that stays out of actions, workflows, data models, and datasources, while keeping service boundaries clear and maintainable.

Core Features & Use Cases

  • Service Design: Defines when to create a shared backend service versus keeping logic local to an action.
  • Dependency Injection: Shows how services, actions, workflows, and the app class consume shared dependencies through constructor injection.
  • Lifecycle and Scope: Explains singleton and request-scoped services, plus app lifecycle hooks for startup, shutdown, and error handling.
  • Replacement and Strategy Patterns: Covers service overrides for tests or environments and dynamic resolution by string ID for runtime provider selection.
  • Use Case: Use this Skill when building notification adapters, audit context services, shared business rules, or replaceable infrastructure components in a Drumr backend.

Quick Start

Use the backend-services skill to explain how to create, inject, scope, and replace a Drumr backend service for the code I am working on.

Frequently Asked Questions about backend-services

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

FAQPage Schema
How do I design backend services with dependency injection in the Drumr Framework?

Backend services in the Drumr Framework use constructor injection and specific decorators to consume shared dependencies. You create reusable services by applying Service decorators and BaseService usage instead of generic web framework patterns to keep logic out of actions and workflows.

When should I create a shared backend service instead of putting logic directly in an action?

You should create a shared backend service when logic needs to be reused across multiple actions, workflows, or data models. If the logic is specific to a single action and not shared, keeping it local to that action is the better approach to maintain clear service boundaries.

How does singleton and request-scoped service lifecycle management work?

Singleton and request-scoped service lifecycles determine how long a service instance persists. Singleton services live for the application duration, while request-scoped services are created per individual request. The framework uses app lifecycle hooks for startup, shutdown, and error handling.

Can I replace a backend service for testing or different environments?

Yes, you can replace backend services for tests or environments using service replacement and strategy patterns. The framework supports dynamic provider resolution by string ID, allowing you to select runtime providers and override services as needed for different contexts.

Does this approach to backend service design work for building notification adapters and audit services?

Yes, this approach works for building notification adapters, audit context services, shared business rules, and replaceable infrastructure components. The dependency container conventions and service design patterns specifically target these types of shared backend logic requirements.

What are the limitations of using dynamic provider resolution for backend services?

Dynamic provider resolution by string ID requires exact framework-specific service and app patterns. You must follow strict dependency container conventions and Service decorators rather than generic web framework patterns, which means the design is tightly coupled to the Drumr Framework backend architecture.