# sowasred/cold-call architecture

> Architecture diagram of the GitHub repository sowasred/cold-call, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sowasred/cold-call
- Repository: https://github.com/sowasred/cold-call

## Overview

- Platform Scrapers
- Example: The “platform-scrapers/homestar” directory indicates a specialized scraper module.
- Responsibilities include collection of company information (basic data output as CSV).
- Contact Extractor
- A Python tool (in the “contact-extractor” directory) that takes CSV data from the scrapers and enriches it with additional contact details.
- Marketing Email Generator
- An AI-powered system (located in “marketing-email-generator”) that takes enriched data (via targets.csv) and sender details (sender.csv) to produce personalized email content in JSON.
- Email Sender
- A system (in “email-sender”) that processes the JSON file and dispatches emails.
- Additional Modules:
- sitemap-data-harvester: A web application split into frontend and backend components for sitemap parsing and content extraction.
- lead-reach: A modern Next.js-based SaaS platform for lead management and campaign analytics.

##### Depicting Data Flow and Dependencies
- From CSV, pass data into the Contact Extractor → Produces an enriched CSV with complete contact information.
- Next, feed both the enriched CSV (targets.csv) and sender component (sender.csv) into the Marketing Email Generator → Produces personalized email JSON.
- Finally, direct the JSON output to the Email Sender → Handles the distribution of emails.
- For sitemap-data-harvester, illustrate its split between frontend and backend with a clear communication link (e.g., API calls).
- For lead-reach, indicate how it might integrate offers methods for campaign management and data visualization, alongside tracking engagement, separately from the email dispatch flow.

##### Architectural Patterns and Technologies
- That the monorepo structure follows a modular design, with each component being independently deployable and having its own configuration and setup:
- For example, “requirements.txt” for Python projects and “package.json” with related build/config files for JavaScript/Next.js components.
- Mention any technology-specific details:
- Python for data processing and extraction modules.
- Node.js/Next.js for lead-reach and part of the sitemap-data-harvester.

1. Platform Scrapers (input: CSV output)
2. Contact Extractor (enrichment process)
3. Marketing Email Generator (AI-driven personalized email generation)
4. Email Sender (automated distribution)
- sitemap-data-harvester: Show both backend (with controllers, routes, services) and frontend (React-based files) components with interactions.

## Diagram (Mermaid)

```mermaid
graph TD
  %% Core Pipeline Subgraph
  subgraph "Core Pipeline"
    PSS["Platform Scrapers"]:::coreBlue
    CE["Contact Extractor"]:::backend
    MEG["Marketing Email Generator"]:::coreBlue
    ES["Email Sender"]:::backend

    PSS -->|"CSV_output"| CE
    CE -->|"Enriched_CSV"| MEG
    MEG -->|"Email_JSON"| ES
  end

  %% Sitemap-data-harvester Subgraph
  subgraph "Sitemap-data-harvester"
    SDHF["Frontend"]:::ui
    SDHB["Backend"]:::backend

    SDHF -->|"API_calls"| SDHB
  end

  %% Lead-reach Subgraph
  subgraph "Lead Management"
    LR["Lead-reach"]:::ui
  end

  %% Optional integration connection
  ES ---|"engagement_data"| LR

  %% Click Events
  click PSS "https://github.com/sowasred/cold-call/tree/master/platform-scrapers/homestar"
  click CE "https://github.com/sowasred/cold-call/tree/master/contact-extractor"
  click MEG "https://github.com/sowasred/cold-call/tree/master/marketing-email-generator"
  click ES "https://github.com/sowasred/cold-call/tree/master/email-sender"
  click SDHB "https://github.com/sowasred/cold-call/tree/master/sitemap-data-harvester/backend"
  click SDHF "https://github.com/sowasred/cold-call/tree/master/sitemap-data-harvester/frontend"
  click LR "https://github.com/sowasred/cold-call/tree/master/lead-reach"

  %% Styles
  classDef coreBlue fill:#ADD8E6,stroke:#000,stroke-width:1px;
  classDef backend fill:#FFCC99,stroke:#000,stroke-width:1px;
  classDef ui fill:#CCFFCC,stroke:#000,stroke-width:1px;
```
