This is a repo template for creating BASE Modules.
Key aspects to notice:
- Module and relevant file names contain a
KWMODULENAMEtoken for quick renaming using the providedpost-build.ps1script. - Module is composed of multiple Assemblies, following DDD patterns, approximately as follows:
*.Interface.UI.Webinvokes APIs found in*.Interface.API.GraphQL, composed of thin Controllers wrapping*.Interface.API.REST, composed of thin Controllers wrapping*.Interface.API.ODATA, composed of thin Controllers wrapping*.Interface.Modelsand*.Applicationservices that orchestrate calls between*.Domain*.Infrastructureand*.Infrastructure.Data.EFand*.Substratereferring to base contracts, etc.
Every generated module repository should keep these files:
.github/dependabot.yml— checks NuGet dependencies from/SOURCEand GitHub Actions from/..github/workflows/dependabot-auto-merge.yml— requests squash auto-merge for Dependabot major, minor, and patch updates..github/workflows/dependency-policy.yml— reports outdated packages and fails when a package has major-version drift.
The auto-merge workflow does not bypass validation. It only requests auto-merge for pull requests created by dependabot[bot]. GitHub merges the pull request only after required repository checks and branch-protection rules pass.
If a module stores Directory.Packages.props at its repository root rather than under /SOURCE, change the NuGet entry's directory value to /.
When creating a module from this template:
- Replace the
KWMODULENAMEtokens. - Keep the Dependabot files in
.github. - Confirm the NuGet directory matches the location of
Directory.Packages.props. - Enable Allow auto-merge in the repository's GitHub settings.
- Require the module's build and test checks in branch protection.
- Commit and push the new module repository before adding or updating its parent submodule pointer.