# microsoftlearning/mslearn-ai-services architecture

> Architecture diagram of the GitHub repository microsoftlearning/mslearn-ai-services, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoftlearning/mslearn-ai-services
- Repository: https://github.com/microsoftlearning/mslearn-ai-services

## Overview

##### Project Type and Purpose
- This repository (“mslearn-ai-services”) is not a traditional runtime system but a documentation & lab-exercise distribution for Azure AI Services.
- It contains two major concerns:
- Authoring assets (Markdown instructions, exercises, media)
- Code samples/lab files (C# and Python implementations that call Azure AI services)
- There is also a build pipeline (GitHub Actions via `_build.yml`), configuration (`_config.yml`), and a landing page (`index.md`), indicating a static-site documentation generator (e.g., Jekyll or MkDocs) with automated build & deploy.

##### File Structure
- Top-level directories:
- Instructions/Exercises – the step-by-step workshop guides (Markdown)
- Labfiles – per-module code examples (multiple languages)
- Configuration & CI:
- `_config.yml` – site generator settings
- `_build.yml` – CI pipeline for building & deploying the docs
- `index.md` – entry point for the generated site
- Code sample patterns:
- Module 01: “Use Azure AI Services” – REST vs SDK clients in C# & Python
- Module 02: “AI Services Security” – Key Vault integration
- Module 03: “Monitor AI Services” – monitoring scripts
- Module 04: “Use a Container” – containerized labs

##### README
- Title: mslearn-ai-services
- Description: “Lab files for Azure AI Services modules”
- No additional architectural details, but it confirms this is a learning-content repository.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Authoring Repository Components
    subgraph "Authoring Repo"
        direction TB
        Instructions["Content Authoring Layer<br/>(Markdown Instructions & Exercises)"]:::repo
        click Instructions "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Instructions/Exercises"
        Media["Media Assets"]:::repo
        click Media "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Instructions/media"
        Config["_config.yml"]:::config
        click Config "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/_config.yml"
        CI["_build.yml"]:::ci
        click CI "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/_build.yml"
        Index["Documentation Landing Page<br/>(index.md)"]:::doc
        click Index "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/index.md"
        Readme["Repository Readme<br/>(README.md)"]:::doc
        click Readme "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/README.md"
        Setup["Global Setup Guide<br/>(setup.md)"]:::doc
        click Setup "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/Instructions/setup.md"
        License["Licensing Information<br/>(LICENSE)"]:::doc
        subgraph "Labfiles"
            direction TB
            subgraph "Module 01 – Use Azure AI Services"
                direction TB
                M1REST["C# REST client"]:::code
                click M1REST "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/01-use-azure-ai-services/C-Sharp/rest-client"
                M1SDK["C# SDK client"]:::code
                click M1SDK "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/01-use-azure-ai-services/C-Sharp/sdk-client"
                Py1REST["Python REST client"]:::code
                click Py1REST "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/01-use-azure-ai-services/Python/rest-client"
                Py1SDK["Python SDK client"]:::code
                click Py1SDK "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/01-use-azure-ai-services/Python/sdk-client"
            end
            subgraph "Module 02 – AI Services Security"
                direction TB
                M2CS["C# Key Vault client"]:::code
                click M2CS "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/02-ai-services-security/C-Sharp/keyvault_client"
                M2Py["Python Key Vault client"]:::code
                click M2Py "https://github.com/microsoftlearning/mslearn-ai-services/tree/main/Labfiles/02-ai-services-security/Python/keyvault_client"
                M2Rest["REST test scripts"]:::code
                click M2Rest "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/Labfiles/02-ai-services-security/rest-test.cmd"
            end
            subgraph "Module 03 – Monitor AI Services"
                direction TB
                M3Rest["Monitoring scripts"]:::code
                click M3Rest "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/Labfiles/03-monitor-ai-services/rest-test.cmd"
            end
            subgraph "Module 04 – Use a Container"
                direction TB
                M4Rest["Containerized scripts"]:::code
                click M4Rest "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/Labfiles/04-use-a-container/rest-test.cmd"
            end
        end
    end

    %% CI/CD and Hosting
    CI -->|"triggers build"| Generator["Static-Site Generator"]:::service
    click Generator "https://github.com/microsoftlearning/mslearn-ai-services/blob/main/_config.yml"
    Generator -->|"generates site"| HostedSite["Hosted Docs Site"]:::external

    %% Learner Environment and Module Interactions
    Learner["Learner Local Environment"]:::actor

    Learner --> M1REST
    Learner --> M1SDK
    Learner --> Py1REST
    Learner --> Py1SDK

    M1REST -->|"calls"| AzureCognitive["Azure Cognitive Services"]:::cloud
    M1SDK -->|"calls"| AzureCognitive
    Py1REST -->|"calls"| AzureCognitive
    Py1SDK -->|"calls"| AzureCognitive

    Learner --> M2CS
    Learner --> M2Py
    Learner --> M2Rest

    M2CS -->|"retrieves secrets"| KeyVault["Azure Key Vault"]:::db
    M2Py -->|"retrieves secrets"| KeyVault
    KeyVault -->|"provides secrets"| AzureCognitive

    M2Rest -->|"tests"| AzureCognitive

    Learner --> M3Rest
    M3Rest -->|"sends telemetry"| AzureMonitor["Azure Monitor / App Insights"]:::db

    Learner --> M4Rest
    M4Rest -->|"runs in"| ACI["Azure Container Instances"]:::cloud
    ACI -->|"calls"| AzureCognitive

    %% Styles
    classDef repo fill:#f9f,stroke:#333,stroke-width:1px
    classDef config fill:#ccf,stroke:#333
    classDef ci fill:#fcf,stroke:#333
    classDef doc fill:#efe,stroke:#333
    classDef code fill:#ffe,stroke:#333
    classDef service fill:#cff,stroke:#333
    classDef external fill:#ddf,stroke:#333,stroke-dasharray: 5 5
    classDef actor fill:#fdd,stroke:#333
    classDef cloud fill:#cdf,stroke:#036
    classDef db fill:#fc9,stroke:#630
```
