Product Decisions This Supports
- Custom Admin UI Extensibility: Enables product teams to inject custom menu items into the Sylius admin dashboard (via
sylius.menu.admin.main event) without modifying core Monofony/Skeleton code. Critical for B2B SaaS platforms needing vendor-specific admin panels (e.g., custom reporting, workflow tools).
- Decoupled Feature Development: Allows PMs to build vs. buy—extend admin menus for niche features (e.g., "Bulk Discount Approval") without waiting for upstream Sylius/Monofony updates.
- Roadmap for Modularity: Supports a plugin architecture for admin UIs, reducing merge conflicts during major Sylius upgrades. Ideal for teams adopting Sylius as a headless CMS with custom frontends.
- Use Cases:
- Adding tenant-specific admin menus in multi-tenant e-commerce.
- Integrating third-party tools (e.g., ERP connectors) into the admin panel.
- A/B testing admin workflows by dynamically injecting menu items.
When to Consider This Package
-
Adopt if:
- Your team uses Monofony/Skeleton (Sylius-based) and needs to extend the admin menu without forks.
- You’re building a Sylius-based SaaS with custom admin requirements (e.g., SaaS metrics, user management overlays).
- You prioritize event-driven extensibility over template overrides (avoids CSS/JS conflicts).
- Your PHP stack is Symfony 6.x with PHP 8.0+.
-
Look elsewhere if:
- You need frontend menu modifications (this is backend-only).
- Your Sylius version is pre-1.11 (event may not exist).
- You require complex UI components (e.g., modals, submenus)—pair with a frontend bundle like
sylius-ui.
- The package’s lack of stars/community is a risk (validate with a small spike).
How to Pitch It (Stakeholders)
For Executives:
"This lightweight MIT-licensed package lets us safely extend the Sylius admin menu without bloating our codebase or waiting for upstream updates. For [X use case, e.g., ‘adding a ‘Customer Segmentation’ tool to our B2B admin panel’], it’s a 10-minute Composer install vs. weeks of custom dev. Risk is minimal—MIT license, active Sylius ecosystem."
For Engineering:
"The sylius.menu.admin.main event lets us hook into the admin menu via Symfony’s event system. No template overrides, no CSS hell—just clean, maintainable PHP. Works with Monofony/Skeleton out of the box. Tradeoff: Zero stars, but the Sylius event system is battle-tested. Recommend a 1-day spike to validate integration with our Sylius version."
For Developers:
*"Drop this in, subscribe to the event, and inject your menu item via a service. Example:
use Sylius\Component\Menu\Event\MenuBuilderEvent;
$event->getMenu()->addChild('custom_link', ['route' => 'your_route']);
No frontend work needed—just backend logic. Perfect for quick admin tweaks."*