Skip to content

Latest commit

 

History

114 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plugin Elementary

Project Status: Active License: GPL-2.0-or-later PHP 8.2+ Node 22

The starting template for a WordPress features plugin: the plugin that holds a site's backend functionality — post types, taxonomies, blocks, REST endpoints, settings and admin pages, shortcodes, user roles, WP-Cron jobs and WP-CLI commands.


This skeleton gives a new client plugin its structure, working examples, asset pipeline, checks and CI, so a project starts from a tested baseline instead of an empty folder.

It builds on two shared rtCamp libraries and uses a third for CI:

  • rtcamp/wp-primitives (Composer, runtime): the registration system, Abstract* base classes, loaders and utilities that every class in inc/ extends.
  • @rtcamp/wp-tooling (npm, development): the npm run init setup wizard, the npx wp-tooling add feature scaffolder, the shared lint configs and release scripts.
  • rtCamp/wp-shared-workflows: the reusable lint, test and build CI that .github/workflows/test-measure.yml calls.

The skeleton documents what it provides and how to build on it. The framework's API and lifecycle are documented in its own docs, and these guides link there where needed.

This is a template. Project Name / project-name / Project_Name are placeholders; npm run init renames them to your project.

Get started

Create a new plugin with Composer, or clone this repository:

composer create-project rtcamp/plugin-elementary my-plugin

Then follow Getting Started: prerequisites, getting the skeleton, installing, naming the plugin, and seeing it running in a local WordPress site. It takes about fifteen minutes.

What is included

  • Infrastructure that stays in every project: bootstrap and loader, asset registration, theme-overridable templates and components, a shared logger, an encryption service, activation and deactivation handling, and PHPUnit, PHPCS, PHPStan, ESLint and Stylelint setups.
  • Twelve example sets, one per feature domain (post types, taxonomies, blocks, REST, WP-CLI, cron, settings pages, admin pages, user roles, shortcodes, cache, transients). Each is a working, tested reference you keep or remove at setup.
  • Optional development features: HMR live reload (on by default), Tailwind CSS, and Dev Tools runtime telemetry over MCP.

See Included features for where each one lives and how to see it working.

Choose your next task

I want to… Read
Name the plugin and choose what ships Initialization
Run WordPress locally, check a change, build for delivery Local development
See what the skeleton already provides Included features
Generate a feature with the CLI or AI Scaffolding
Add blocks, scripts or styles Blocks and assets
Extend the plugin by hand Development guide
Contribute to this skeleton Contributing

The full documentation index is docs/index.md.

AI tooling

Setup and feature scaffolding are also available through AI assistants, kept in step across tools:

  • Claude Code: skills in .claude/skills/ — /init (set up or manage the plugin) and /scaffold (add one feature, test first). /setup is a generic tooling bootstrapper and does not replace /init.
  • GitHub Copilot: matching /init and /scaffold prompts in .github/prompts/.
  • Any assistant: AGENTS.md is the tool-agnostic source of conventions; CLAUDE.md and .github/copilot-instructions.md point to it.

A committed knowledge graph in graphify-out/ lets assistants query the code's structure instead of reading it all; see docs/internal/knowledge-graph.md.

Folder structure

project-name-features.php   # entry: constants → Autoloader::autoload() → Main::get_instance()
inc/                        # PSR-4 root: Project_Name\Features\ → inc/
├── Autoloader.php          # loads vendor/autoload.php; admin notice instead of a fatal if missing
├── Main.php                # Main::CLASSES — the list of everything the plugin loads
├── Core/                   # always loaded: Assets, PluginSetup, Components, Templates, Encryption, Logger
├── Helpers/                # stateless static utilities (Util)
└── Modules/                # one module per feature domain, concrete classes in the matching subfolder
    ├── PostTypes/  Taxonomies/  Blocks/  Shortcodes/
    ├── REST/  CLI/  Cron/
    ├── Settings/  Admin/  Roles/
    └── Cache/  Transients/
src/{blocks,css,js}/        # editable sources → assets/build/ (generated)
templates/                  # theme-overridable PHP templates
tests/{php,js}/             # PHPUnit (mirrors inc/) and Jest
bin/                        # init wrapper, scaffold config, block scaffolder, helper scripts
docs/                       # these guides; docs/internal/ is for skeleton maintainers
.github/                    # CI caller, issue/PR templates, Copilot instructions and prompts
vendor/rtcamp/wp-primitives/ # the framework (Composer-managed; never edit)

Some of these folders hold examples that initialization can remove; see Included features.

License

GPL-2.0-or-later

rtCamp — high-performance enterprise WordPress

About

A starter plugin for building new WordPress plugins, with a PSR-4 structure on rtcamp/wp-primitives, one-command setup, feature scaffolding, block HMR, optional Tailwind, and tests and CI out of the box.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages