@@ -6,41 +6,46 @@ Modulus is a modern, cross-platform, plugin-based application framework designed
66
77### Multi-Host Architecture
88- ** UI-Agnostic Core** : Business logic independent of any UI framework
9- - ** Pluggable Hosts** : Currently supports Blazor Hybrid (MAUI ) and Avalonia, extensible to other UI technologies
10- - ** Shared Core Logic** : Same Domain/Application code runs across all supported hosts
9+ - ** Pluggable Hosts** : Supports Avalonia (desktop ) and Blazor Hybrid (MAUI)
10+ - ** Shared Core Logic** : Same Domain/Application code runs across all hosts
1111
12- ### Plugin System
13- - Hot-reloadable and dynamically unloadable plugins (AssemblyLoadContext)
14- - Manifest-driven module discovery and loading
15- - Dependency injection for plugins (DI container isolation)
16- - System module protection (prevent accidental unloading)
12+ ### Extension System
13+ - ** VS Extension Compatible ** : Uses ` extension.vsixmanifest ` (XML) format
14+ - ** Hot-Reloadable ** : AssemblyLoadContext-based isolation for dynamic load/unload
15+ - ** Explicit Installation ** : Extensions installed via CLI or UI, not auto-discovered
16+ - ** Type-Safe Entry Points ** : ` ModulusPackage ` base class similar to VS VsPackage
1717
1818### Developer Experience
19- - Plugin development SDK with declarative attributes
19+ - Extension SDK with declarative attributes
2020- AI Agent plugin support (LLM integration)
21- - Plugin signature verification and version control
21+ - Signature verification and version control
2222- Cross-platform: Windows / macOS / Linux
2323
2424## 🏗️ Architecture
2525
2626```
2727src/
2828├── Modulus.Core/ # Runtime, module loader, DI
29- ├── Modulus.Sdk/ # SDK base classes , attributes
30- ├── Modulus.UI.Abstractions/ # UI contracts (IMenuRegistry, IThemeService )
29+ ├── Modulus.Sdk/ # SDK: ModulusPackage , attributes
30+ ├── Modulus.UI.Abstractions/ # UI contracts (IMenuRegistry, INavigationService )
3131├── Hosts/
32- │ ├── Modulus.Host.Blazor/ # Blazor Hybrid (MAUI + MudBlazor )
33- │ └── Modulus.Host.Avalonia/ # Avalonia desktop
32+ │ ├── Modulus.Host.Avalonia/ # Avalonia desktop (ID: Modulus.Host.Avalonia )
33+ │ └── Modulus.Host.Blazor/ # Blazor Hybrid (ID: Modulus.Host.Blazor)
3434└── Modules/
3535 ├── EchoPlugin/ # Example: Echo plugin
36- └── SimpleNotes/ # Example: Notes module
36+ ├── SimpleNotes/ # Example: Notes module
37+ └── ComponentsDemo/ # Example: UI components demo
3738```
3839
39- ## 📦 Use Cases
40- - Desktop data tools / UI automation tools
41- - Rapid development of developer utilities (Log Viewer, Code Generator)
42- - Task framework for AI plugin development
43- - Internal tool platforms (multi-team collaboration)
40+ ## 📦 Extension Structure
41+
42+ ```
43+ MyExtension/
44+ ├── extension.vsixmanifest # XML manifest (VS Extension format)
45+ ├── MyExtension.Core.dll # Core logic (host-agnostic)
46+ ├── MyExtension.UI.Avalonia.dll
47+ └── MyExtension.UI.Blazor.dll
48+ ```
4449
4550## 🚀 Getting Started
4651
@@ -59,25 +64,79 @@ dotnet run --project src/Hosts/Modulus.Host.Blazor
5964dotnet test
6065```
6166
62- ## 🔌 Creating a Module
67+ ## 🔌 Creating an Extension
68+
69+ ### 1. Create Projects
70+
71+ ```
72+ MyExtension/
73+ ├── MyExtension.Core/
74+ ├── MyExtension.UI.Avalonia/
75+ └── MyExtension.UI.Blazor/
76+ ```
77+
78+ ### 2. Define Entry Point
79+
80+ ``` csharp
81+ // MyExtension.Core/MyExtensionPackage.cs
82+ public class MyExtensionPackage : ModulusPackage
83+ {
84+ public override void ConfigureServices (IModuleLifecycleContext context )
85+ {
86+ context .Services .AddSingleton <IMyService , MyService >();
87+ }
88+ }
89+ ```
90+
91+ ### 3. Create Manifest
92+
93+ ``` xml
94+ <!-- extension.vsixmanifest -->
95+ <?xml version =" 1.0" encoding =" utf-8" ?>
96+ <PackageManifest Version =" 2.0.0"
97+ xmlns =" http://schemas.microsoft.com/developer/vsx-schema/2011" >
98+ <Metadata >
99+ <Identity Id =" your-guid" Version =" 1.0.0" Publisher =" You" />
100+ <DisplayName >My Extension</DisplayName >
101+ <Description >My awesome extension</Description >
102+ </Metadata >
103+ <Installation >
104+ <InstallationTarget Id =" Modulus.Host.Avalonia" Version =" [1.0,)" />
105+ <InstallationTarget Id =" Modulus.Host.Blazor" Version =" [1.0,)" />
106+ </Installation >
107+ <Assets >
108+ <Asset Type =" Modulus.Package" Path =" MyExtension.Core.dll" />
109+ <Asset Type =" Modulus.Package" Path =" MyExtension.UI.Avalonia.dll"
110+ TargetHost =" Modulus.Host.Avalonia" />
111+ <Asset Type =" Modulus.Menu" Id =" my-menu" DisplayName =" My Tool"
112+ Icon =" Home" Route =" MyExtension.ViewModels.MainViewModel"
113+ TargetHost =" Modulus.Host.Avalonia" />
114+ </Assets >
115+ </PackageManifest >
116+ ```
63117
64- 1 . Create three projects: ` MyModule.Core ` , ` MyModule.UI.Avalonia ` , ` MyModule.UI.Blazor `
65- 2 . Define your module class with ` [Module] ` attribute
66- 3 . Add UI-specific menu attributes (` [AvaloniaMenu] ` , ` [BlazorMenu] ` )
67- 4 . Create ` manifest.json ` with module metadata
118+ ### 4. Install Extension
68119
69- See [ Quickstart Guide] ( ./specs/001-core-architecture/quickstart.md ) for detailed instructions.
120+ ``` bash
121+ modulus install ./MyExtension
122+ ```
70123
71124## 📚 Documentation
72- - [ Core Architecture Spec ] ( ./specs/001-core-architecture/spec.md )
73- - [ Quickstart Guide ] ( ./specs/001-core-architecture/quickstart.md )
74- - [ Data Model ] ( ./specs/001-core-architecture/data-model .md )
75- - [ Runtime Contracts ] ( ./specs/001-core-architecture/contracts/runtime-contracts .md )
125+
126+ - [ OpenSpec Specifications ] ( ./openspec/ specs/ )
127+ - [ Project Context ] ( ./openspec/project .md )
128+ - [ Contributing Guide ] ( ./CONTRIBUTING .md )
76129
77130## Project Status
78- - Current Branch: ` 001-core-architecture `
79- - Phase: MVP Complete (User Stories 1-3)
80- - Test Coverage: 30 tests passing
131+
132+ - ** Phase** : Active Development
133+ - ** Test Coverage** : 30+ tests passing
134+ - ** Platforms** : Windows, macOS, Linux
81135
82136## Contributing
137+
83138Pull requests and issues are welcome! See [ CONTRIBUTING.md] ( ./CONTRIBUTING.md ) for guidelines.
139+
140+ ## License
141+
142+ [ MIT License] ( ./LICENSE )
0 commit comments