# ivanpetrushev/jira-issues-graph architecture

> Architecture diagram of the GitHub repository ivanpetrushev/jira-issues-graph, 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/ivanpetrushev/jira-issues-graph
- Repository: https://github.com/ivanpetrushev/jira-issues-graph

## Overview

Key Components to Include:

##### Frontend Layer
- Static Web Hosting (S3 Bucket)
- HTML/JS files (index.html, graph.html, main.js, graph.js)
- This as the client-facing component

##### Backend Layer
- API Gateway
- Three Lambda Functions:
- generate-graph
- get-results
- -issues
- IAM Roles and Permissions

##### External Services
- Jira API (as an external dependency)

##### Connection Flows
- API Gateway to respective Lambda Functions
- Lambda Functions connecting to Jira API

##### Specific Elements
- S3 Bucket containing web assets
- API Gateway endpoints
- Three distinct Lambda Functions with their purposes
- IAM roles and policies
- Jira API integration point

##### Additional Details
- A note about future CloudFront/SSL integration (marked as planned)
- Configuration flow from terraform outputs to web config
- Public access points

##### Future expansion possibilities (CloudFront)

Remember to indicate that this is an AWS-native solution using terraform for infrastructure as code, with all components being managed through terraform configurations.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        S3["S3 Static Website"]
        WebFiles["Web Assets<br/>(HTML/JS)"]:::frontend
    end

    subgraph "API Layer"
        APIGW["API Gateway"]:::apigw
    end

    subgraph "Lambda Functions"
        GenGraph["Generate Graph<br/>Lambda"]:::lambda
        GetRes["Get Results<br/>Lambda"]:::lambda
        ListIss["List Issues<br/>Lambda"]:::lambda
    end

    subgraph "External Services"
        Jira["Jira API"]:::external
    end

    subgraph "Security & IAM"
        IAM["IAM Roles & Policies"]:::security
    end

    S3 --> WebFiles
    WebFiles --> APIGW
    APIGW --> GenGraph
    APIGW --> GetRes
    APIGW --> ListIss
    GenGraph --> Jira
    GetRes --> Jira
    ListIss --> Jira
    IAM -.-> GenGraph
    IAM -.-> GetRes
    IAM -.-> ListIss

    %% Future Enhancement Note
    FutureNote["Planned: CloudFront/SSL Integration"]:::note

    %% Click Events
    click WebFiles "https://github.com/ivanpetrushev/jira-issues-graph/tree/master/web"
    click GenGraph "https://github.com/ivanpetrushev/jira-issues-graph/blob/master/terraform/lambdas/src/generate-graph.js"
    click GetRes "https://github.com/ivanpetrushev/jira-issues-graph/blob/master/terraform/lambdas/src/get-results.js"
    click ListIss "https://github.com/ivanpetrushev/jira-issues-graph/blob/master/terraform/lambdas/src/list-issues.js"
    click APIGW "https://github.com/ivanpetrushev/jira-issues-graph/blob/master/terraform/lambda-api-gw/main.tf"
    click IAM "https://github.com/ivanpetrushev/jira-issues-graph/blob/master/terraform/iam.tf"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef lambda fill:#f39c12,stroke:#d35400,color:white
    classDef apigw fill:#e74c3c,stroke:#c0392b,color:white
    classDef external fill:#2ecc71,stroke:#27ae60,color:white
    classDef security fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef note fill:#f1c40f,stroke:#f39c12,color:black

    %% Legend
    subgraph Legend
        L1["Frontend Components"]:::frontend
        L2["Lambda Functions"]:::lambda
        L3["API Gateway"]:::apigw
        L4["External Services"]:::external
        L5["Security Components"]:::security
    end
```
