dev.tirsvad.dk
Tirsvad Website: A Clean Architecture .NET solution using Blazor WebAssembly for modern, cloud-ready web applications. Supports SQLite/MySQL, containerization, and follows best practices for maintainability and scalability.
Dotnet.WinUi3.UseCaseCanvas Directory Reference
Directory dependency graph for Dotnet.WinUi3.UseCaseCanvas:
src/WebUI/WebUI/wwwroot/projects/TirsvadGUI/Dotnet.WinUi3.UseCaseCanvas

Detailed Description

[![downloads][downloads-shield]][downloads-url] [![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]

Logo UseCaseCanvas

Create use case documentation as Mermaid files and Markdown files for projects.

Overview

UseCaseCanvas is a .NET library and tooling set that helps you define use cases (actors, scenarios, relationships) and generate:

It includes a WinUI demo application and a source-generator project to assist integration in applications and libraries.

Features

Quick Start

Prerequisites

MSI Installer

Pre-built MSI installer is available for easy installation. First you need to install the certificate used to sign the installer:

  1. Download the certificate file TirsvadGUI.cer from the releases page.
  1. ```powershell Import-Certificate -FilePath ".\TirsvadGUI.cer" -CertStoreLocation "Cert:\LocalMachine\Root"
    1. After installing the certificate, you can proceed to install the UseCaseCanvas tools.
    Download the latest MSI installer from the [releases page][downloads-url] and run it to install the UseCaseCanvas tools on your system.
    Note: The MSI installer is optional. You can also build and run the projects directly from source.
    ### Clone the repository
    bash git clone https://github.com/Tirsvad/TirsvadGUI.Dotnet.WinUi3.UseCaseCanvas.git cd TirsvadGUI.Dotnet.WinUi3.UseCaseCanvas
    Build the projects
    bash

Build all projects (Release recommended)

dotnet build src -c Release

Run the WinUI demo app (if you want to try the UI)

dotnet run –project "src/TirsvadGUI.UseCaseCanvas.WinUI/TirsvadGUI.UseCaseCanvas.WinUI.csproj" -c Debug

Notes
- The solution contains two main projects:
- `src/TirsvadGUI.WinUi3.UseCaseCanvas.Generators` — source generator and library code (targets .NET Standard2.0)
- `src/TirsvadGUI.UseCaseCanvas.WinUI` — WinUI demo application (targets .NET9)
- Packaging output and generated artifacts are placed under the repository `BaseOutputPath` during CI/local builds. See `Directory.Build.props` for defaults.
## Usage
The library is intended to be consumed from other .NET projects. Typical integration steps:
1. Add a project reference to the generator/library project or install the NuGet package (if published).
2. Create use case definitions in code or files in your project.
3. Call the library API to generate `.mmd` and `.md` files as part of your build or a custom tool.
Example (conceptual)

csharp // Pseudocode - consult the source for real API details var canvas = new UseCaseCanvas(); canvas.AddActor("User"); canvas.AddUseCase("Login", "User logs in to the system"); canvas.GenerateMermaid("docs/diagrams/login.mmd"); canvas.GenerateMarkdown("docs/usecases/login.md");

For concrete usage examples, check the `src` folder and the WinUI demo project.
## Folder Structure (example)

plaintext Dotnet.WinUi3.UseCaseCanvas/ ├── src/ │ ├── TirsvadGUI.WinUi3.UseCaseCanvas.Generators/ # Library + source generator │ └── TirsvadGUI.UseCaseCanvas.WinUI/ # WinUI demo app └── tests/ # Unit tests (if present) ```

Contributing

Contributions are welcome. Please follow the guidelines in CONTRIBUTING.md and open issues or pull requests.

See CONTRIBUTING.md

Reporting Bugs

  1. Go to the Issues page: GitHub Issues
  2. Click "New Issue" and provide steps to reproduce, expected behavior, actual behavior, environment, and attachments (logs/screenshots).

License

Distributed under the AGPL-3.0 License. See LICENSE.txt or license link.

Contact

Jens Tirsvad Nielsen - LinkedIn

Acknowledgments

Thanks to contributors and the open-source community.