frontend-services

Centralize frontend logic into testable service modules and shared providers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you keep frontend logic organized, reusable, and testable by moving shared behavior out of views and into well-defined service modules and providers.

Core Features & Use Cases

  • Singleton service patterns: Create lazy, module-level getters for service classes instead of instantiating them directly.
  • Framework singleton usage: Safely consume app context, GraphQL, and config services in callbacks, lifecycle code, and other non-React locations.
  • Shared reactive state: Use React context and app provider registration when state must be shared across components and trigger re-renders.
  • Use case: Build a dashboard data service that composes GraphQL queries, caches results, and exposes a stable API to multiple views.

Quick Start

Ask the assistant to create a Drumr frontend service that uses a module-level singleton getter, consumes framework singletons correctly, and shares reactive state through a React provider when needed.

Frequently Asked Questions about frontend-services

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

FAQPage Schema
How do I share frontend service logic across multiple React views?

To share frontend service logic across React views, you move shared behavior into service modules using module-level singleton getters and register React providers via app.registerProviders() for shared reactive state that triggers re-renders.

What is the best way to structure frontend services for GraphQL orchestration and caching?

The best way to structure frontend services for GraphQL orchestration is by centralizing logic into testable service modules that compose queries, cache results cross-view, and consume the framework's getGraphQLClient() singleton.

How do I access app context and config services inside non-React frontend callbacks?

To access app context and config services inside non-React frontend callbacks, use the framework singleton access methods getContext() and getConfigService() directly within your lifecycle code and service modules.

Why use singleton getters for frontend service classes instead of direct instantiation?

Use singleton getters for frontend service classes instead of direct instantiation to ensure lazy module-level initialization, which keeps shared state consistent and makes your application logic highly testable.

When should I use React context providers versus module-level singletons for frontend state?

Use React context providers with app.registerProviders() when shared reactive state must trigger component re-renders across views; use module-level singletons for non-reactive service logic, GraphQL orchestration, and lifecycle code.

Can I extend frontend service behavior at runtime in views and callbacks?

Yes, you can extend frontend service behavior at runtime by defining runtime extension points within views, callbacks, and lifecycle code, while safely consuming framework singletons for app context and configuration.