# aws-samples/amazon-chime-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/aws-samples/amazon-chime-sdk
- Repository: https://github.com/aws-samples/amazon-chime-sdk

## Overview

##### Project type and purpose
- This is a monorepo of Amazon Chime SDK Samples. It isn’t one single application but a collection of end-to-end demo apps—web, iOS, Android, serverless, analytics, real-time collaboration, telehealth, etc.—showing how to integrate Chime audio/video/chat services into different stacks.

##### File structure
- Top-level folders:
- amazon-chime-sdk-component-library-react – shared UI components
- analytics – a React dashboard reading Chime meeting events
- apps – a suite of front-end + back-end sample apps (chat web, chat-iOS, chat-Android, meeting, moderated-chat, real-time-collab, telehealth-widget, televisit-demo, etc.)
- lambda – standalone parsing Lambdas
- utils – utility Lambda patterns
- Each sample under apps typically has:
– a “frontend” or “app” folder (React/HTML/Swift/Kotlin)
– a “backend” or “serverless” folder (SAM/CDK/Node.js Lambdas, API definitions)
– configuration files (template.yaml, tsconfig.json, build scripts)

##### README for additional insights
- Confirms this is a catalog of demos demonstrating Chime SDK messaging, meetings, screen-share, moderation, PSTN, and analytics.

##### Detail is key
- Begin at a high level showing “All sample apps” connecting to AWS
- Drill into one representative flow (e.g., chat-web) with all its components
- Optionally inset small callouts for mobile and analytics samples
- Essential AWS services, code modules, and client-SDK interactions so an engineer can grasp the end-to-end flow at a glance.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Clients & Sample Apps"
        SharedUI["Shared UI Components"]:::client
        AnalyticsDash["Analytics Dashboard"]:::client
        AmplifyDemo["Amplify Full-Stack Demo"]:::client
        ChatWeb["Chat Web SPA"]:::client
        ChatAndroid["Chat Android Native Sample"]:::client
        ChatAndroidWSMod["Chat-Android Messaging WS Module"]:::client
        ChatiOS["Chat iOS Native Sample"]:::client
        AndroidWebView["Android WKWebView Sample"]:::client
        iOSWebView["iOS WKWebView Sample"]:::client
        MeetingDemo["Meetings Web Demo"]:::client
        ModeratedChat["Moderated Chat & Sentiment Analysis Demo"]:::client
        RealTimeCollab["Real-Time Collaboration"]:::client
        TelehealthWidget["Telehealth Widget"]:::client
        TelevisitDemo["Televisit Demo"]:::client
    end

    subgraph "Serverless Layer"
        APIGW["API Gateway"]:::serverless
        Lambdas["Business Logic Lambdas"]:::serverless
        CallInsights["Call Insights Parsing Lambdas"]:::serverless
        PSTNUtil["PSTN Audio Lambda Utility"]:::serverless
        SingleJSUtil["Single JS Lambda Utility"]:::serverless
    end

    subgraph "AWS Managed Services"
        CDN["S3/CloudFront CDN"]:::aws
        Cognito["Cognito Auth"]:::aws
        ChimeControl["Chime Control Plane"]:::aws
        WebSocket["Chime Messaging WS"]:::aws
        EventBridge["EventBridge/Kinesis"]:::aws
        DynamoDB["DynamoDB"]:::aws
        S3Data["S3 Data Store"]:::aws
    end

    subgraph "Infrastructure IaC"
        CodeInfra["SAM/CDK Templates"]:::infra
    end

    %% Data Flows
    SharedUI --> CDN
    AnalyticsDash --> CDN
    AmplifyDemo --> CDN
    ChatWeb --> CDN
    ChatAndroid --> CDN
    ChatAndroidWSMod --> CDN
    ChatiOS --> CDN
    AndroidWebView --> CDN
    iOSWebView --> CDN
    MeetingDemo --> CDN
    ModeratedChat --> CDN
    RealTimeCollab --> CDN
    TelehealthWidget --> CDN
    TelevisitDemo --> CDN

    ChatWeb --> Cognito
    ChatAndroid --> Cognito
    ChatiOS --> Cognito

    AmplifyDemo --> APIGW
    ChatWeb --> APIGW
    MeetingDemo --> APIGW
    ModeratedChat --> APIGW
    TelehealthWidget --> APIGW
    TelevisitDemo --> APIGW

    APIGW --> Lambdas
    Lambdas --> ChimeControl
    Lambdas --> DynamoDB
    Lambdas --> S3Data
    Lambdas --> PSTNUtil
    Lambdas --> SingleJSUtil

    CallInsights --> DynamoDB
    CallInsights --> S3Data

    ChimeControl --> WebSocket
    WebSocket --> ChatWeb
    WebSocket --> ChatAndroid
    WebSocket --> ChatAndroidWSMod
    WebSocket --> ChatiOS

    ChimeControl --> EventBridge
    EventBridge --> AnalyticsDash
    EventBridge --> Lambdas

    CodeInfra --> APIGW
    CodeInfra --> Lambdas
    CodeInfra --> ChimeControl

    %% Click Events
    click SharedUI "https://github.com/aws-samples/amazon-chime-sdk/tree/main/amazon-chime-sdk-component-library-react"
    click AnalyticsDash "https://github.com/aws-samples/amazon-chime-sdk/tree/main/analytics/meeting-event-dashboard"
    click AmplifyDemo "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/amplify-demo"
    click ChatWeb "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/chat"
    click ChatAndroid "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/chat-android"
    click ChatAndroidWSMod "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/chat-android/messaging-websocket"
    click ChatiOS "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/chat-ios"
    click AndroidWebView "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/android-webview-sample"
    click iOSWebView "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/iOS-WKWebView-sample"
    click MeetingDemo "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/meeting"
    click ModeratedChat "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/moderated-chat-and-sentiment-analysis"
    click RealTimeCollab "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/real-time-collaboration"
    click TelehealthWidget "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/telehealth-widget"
    click TelevisitDemo "https://github.com/aws-samples/amazon-chime-sdk/tree/main/apps/televisit-demo"
    click CallInsights "https://github.com/aws-samples/amazon-chime-sdk/tree/main/lambda/call-insights-parsing"
    click PSTNUtil "https://github.com/aws-samples/amazon-chime-sdk/tree/main/utils/pstn-audio-lambdas/amazon-chime-pstn-audio-lambda-node"
    click SingleJSUtil "https://github.com/aws-samples/amazon-chime-sdk/tree/main/utils/singlejs"

    %% Styles
    classDef client fill:#BBDEFB,stroke:#000,stroke-width:1px
    classDef serverless fill:#FFE0B2,stroke:#000,stroke-width:1px
    classDef aws fill:#C8E6C9,stroke:#000,stroke-width:1px
    classDef infra fill:#E0E0E0,stroke:#000,stroke-width:1px
```
