# ishansheth-31/automatedtext architecture

> Architecture diagram of the GitHub repository ishansheth-31/automatedtext, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ishansheth-31/automatedtext
- Repository: https://github.com/ishansheth-31/automatedtext

## Overview

##### Project type and purpose
- This is a serverless, single-function Python application deployed as an AWS Lambda. Its purpose is to fetch news and market data each morning, summarize that content via the Cohere NLP API, and send a daily SMS message via Twilio.

##### File structure
- Top level:
- lambda_function.py – the single entrypoint for the AWS Lambda.
- requirements.txt – lists Python dependencies (Twilio SDK, Cohere SDK, BeautifulSoup4, requests, etc.).
- README.md – describes functionality and prerequisites.
- .DS_Store – macOS metadata (ignore).
- No subdirectories: this is a simple, self-contained serverless function.

##### README for additional insights
- The script uses:
- BeautifulSoup4 – to scrape and parse news websites.
- Cohere API – to summarize the scraped content.
- Twilio API – to send SMS messages.
- It’s scheduled to run daily (implicitly via AWS CloudWatch Events or similar).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% AWS Services
    subgraph "AWS Services"
        direction TB
        Scheduler["Scheduler (CloudWatch Events)"]:::aws
        Lambda["Lambda Function (lambda_function.py)"]:::aws
        ParamStore["Parameter Store / Secrets Manager"]:::aws
        Logs["CloudWatch Logs"]:::aws
    end

    %% External Services
    subgraph "External Services"
        direction TB
        NewsSites["News Websites"]:::external
        MarketData["Market Data Endpoints"]:::external
        CohereAPI["Cohere API"]:::external
        TwilioAPI["Twilio API"]:::external
    end

    %% Project Files
    subgraph "Project Files"
        direction TB
        Docs["Project Documentation (README.md)"]:::docs
        Requirements["Python Dependencies (requirements.txt)"]:::docs
    end

    %% Connections
    Scheduler -->|"trigger"| Lambda
    Lambda -->|"raw HTML"| NewsSites
    Lambda -->|"raw HTML"| MarketData
    Lambda -->|"summary text"| CohereAPI
    Lambda -->|"SMS payload"| TwilioAPI
    Lambda -->|"log events"| Logs
    Lambda ---|"GET secrets"| ParamStore

    %% Click Events
    click Lambda "https://github.com/ishansheth-31/automatedtext/blob/main/lambda_function.py"
    click Requirements "https://github.com/ishansheth-31/automatedtext/blob/main/requirements.txt"
    click Docs "https://github.com/ishansheth-31/automatedtext/blob/main/README.md"

    %% Styles
    classDef aws fill:#F58536,stroke:#333,stroke-width:1px,color:#000
    classDef external fill:#1E90FF,stroke:#333,stroke-width:1px,color:#fff
    classDef docs fill:#A9A9A9,stroke:#333,stroke-width:1px,color:#000
```
