dokan-backend-dev

Implement Dokan backend PHP classes with namespace mapping and PSR-4 autoloading.

286|214|Updated Jan 31, 2017
One-click install
npx skills add https://github.com/getdokan/dokan --skill dokan-backend-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dokan-backend-dev
Source: https://github.com/getdokan/dokan/tree/main/.claude/skills/dokan-backend-dev
Command: npx skills add https://github.com/getdokan/dokan --skill dokan-backend-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dokan backend development requires consistent architecture, naming, and REST integration across modules. This skill provides a centralized guide that standardizes how to implement backend PHP code for Dokan plugins.

Core Features & Use Cases

  • Standardizes backend architecture for Dokan modules, including manager patterns, namespace conventions, and autoloading.
  • Guides the creation of hooks, REST endpoints, and service providers to ensure predictable, maintainable growth.
  • Use Case: When adding a new backend service, follow this skill to align with existing Dokan conventions and pass project reviews.

Quick Start

Follow the conventions to add a new backend PHP class under the Dokan namespace, implement a Manager, and expose REST endpoints according to the guide.

Frequently Asked Questions about dokan-backend-dev

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

FAQPage Schema
How do I create a new backend PHP class in Dokan that follows project conventions?

To create a new Dokan backend PHP class, place it under the Dokan namespace using PSR-4 autoloading, implement a Manager pattern, and register it via a service provider to align with project architecture and pass reviews.

What is the correct namespace and file path mapping for Dokan REST controllers?

Dokan REST controllers require strict namespace mapping and PSR-4 autoloading compliance, ensuring the class file path directly matches its namespace structure to maintain predictable, project-aligned backend code.

How do I add custom REST endpoints to a Dokan plugin module?

You add custom Dokan REST endpoints by structuring a new REST controller class according to Dokan conventions, mapping the namespace correctly, and exposing endpoints through the project's standardized provider registration system.

Do I need to follow specific coding standards for Dokan backend hooks and services?

Yes, Dokan backend hooks and services must follow specific coding standards, utilizing manager patterns and provider registration to ensure predictable, maintainable growth across the plugin architecture.

How does the Dokan Manager pattern work for backend module development?

The Dokan Manager pattern standardizes backend module architecture by encapsulating service logic within namespaced classes, ensuring new features integrate predictably with existing hooks and REST endpoints.

What's the best way to write unit tests for Dokan backend PHP code?

Writing unit tests for Dokan backend PHP code requires following project-aligned coding standards, ensuring new classes, services, and hooks meet the specified architectural conventions for predictable testability.