# azure-samples/azure-ai-vision-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/azure-samples/azure-ai-vision-sdk
- Repository: https://github.com/azure-samples/azure-ai-vision-sdk

## Overview

##### Main System Components

a) Client Applications Layer
- Mobile Apps (Android/Kotlin, iOS/Swift)
- Web Apps (Next.js, Angular, Vue.js, JavaScript)
- Native Apps (C++, C#, Python, Java)

b) SDK Layer
- Azure AI Vision Core SDK
- Face Analysis SDK Components
- Image Analysis SDK Components

c) Azure Cloud Services Layer
- Azure AI Vision Services
- Authentication/Authorization Services

##### Component Relationships

**[Client Apps] → [SDK Layer] → [Azure Cloud Services]**
- ↑
- [Authentication Flow]

##### Detailed Component Breakdown

For each major component, include:

a) Face Analysis System:
- Liveness Detection Component
- Face Verification Component
- ISO/IEC 30107-3 PAD Compliance
- Spoof Detection Systems

b) SDK Implementation Components:
- Core Vision Components
- Language-specific Bindings
- Authentication Handlers
- API Interfaces

##### Key Integration Points

Highlight:
- SDK initialization points
- Authentication token flow
- API endpoints
- Data processing pipeline

##### Implementation Details

- Face Liveness Detection Pipeline
- Image Analysis Components
- Client-side Processing
- Server-side Processing

##### Security Layer

Show:
- Authentication flow
- Access token management
- Limited access features
- Security compliance

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef client fill:#3498db,stroke:#2980b9,color:white
    classDef sdk fill:#2ecc71,stroke:#27ae60,color:white
    classDef azure fill:#9b59b6,stroke:#8e44ad,color:white
    classDef auth fill:#e74c3c,stroke:#c0392b,color:white
    classDef component fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Client Applications Layer
    subgraph ClientApps
        MobileApps["Mobile Applications"]
        WebApps["Web Applications"]
        NativeApps["Native Applications"]

        subgraph Mobile
            Android["Android/Kotlin"]
            iOS["iOS/Swift"]
        end

        subgraph Web
            Next["Next.js"]
            Angular["Angular"]
            Vue["Vue.js"]
            JS["JavaScript"]
        end

        subgraph Native
            CPP["C++"]
            CSharp["C#"]
            Python["Python"]
            Java["Java"]
        end
    end

    %% SDK Layer
    subgraph SDKLayer
        CoreSDK["Azure AI Vision Core SDK"]
        FaceSDK["Face Analysis SDK"]
        ImageSDK["Image Analysis SDK"]

        subgraph FaceComponents
            LivenessDetection["Liveness Detection"]
            FaceVerification["Face Verification"]
            SpoofDetection["Spoof Detection"]
            PADCompliance["ISO/IEC 30107-3 PAD"]
        end

        subgraph ImageComponents
            ImageProcessing["Image Processing"]
            LanguageBindings["Language Bindings"]
            APIInterfaces["API Interfaces"]
        end
    end

    %% Azure Cloud Services Layer
    subgraph AzureServices
        VisionAPI["Azure AI Vision Services"]
        AuthServices["Authentication Services"]
    end

    %% Authentication Flow
    AuthFlow["Authentication Flow"]:::auth

    %% Relationships
    Mobile --> CoreSDK
    Web --> CoreSDK
    Native --> CoreSDK
    CoreSDK --> FaceSDK
    CoreSDK --> ImageSDK
    FaceSDK --> VisionAPI
    ImageSDK --> VisionAPI
    AuthFlow --> AuthServices
    AuthServices --> CoreSDK

    %% Click Events
    click Android "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/kotlin/face/FaceLivenessDetectorSample"
    click iOS "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/swift/face/FaceAnalyzerSample"
    click Next "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/web/nextjs"
    click Angular "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/web/angularjs"
    click Vue "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/web/vuejs"
    click CPP "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/cpp/image-analysis"
    click CSharp "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/csharp/image-analysis"
    click Python "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/python/image-analysis"
    click Java "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/samples/java/image-analysis"
    click FaceSDK "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/docs/face"
    click ImageSDK "https://github.com/Azure-Samples/azure-ai-vision-sdk/tree/main/docs/image-analysis"
    click AuthFlow "https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/main/scripts/get_face_access_token.ps1"

    %% Legend
    subgraph Legend
        Client["Client Applications"]:::client
        SDKComp["SDK Components"]:::sdk
        AzureComp["Azure Services"]:::azure
        AuthComp["Authentication"]:::auth
    end

    %% Style Applications
    class MobileApps,WebApps,NativeApps,Android,iOS,Next,Angular,Vue,JS,CPP,CSharp,Python,Java client
    class CoreSDK,FaceSDK,ImageSDK,LivenessDetection,FaceVerification,SpoofDetection,PADCompliance,ImageProcessing,LanguageBindings,APIInterfaces sdk
    class VisionAPI,AuthServices azure
```
