# enisn/uraniumui architecture

> Architecture diagram of the GitHub repository enisn/uraniumui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enisn/uraniumui
- Repository: https://github.com/enisn/uraniumui

## Overview

##### Project type and purpose
- Uranium UI Kit is a multi‐package .NET MAUI UI library (open-source toolkit) plus a demo application, documentation site, test suites, templates and CI/CD pipelines.
- Its purpose is to provide reusable controls, layouts, theming and extension points for building cross-platform mobile and desktop apps.

##### File structure
- **src/** contains the core library (UraniumUI) plus feature packages:
- UraniumUI (Controls, Handlers, Converters, Layouts, Theming, Extensions, Infrastructure)
- UraniumUI.Material (Material-style controls, Handlers, Attachments, Resources)
- UraniumUI.Blurs (cross-platform blur effects, platform implementations)
- UraniumUI.Dialogs.CommunityToolkit & UraniumUI.Dialogs.Mopups (dialog services)
- UraniumUI.Validations.DataAnnotations (validation behaviors)
- UraniumUI.WebComponents (web-view-style code viewer component)
- **demo/UraniumApp** is a .NET MAUI multi-platform sample app that consumes the above libraries.
- **docs/** is a DocFX-based documentation site.
- **templates/** contains CLI project templates for new MAUI apps or pages based on UraniumUI.
- **test/** holds unit and integration test projects per library.
- Root scripts/configs (azure-pipelines.yml, build.ps1, pack.ps1, GitHub workflows) automate build, test, packaging and documentation publishing.

##### README
- Confirms it’s a .NET MAUI UI toolkit with multiple target frameworks.
- Highlights features (controls, theming, dialogs, validation, templates).
- Mentions docs site and CI pipelines.

a. **Main components**
- .NET MAUI runtime (cross-platform host)
- UraniumUI Core library module
- Feature-specific packages: Material, Blurs, Dialogs (CommunityToolkit & Mopups), Validations, WebComponents
- Demo application (UraniumApp)
- Templates (CLI/VS project templates)
- Documentation site (DocFX)
- Test suites
- CI/CD pipelines
b. **Relationships & interactions**
- Demo App → references all UraniumUI packages
- Each library package → depends on UraniumUI Core and implements platform-specific handlers under src/*/Platforms
- Templates → scaffold a new MAUI project referencing UraniumUI
- Docs → generated from markdown in docs/ via docfx.json
- CI pipelines → build libraries, run tests, pack NuGet packages, publish docs
c. **Architectural patterns & design principles**
- Modular multi-project solution (separate NuGet packages per feature)
- Handler/renderer pattern of MAUI: cross-platform abstractions in Controls → rendered via Handlers in platform folders
- Theming & extension points (CascadingStyling, dynamic resources)
- Template-based code generation for consistent project scaffolding
d. **Technologies & frameworks**
- .NET MAUI (.NET8/.NET9)
- C# multi-targeting (Android, iOS, MacCatalyst, Windows, Tizen)
- DocFX for docs site
- PowerShell/Bash scripts & Azure Pipelines/GitHub Actions for CI/CD
- xUnit/NUnit (or MSTest) for tests

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Runtime
    subgraph ".NET MAUI Runtime"
        RM[".NET MAUI Runtime"]:::runtime
    end

    %% Core Library
    subgraph "UraniumUI Core Library"
        UC["UraniumUI Core"]:::core
    end
    click UC "https://github.com/enisn/uraniumui/tree/develop/src/UraniumUI"

    %% Feature Packages
    subgraph "Feature Packages"
        subgraph "Material Package"
            UM["UraniumUI.Material"]:::material
            subgraph "Platforms"
                UM_Android["Android"]
                UM_iOS["iOS"]
                UM_Mac["MacCatalyst"]
                UM_Win["Windows"]
                UM_Tizen["Tizen"]
            end
        end
        click UM "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.Material"

        subgraph "Blurs Package"
            UB["UraniumUI.Blurs"]:::blurs
            subgraph "Platforms"
                UB_Android["Android"]
                UB_iOS["iOS"]
                UB_Mac["MacCatalyst"]
                UB_Win["Windows"]
                UB_Tizen["Tizen"]
            end
        end
        click UB "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.Blurs"

        subgraph "Dialogs CommunityToolkit"
            UDC["UraniumUI.Dialogs.CommunityToolkit"]:::dialogs
            subgraph "Platforms"
                UDC_Android["Android"]
                UDC_iOS["iOS"]
                UDC_Mac["MacCatalyst"]
                UDC_Win["Windows"]
                UDC_Tizen["Tizen"]
            end
        end
        click UDC "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.Dialogs.CommunityToolkit"

        subgraph "Dialogs Mopups"
            UDM["UraniumUI.Dialogs.Mopups"]:::dialogs
            subgraph "Platforms"
                UDM_Android["Android"]
                UDM_iOS["iOS"]
                UDM_Mac["MacCatalyst"]
                UDM_Win["Windows"]
                UDM_Tizen["Tizen"]
            end
        end
        click UDM "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.Dialogs.Mopups"

        subgraph "Validations DataAnnotations"
            UV["UraniumUI.Validations.DataAnnotations"]:::validations
            subgraph "Platforms"
                UV_Android["Android"]
                UV_iOS["iOS"]
                UV_Mac["MacCatalyst"]
                UV_Win["Windows"]
                UV_Tizen["Tizen"]
            end
        end
        click UV "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.Validations.DataAnnotations"

        subgraph "WebComponents Package"
            UW["UraniumUI.WebComponents"]:::web
            subgraph "Platforms"
                UW_Android["Android"]
                UW_iOS["iOS"]
                UW_Mac["MacCatalyst"]
                UW_Win["Windows"]
                UW_Tizen["Tizen"]
            end
        end
        click UW "https://github.com/enisn/uraniumui/blob/develop/src/UraniumUI.WebComponents"
    end

    %% Demo App
    DA["Demo App (UraniumApp)"]:::demo
    click DA "https://github.com/enisn/uraniumui/tree/develop/demo/UraniumApp"

    %% Templates
    TPL["CLI / VS Project Templates"]:::templates
    click TPL "https://github.com/enisn/uraniumui/tree/develop/templates/"

    %% Documentation
    MD["docs/*.md"]:::docs
    DocFX["DocFX Engine"]:::docs
    DS["Published Site"]:::external
    click DocFX "https://github.com/enisn/uraniumui/blob/develop/docs/docfx.json"
    click DS "https://github.com/enisn/uraniumui/tree/develop/docs/"

    %% Test Suites
    subgraph "Test Suites"
        TC["Core Tests"]:::test
        click TC "https://github.com/enisn/uraniumui/blob/develop/test/UraniumUI.Tests.Core"
        TM["Material Tests"]:::test
        click TM "https://github.com/enisn/uraniumui/blob/develop/test/UraniumUI.Material.Tests"
        TG["General Tests"]:::test
        click TG "https://github.com/enisn/uraniumui/blob/develop/test/UraniumUI.Tests"
    end

    %% CI/CD Pipelines
    subgraph "CI/CD Pipelines"
        CI["Azure DevOps Pipeline"]:::cicd
        click CI "https://github.com/enisn/uraniumui/blob/develop/azure-pipelines.yml"
        GH["GitHub Actions"]:::cicd
        click GH "https://github.com/enisn/uraniumui/blob/develop/.github/workflows/static-docs.yml"
        PS["Build & Packaging Scripts"]:::cicd
        click PS "https://github.com/enisn/uraniumui/blob/develop/build.ps1"
        click PS "https://github.com/enisn/uraniumui/blob/develop/pack.ps1"
        subgraph "Workflow"
            B["Build"]:::cicd
            T["Test"]:::cicd
            Pk["Pack"]:::cicd
            Pub["Publish (NuGet & Docs)"]:::cicd
        end
    end

    %% Dependencies
    DA -->|NuGet reference| UC
    DA -->|NuGet reference| UM
    DA -->|NuGet reference| UB
    DA -->|NuGet reference| UDC
    DA -->|NuGet reference| UDM
    DA -->|NuGet reference| UV
    DA -->|NuGet reference| UW

    UC -->|Handler implementations| RM
    UM -->|Handler implementations| RM
    UB -->|Handler implementations| RM
    UDC -->|Handler implementations| RM
    UDM -->|Handler implementations| RM
    UV -->|Handler implementations| RM
    UW -->|Handler implementations| RM

    TPL -->|scaffolding| DA

    MD -->|"input"| DocFX
    DocFX -->|"generate site"| DS

    CI -->|orchestrates| B
    GH -->|orchestrates| B
    B -->|compiles code| T
    T -->|runs tests| Pk
    Pk -->|creates packages| Pub
    Pub -->|publish NuGet| external
    Pub -->|publish docs| DS

    %%% Connections to tests
    UC -->|tested by| TC
    UM -->|tested by| TM
    UC -->|tested by| TG
    UM -->|tested by| TG
    UB -->|tested by| TG
    UDC -->|tested by| TG
    UDM -->|tested by| TG
    UV -->|tested by| TG
    UW -->|tested by| TG

    %% Styles
    classDef runtime fill:#f9f9f9,stroke:#333,stroke-width:1px
    classDef core fill:#D0E1FF,stroke:#0033CC,stroke-width:2px
    classDef material fill:#DFF2D8,stroke:#2E8B57,stroke-width:2px
    classDef blurs fill:#E6D0FF,stroke:#800080,stroke-width:2px
    classDef dialogs fill:#FFE4C4,stroke:#FF8C00,stroke-width:2px
    classDef validations fill:#D0FFF0,stroke:#008B8B,stroke-width:2px
    classDef web fill:#FFD0D0,stroke:#CC0000,stroke-width:2px
    classDef demo fill:#F0F0F0,stroke:#666,stroke-width:2px
    classDef templates fill:#FFF8DC,stroke:#DAA520,stroke-width:2px
    classDef docs fill:#E0FFFF,stroke:#20B2AA,stroke-width:2px
    classDef external fill:#FFFFFF,stroke:#000,stroke-dasharray: 5 5
    classDef test fill:#F5F5F5,stroke:#666,stroke-width:1px,stroke-dasharray: 2 2
    classDef cicd fill:#F0FFF0,stroke:#228B22,stroke-width:2px
```
