Thank you for your interest in contributing to Modulus! This guide will help you get started with contributing to the project.
Modulus is a modular .NET application framework with a multi-host architecture:
- UI-Agnostic Core: Domain and Application code must not depend on any UI framework
- Multi-Host Support: Same business logic runs across all supported hosts (Blazor, Avalonia, and future hosts)
- Vertical Slice Modules: Each feature is a self-contained module with its own layers
- Dependency Pyramid: Presentation → UI Abstraction → Application → Domain → Infrastructure
src/
├── Modulus.Core/ # Runtime, ModuleLoader, DI, MediatR
├── Modulus.Sdk/ # SDK base classes (ModuleBase, attributes)
├── Modulus.UI.Abstractions/ # UI contracts (IMenuRegistry, IThemeService)
├── Hosts/
│ ├── Modulus.Host.Blazor/ # MAUI + MudBlazor
│ └── Modulus.Host.Avalonia/ # Avalonia UI
└── Modules/
└── <ModuleName>/
├── <ModuleName>.Core/ # Domain + Application (UI-agnostic)
├── <ModuleName>.UI.Avalonia/ # Avalonia views
└── <ModuleName>.UI.Blazor/ # Blazor components
When creating a new module:
- Core Project: Contains ViewModels and business logic, references only
Modulus.SdkandModulus.UI.Abstractions - UI Projects: Host-specific views, reference Core project and UI framework
- Manifest:
manifest.jsondescribes module metadata and assembly mappings - Attributes: Use
[Module],[AvaloniaMenu],[BlazorMenu]for declarative registration
See Quickstart Guide for detailed instructions.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/modulus.git - Create a new branch:
git checkout -b feature/your-feature-name - Make your changes
- Run tests:
dotnet test - Commit your changes:
git commit -m "Add feature" - Push to your fork:
git push origin feature/your-feature-name - Create a pull request
- All user-facing documentation should be in both English and Chinese
- All story documents must have bilingual versions (in
docs/en-US/stories/anddocs/zh-CN/stories/) - Follow the story naming convention:
S-XXXX-Title.md - Include priority and status tags in story documents
- Use PascalCase for class names and public members
- Use camelCase for local variables and parameters
- Prefix private fields with underscore (
_privateField) - Include XML documentation for public APIs
- Write unit tests for all new functionality
# Run Avalonia Host
dotnet run --project src/Hosts/Modulus.Host.Avalonia
# Run Blazor Host
dotnet run --project src/Hosts/Modulus.Host.Blazor
# Run all tests
dotnet test- Use the Nuke build system:
nuke --helpfor available targets - Build all components:
nuke build - Run tests:
nuke test - Pack plugins:
nuke plugin
- Ensure your code follows the project's style guidelines
- Update documentation as needed
- Include tests for new functionality
- Make sure all tests pass before submitting
- Link any related issues in your PR description
- Wait for review from project maintainers
If you have any questions, feel free to open an issue or join our community channels.