Extending Architect
Castlecraft Architect is designed to be extensible, allowing you to tailor its functionality to your specific needs and integrate it with various tools and patterns. The primary mechanism for extending Architect is through its plugin system.
Plugin-Based Extensibility
Architect's plugin system enables you to add new capabilities or modify existing ones without altering the core codebase. This is achieved by creating separate Python packages that Architect can discover and load at runtime.
Currently, Architect supports the following types of plugins:
-
Component Plugins: These plugins allow you to define entirely new architectural component types (e.g., custom widgets, specific service types) or override the behavior of existing core components. You can customize their metadata, code generation logic, and how their files are placed within your project. This means a plugin could, in theory, adapt Architect to generate code in a different language (e.g., Java, Go) and organize it into a project structure suitable for that language. See: Creating Component Plugins and the Component Plugin API Reference.
-
Authorization Adapter Plugins: These plugins enable integration with different authorization engines (e.g., OPA, custom solutions). By implementing an adapter, you allow Architect's CLI to generate model definitions and bootstrap policies for your chosen engine. See: Creating Authorization Adapter Plugins and the Authorization Adapter API Reference.
As Architect evolves, more extension points and plugin types may be introduced. This plugin-based approach ensures that the core tool remains lean while providing a powerful way for users and the community to contribute and customize.