magewire-architecture

Document Magewire repository layout, mechanisms, features, and extension points.

262|47|Updated Oct 8, 2021
One-click install
npx skills add https://github.com/magewirephp/magewire --skill magewire-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: magewire-architecture
Source: https://github.com/magewirephp/magewire/tree/main/.claude/skills/magewire-architecture
Command: npx skills add https://github.com/magewirephp/magewire --skill magewire-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Magewire architecture is complex; this guide provides a structured overview to help developers understand internal layout and extension points.

Core Features & Use Cases

  • Repository Layout overview: src/lib/dist/portman, Mechanisms vs Features, area-scoped DI (frontend/adminhtml), snapshot/state flow, layout containers, JS extension points, and Facades.
  • Use cases: extending Magewire with custom Features or Mechanisms, debugging the framework, or understanding how the codebase integrates with Magento across frontend and adminhtml contexts.
  • Practical guidance: follow the architecture to identify where to implement new resolvers, components, or DI registrations.

Quick Start

Start with the architecture overview to locate components, mechanisms, and features before extending Magewire

Frequently Asked Questions about magewire-architecture

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

FAQPage Schema
How do I add custom features to Magewire components in Magento?

To add custom features to Magewire, follow the repository layout to locate components and mechanisms, then use area-scoped DI to register your custom resolvers within the frontend or adminhtml contexts.

What is the difference between Magewire mechanisms and features?

Magewire mechanisms define the core framework processing flow, while features are specific functionalities built on top of those mechanisms; distinguishing them helps you identify where to implement new resolvers or components correctly.

How does the Magewire snapshot and state flow work?

The Magewire snapshot and state flow manages component data persistence across requests, allowing you to debug architecture by tracking how state transitions are captured and restored within the Magento layout containers.

Can I use Magewire with both Magento frontend and adminhtml areas?

Yes, Magewire supports area-scoped dependency injection for both Magento frontend and adminhtml areas, allowing you to build and extend components with distinct configurations tailored to each specific context.

Where are the JavaScript extension points in the Magewire framework?

Magewire provides JavaScript extension points within its frontend architecture that allow you to hook into the framework's client-side processing, enabling custom interactions and integrations alongside the PHP component logic.

What's the best way to debug Magewire architecture issues in Magento?

The best way to debug Magewire architecture is to trace the snapshot and state flow, inspect area-scoped DI registrations, and verify mechanism versus feature boundaries to isolate where processing failures occur.