# achenchi7/the-cloud-resume-challenge architecture

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

- Interactive diagram: https://gitdiagram.com/achenchi7/the-cloud-resume-challenge
- Repository: https://github.com/achenchi7/the-cloud-resume-challenge

## Overview

##### Main Components

a) Frontend Layer:
- S3 Bucket (Static Website Hosting)
- CloudFront Distribution
- Route 53 (DNS Management)
- Static Assets (HTML, CSS, JS files)

b) Backend Layer:
- API Gateway
- Lambda Function
- DynamoDB Table

**[Client Layer]**
- ↓
**[Distribution Layer]**
- ↓
**[Application Layer]**
- ↓
**[Data Layer]**

##### Specific Implementation Details

Technical details in annotations:
- API Gateway: HTTP API with GET/POST methods
- Lambda: Python 3.9 with boto3
- S3: Static website hosting
- CloudFront: Edge distribution with cache invalidation
- DynamoDB: Single table design for visit counter

##### Infrastructure as Code Elements

A separate section or notation indicating:
- Terraform managed resources
- GitHub Actions workflow
- CI/CD pipeline flow

##### Security and Access Patterns

Highlight:
- CORS configuration
- S3 bucket privacy
- API Gateway security

- AWS services
- Security groups
- Public/Private boundaries

##### Additional Elements

Include:
- Version/Date stamp
- Infrastructure region indicators
- Cost optimization notes

Remember to show both the infrastructure provisioning flow (Terraform) and the runtime request flow (actual user interactions) as separate but related aspects of the system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        User((User))
    end

    subgraph "Distribution Layer"
        Route53[Route 53]:::network
        CloudFront[CloudFront Distribution]:::network
    end

    subgraph "Frontend Layer"
        S3[S3 Static Website]:::storage
        HTML[index.html]:::frontend
        click HTML "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/index.html"
        CSS[CSS Styles]:::frontend
        click CSS "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/styles.css"
        JS[JavaScript]:::frontend
        click JS "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/script.js"
        Counter[Visit Counter]:::frontend
        click Counter "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/web-count.html"
        Assets[Static Assets]:::frontend
        click Assets "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/assets/Files/Jully_Achenchi_CV_2024.pdf"
    end

    subgraph "Backend Layer"
        API[API Gateway]:::api
        Lambda[Lambda Function]:::compute
        click Lambda "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/lambda/lambda_function.py"
        DynamoDB[DynamoDB Table]:::storage
    end

    subgraph "Infrastructure & CI/CD"
        Terraform[Terraform IaC]:::iac
        click Terraform "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/backend.tf"
        GithubActions[GitHub Actions]:::cicd
        click GithubActions "https://github.com/achenchi7/the-cloud-resume-challenge/blob/main/.github/workflows/frontend.yml"
    end

    %% Relationships
    User --> Route53
    Route53 --> CloudFront
    CloudFront --> S3
    S3 --> HTML
    S3 --> CSS
    S3 --> JS
    S3 --> Counter
    S3 --> Assets
    
    CloudFront --> API
    API --> Lambda
    Lambda --> DynamoDB

    Terraform -.-> S3
    Terraform -.-> API
    Terraform -.-> Lambda
    Terraform -.-> DynamoDB
    GithubActions -.-> S3

    %% Styling
    classDef default fill:#fff,stroke:#333,stroke-width:2px
    classDef network fill:#81c784,stroke:#333,color:#fff
    classDef storage fill:#64b5f6,stroke:#333,color:#fff
    classDef compute fill:#ffb74d,stroke:#333,color:#fff
    classDef api fill:#ba68c8,stroke:#333,color:#fff
    classDef frontend fill:#e0e0e0,stroke:#333
    classDef iac fill:#4db6ac,stroke:#333,color:#fff
    classDef cicd fill:#ff8a65,stroke:#333,color:#fff

    %% Legend
    subgraph Legend
        L1[Network]:::network
        L2[Storage]:::storage
        L3[Compute]:::compute
        L4[API]:::api
        L5[Frontend]:::frontend
        L6[Infrastructure]:::iac
        L7[CI/CD]:::cicd
    end
```
