# amzn/alexa-skills-kit-js architecture

> Architecture diagram of the GitHub repository amzn/alexa-skills-kit-js, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amzn/alexa-skills-kit-js
- Repository: https://github.com/amzn/alexa-skills-kit-js

## Overview

##### Key Components

a. Main Components:
- Alexa Skills Kit SDK (New)
- Skill Implementation Layer
- AWS Lambda Function
- Alexa Service
- End User's Alexa Device

b. Sample Skills Architecture:
- Fact Skill Pattern
- Trivia Skill Pattern
- How-to Skill Pattern
- Hello World Pattern

**[User's Alexa Device] ←→ [Alexa Cloud Service]**

**[Alexa Skills Kit] ←→ [AWS Lambda Function]**

**[Skill Implementation]**
- ↓
**[Node.js SDK Components]**

##### Important Elements to Highlight

- Blue: User-facing components (Alexa devices)
- Green: AWS services (Lambda, Alexa Service)
- Orange: Development components (SDK, Skill Implementation)
- Gray: External services or APIs

b. Connection Types:

##### Specific Sections

- Flow from user voice command to skill response
- Role of the Alexa Skills Kit SDK
- Lambda function integration
- Skill implementation patterns

**[Fact Skill] [Trivia Skill] [How-to Skill] [Hello World]**
- ↓           ↓             ↓              ↓
- [Common SDK Foundation/Components]

##### Technical Details

- Node.js runtime environment
- AWS Lambda execution context
- Alexa Skills Kit interfaces
- Voice interaction model
- Skill manifest structure

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef device fill:#3498db,stroke:#2980b9,color:white
    classDef aws fill:#27ae60,stroke:#219a52,color:white
    classDef sdk fill:#e67e22,stroke:#d35400,color:white
    classDef pattern fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef deprecated fill:#e74c3c,stroke:#c0392b,color:white

    %% User and Alexa Service Layer
    User["User's Alexa Device"]:::device
    AlexaCloud["Alexa Cloud Service"]:::aws
    User <--> AlexaCloud

    %% Middle Layer - ASK and Lambda
    ASK["Alexa Skills Kit"]:::aws
    Lambda["AWS Lambda Function"]:::aws
    AlexaCloud <--> ASK
    ASK <--> Lambda

    %% SDK and Implementation Layer
    SDK["Node.js SDK Components"]:::sdk
    SkillImpl["Skill Implementation"]:::sdk
    Lambda --> SkillImpl
    SkillImpl --> SDK

    %% Skill Patterns Section
    subgraph Patterns
        direction TB
        FactSkill["Fact Skill Pattern"]:::pattern
        TriviaSkill["Trivia Skill Pattern"]:::pattern
        HowToSkill["How-to Skill Pattern"]:::pattern
        HelloWorld["Hello World Pattern"]:::pattern
    end

    %% Connect Patterns to Implementation
    FactSkill & TriviaSkill & HowToSkill & HelloWorld --> SDK

    %% Deprecation Notice
    DeprecatedNote["DEPRECATED: Please refer to new Alexa SDK"]:::deprecated
    DeprecatedNote -.- SDK

    %% Legend
    subgraph Legend
        L1["User Components"]:::device
        L2["AWS Services"]:::aws
        L3["SDK Components"]:::sdk
        L4["Skill Patterns"]:::pattern
        L5["Deprecation Notices"]:::deprecated
    end
```
