# microsoft/ai architecture

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

- Interactive diagram: https://gitdiagram.com/microsoft/ai
- Repository: https://github.com/microsoft/ai

## Overview

##### Project type and purpose
- This is not a single application but a “meta-repository” that organizes Microsoft’s open-source AI content:
- AI100 (samples)
- AI200 (reference architectures)
- AI300 (best practices)
- It also contains CI/CD pipelines (.ci folder), Azure ARM templates (AzureDeployment folder), documentation (.docs/.images), and supporting utilities.

##### File structure
- Top-level components:
- .ci – Azure DevOps pipeline definitions, scripts, variables, stages & steps
- .github – issue templates and GitHub metadata
- .docs & .images – markdown guides and assets
- AzureDeployment – ARM templates for CosmosDB, ML services, Synapse, Identity
- ai100-samples, ai200-architectures, ai300-practices – submodules of sample/reference/practice repos
- submodules – a mirror of the above for Git submodule management
- utilities – shared scripts or code used by samples & pipelines
- Heavy use of Azure DevOps YAML for CI, and ARM for IaC.

##### README for additional insights
- Purpose: central hub of AI samples (AI100), reference architectures (AI200), best practices (AI300)
- Workflow: users clone with submodules, pick scenarios/samples, follow docs for deployment/training/scoring.

##### Elements
- Clear labels: “GitHub Repo,” “CI/CD Engine,” “ARM Templates,” “Submodule: AI100 Samples,” etc.
- From GitHub to CI/CD trigger
- From CI/CD to Azure (resource provisioning)
- From CI/CD to PyPI/Docs site
- Rectangles for code components (submodules, utilities)
- Hexagons for cloud services (AML, CosmosDB, Synapse)

## Diagram (Mermaid)

```mermaid
flowchart TD
    RootRepo["GitHub Repo Root"]:::repo
    subgraph "Repository Components"
        CICDEngine["CI/CD Engine"]:::cicd
        IaC["Infrastructure as Code (ARM Templates)"]:::iac
        DocsContent["Documentation Content"]:::docs
        DocsAssets["Documentation Assets"]:::docs
        GitHubMeta["GitHub Metadata & Issue Templates"]:::meta
        AI100["Submodule: AI100 Samples"]:::sub
        AI200["Submodule: AI200 Ref Architectures"]:::sub
        AI300["Submodule: AI300 Best Practices"]:::sub
        SubmoduleMgmt["Submodule Management Mirror"]:::sub
        Utilities["Shared Utilities"]:::util
    end

    subgraph ".ci"
        CIPythonTraining["python-ml-training.yml"]:::cicd
        CIRealtimeServing["realtimeserving-release.yml"]:::cicd
        CIScripts["scripts/"]:::cicd
        CIStages["stage(s)/"]:::cicd
        CISteps["steps/ & aml/"]:::cicd
        CIVariables["vars/"]:::cicd
    end

    subgraph "Azure Cloud"
        AML["Azure ML"]:::cloud
        Cosmos["CosmosDB"]:::cloud
        Synapse["Synapse (Spark)"]:::cloud
        Identity["Identity"]:::cloud
        Packages["Published Packages (PyPI)"]:::storage
        DocsSite["Published Documentation"]:::storage
    end

    RootRepo --> CICDEngine
    RootRepo --> IaC
    RootRepo --> DocsContent
    RootRepo --> DocsAssets
    RootRepo --> GitHubMeta
    RootRepo --> AI100
    RootRepo --> AI200
    RootRepo --> AI300
    RootRepo --> SubmoduleMgmt
    RootRepo --> Utilities

    CICDEngine --> CIPythonTraining
    CICDEngine --> CIRealtimeServing
    CICDEngine --> CIScripts
    CICDEngine --> CIStages
    CICDEngine --> CISteps
    CICDEngine --> CIVariables

    IaC --> AzureMLTemplates
    IaC --> CosmosDBTemplates
    IaC --> SynapseTemplates
    IaC --> IdentityTemplates

    AzureMLTemplates["Azure ML Templates"]:::iac --> AML
    CosmosDBTemplates["CosmosDB Templates"]:::iac --> Cosmos
    SynapseTemplates["Synapse (Spark) Templates"]:::iac --> Synapse
    IdentityTemplates["Identity Templates"]:::iac --> Identity

    CIPythonTraining -->|deploy IaC| IaC
    CIRealtimeServing -->|deploy IaC| IaC
    CICDEngine -->|publish| Packages
    CICDEngine -->|generate docs| DocsSite

    click RootRepo "https://github.com/microsoft/ai/tree/master//"
    click CICDEngine "https://github.com/microsoft/ai/tree/master//.ci/"
    click CIPythonTraining "https://github.com/microsoft/ai/blob/master//.ci/python-ml-training.yml"
    click CIRealtimeServing "https://github.com/microsoft/ai/blob/master//.ci/realtimeserving-release.yml"
    click CIScripts "https://github.com/microsoft/ai/tree/master//.ci/scripts/"
    click CIStages "https://github.com/microsoft/ai/tree/master//.ci/stage/"
    click CISteps "https://github.com/microsoft/ai/tree/master//.ci/steps/"
    click CIVariables "https://github.com/microsoft/ai/tree/master//.ci/vars/"
    click IaC "https://github.com/microsoft/ai/tree/master//AzureDeployment/"
    click AzureMLTemplates "https://github.com/microsoft/ai/blob/master//AzureDeployment/AzureML/azureML.json"
    click CosmosDBTemplates "https://github.com/microsoft/ai/blob/master//AzureDeployment/CosmosDB/cosmosdb.json"
    click SynapseTemplates "https://github.com/microsoft/ai/blob/master//AzureDeployment/DeploySpark/Synapse/azuredeploy.json"
    click IdentityTemplates "https://github.com/microsoft/ai/blob/master//AzureDeployment/Identity/Identity.json"
    click DocsContent "https://github.com/microsoft/ai/tree/master//.docs/"
    click DocsAssets "https://github.com/microsoft/ai/tree/master//.images/"
    click GitHubMeta "https://github.com/microsoft/ai/tree/master//.github/ISSUE_TEMPLATE/"
    click AI100 "https://github.com/microsoft/ai/tree/master//ai100-samples/"
    click AI200 "https://github.com/microsoft/ai/tree/master//ai200-architectures/"
    click AI300 "https://github.com/microsoft/ai/tree/master//ai300-practices/"
    click SubmoduleMgmt "https://github.com/microsoft/ai/tree/master//submodules/"
    click Utilities "https://github.com/microsoft/ai/tree/master//utilities/"

    classDef repo fill:#D6EAF8,stroke:#1B4F72
    classDef cicd fill:#D5F5E3,stroke:#145A32
    classDef iac fill:#FAD7A0,stroke:#B9770E
    classDef docs fill:#FCF3CF,stroke:#7D6608
    classDef meta fill:#F2D7D5,stroke:#943126
    classDef sub fill:#F5EEF8,stroke:#6C3483
    classDef util fill:#E8E8E8,stroke:#424949
    classDef cloud fill:#AED6F1,stroke:#1A5276
    classDef storage fill:#A9DFBF,stroke:#1D8348
```
