Skip to main content

Managed Components Overview

Castlecraft Architect is built around the concept of "managed components." These are the various architectural building blocks (like DTOs, Commands, Aggregates, Repositories, etc.) that the tool helps you define, generate, and manage throughout your project's lifecycle.

Core Components

Architect comes with a rich set of pre-defined core component types. Each core component has:

  • Standardized metadata defining its characteristics (e.g., naming conventions, required context).
  • A default handler that dictates how code for this component is generated.
  • Default rules for where its files are located within the project structure.

You can find a full list of these core components in the Component Reference.

Extending and Customizing with Plugins

While the core components provide a solid foundation, Architect's functionality can be significantly extended and customized through Component Plugins.

Plugins allow you to:

  • Introduce New Component Types: If your project requires a specialized architectural element not covered by the core set, you can define it via a plugin.
  • Override Core Components: You can change the behavior of existing core components. For example, you might want to alter the template used for generating DTOs, or change where repository interfaces are placed.
  • Customize File Path Resolution: Plugins can provide custom logic to determine the file paths for any component type, overriding the default structure if needed.

This plugin system makes Architect highly adaptable to various project needs and architectural styles.

To learn how to create your own component plugins, please refer to the Creating Component Plugins guide.

How Components are Located and Handled

When Architect needs to work with a component (e.g., generate its code, find its file), it consults:

  1. Plugin-Registered Definitions: It first checks if a plugin has registered or overridden the component type or its path resolution.
  2. Core Definitions: If no plugin has intervened, it falls back to the core definitions for that component type.

This layered approach ensures that plugins can seamlessly integrate with and modify the core system's behavior.