https://github.com/veronalabs/forge
Craft production-ready WordPress plugins from a battle-tested foundation.
https://github.com/veronalabs/forge
Last synced: about 2 months ago
JSON representation
Craft production-ready WordPress plugins from a battle-tested foundation.
- Host: GitHub
- URL: https://github.com/veronalabs/forge
- Owner: veronalabs
- License: mit
- Created: 2026-04-02T07:19:53.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-02T07:31:11.000Z (2 months ago)
- Last Synced: 2026-04-07T18:02:41.680Z (about 2 months ago)
- Language: PHP
- Size: 31.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Forge — VeronaLabs Plugin Starter
Craft production-ready WordPress plugins from a battle-tested foundation.
## Quick Start
```bash
composer create-project veronalabs/forge my-plugin
cd my-plugin
./configure
```
The `configure` script will ask for your plugin name, namespace, and other details, then scaffold everything automatically.
## What's Inside
- **Service Container** — Lazy-loading DI with register/boot lifecycle
- **Service Providers** — Two-phase initialization (register factories, then boot)
- **React Dashboard** — Vite + React 19 with manifest-based PHP enqueue
- **SCSS + Entry Points** — Admin/frontend SCSS and IIFE bundles via Vite
- **Premium Template** — Unified premium model with module loader system
- **PHPUnit Tests** — WordPress test library integration
- **wp-scoper** — Vendor namespace isolation for conflict-free distribution
## Architecture
```
my-plugin/
├── src/
│ ├── Bootstrap.php # Plugin initialization
│ ├── Container/ # DI container + service providers
│ ├── Components/ # Utilities (View, etc.)
│ └── Service/ # Business logic (Admin, Assets, etc.)
├── resources/
│ ├── react/src/ # React dashboard app
│ ├── entries/ # Admin/frontend IIFE bundles
│ └── scss/ # Stylesheets
├── views/ # PHP templates
├── tests/ # PHPUnit tests
└── premium/ # Premium plugin template
└── pro/
├── src/ # Premium bootstrap + module loader
└── modules/ # Auto-discovered premium modules
```
## Development
```bash
# Install dependencies
composer install
npm install
# Start dev server (React + scripts + SCSS watch)
npm run dev
# Production build
npm run build
# Run tests
composer test
```
## Premium Plugin
The `premium/` directory contains a complete premium plugin template. During `./configure`, it's copied to a sibling directory as `{slug}-premium/`. The premium plugin:
1. Bundles the free plugin via symlinks
2. Boots after the free core via the `{hook}_loaded` action
3. Auto-discovers modules from `pro/modules/` via `manifest.json`
### Creating a Module
```
pro/modules/my-feature/
├── manifest.json
└── src/
└── MyFeatureModule.php
```
**manifest.json:**
```json
{
"slug": "my-feature",
"name": "My Feature",
"version": "1.0.0",
"namespace": "MyPlugin\\Pro\\Modules\\MyFeature",
"main_class": "MyPlugin\\Pro\\Modules\\MyFeature\\MyFeatureModule"
}
```
## License
MIT