How windos/burnttoast works
Project type & purpose
• BurntToast is an open-source PowerShell module/library for constructing and displaying Windows 10/Server 2019 toast notifications from scripts.
• It exposes a set of public cmdlets (New-BurntToastNotification, New-BTAction, etc.) and uses private helper functions under the hood.
• It bundles .NET‐based UWP notification toolkits and provides installation via PowerShell Gallery or MSI.
File structure
• Core module in BurntToast/
• Public/ → user-facing cmdlet functions
• Private/ → internal helper scripts
• lib/ → third-party dependencies (Microsoft.Toolkit.Uwp.Notifications, Microsoft.Windows.SDK.NET)
• config.json → module configuration
• Examples/ → sample scripts exercising the module’s API
• Tests/ → Pester tests validating each cmdlet
• Installer/ → WiX project and MSI for manual installation
• CI/CD configs in .github/workflows/ and Azure-Pipelines/
• Tasks/ → build and packaging PowerShell scripts
Pull in README insights
• Module requires PowerShell v5+
• Uses Microsoft.Toolkit.Uwp.Notifications under the covers
• Publishes to PowerShell Gallery & GitHub Releases
• Provides examples and help text under Help/
Main components & their interactions
a. User scripts (Examples folder or any 3rd-party script)
↳ call →
b. BurntToast Module (loaded into PowerShell host)
– Public cmdlets (Public/*.ps1)
– Private helpers (Private/*.ps1)
– Config & assets (Images, en-US help, config.json)
↳ invoke →
c. Notification Engine
– Microsoft.Toolkit.Uwp.Notifications (NuGet under lib/)
– Microsoft.Windows.SDK.NET (for direct WinRT APIs)
↳ delegate to →
d. Windows OS Notification Platform
– Native COM/WinRT toast interfaces
e. CI/CD & Packaging
– GitHub Actions & Azure Pipelines
• Lint, Test (Tests/ with Pester), Package Module
• Run Tasks/build.ps1, Installer/src/BurntToast.wxs → .msi
• Publish to PowerShell Gallery & GitHub Releases
Architectural patterns & principles
• Modularity: clear separation of Public vs. Private code
• Dependency encapsulation: bundles external UWP libraries in lib/
• Test-driven: 70+ Pester tests ensure cmdlet correctness
• CI/CD: automated build, test, packaging, publish pipelines
Detail
• That every Public cmdlet file maps to a Pester test script in Tests/
• config.json feeding default behaviors
• How end users or scripts call into BurntToast’s Public cmdlets
• How internal helpers and external UWP libraries collaborate to deliver a toast to Windows
• How examples and tests validate functionality
• How CI/CD builds, packages, and publishes the module and MSI installer
This level of granularity ensures you capture all essential architectural elements without over-simplifying.