# darshaningalagi/whatsapp_automation architecture

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

- Interactive diagram: https://gitdiagram.com/darshaningalagi/whatsapp_automation
- Repository: https://github.com/darshaningalagi/whatsapp_automation

## Overview

This is a small Tkinter desktop app for sending personalized WhatsApp messages to pending contacts in an Excel workbook. The primary workflow is: select a workbook and message settings, validate and read pending rows, personalize each message, send it through WhatsApp Web, then write Sent/Failed status back to the workbook. The sampled main module implements workbook handling directly; the separate Excel helper is not imported there. The Chrome profile supports persistent browser state. The graph reflects the sampled Python sources and README; profile internals are treated as stored browser data, not inspected as application code.

Main entry points: [`main.py`](https://github.com/darshaningalagi/whatsapp_automation/blob/main/main.py) (GUI and send orchestration), [`whatsapp_service.py`](https://github.com/darshaningalagi/whatsapp_automation/blob/main/whatsapp_service.py) (Browser driver and sender), [`contacts.xlsx`](https://github.com/darshaningalagi/whatsapp_automation/blob/main/contacts.xlsx) (Selected contact workbook), [`chrome_profile`](https://github.com/darshaningalagi/whatsapp_automation/tree/main/chrome_profile) (Persistent Chrome profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop workflow"]
  node_main["GUI and send orchestration<br/>[main.py]"]
end

subgraph group_contacts["Contact workbook"]
  node_excel_helper["Excel helper<br/>[excel_service.py]"]
  node_workbook["Selected contact workbook<br/>[contacts.xlsx]"]
end

subgraph group_messaging["WhatsApp automation"]
  node_whatsapp_service["Browser driver and sender"]
  node_profile[("Persistent Chrome profile")]
end

node_user(("User"))
node_whatsapp_web{{"WhatsApp Web"}}

node_user -->|"selects and configures"| node_main
node_main -->|"reads contacts"| node_workbook
node_main -->|"writes statuses"| node_workbook
node_main -->|"starts driver; sends"| node_whatsapp_service
node_whatsapp_service -->|"uses session data"| node_profile
node_whatsapp_service -->|"navigates and sends"| node_whatsapp_web

click node_main "https://github.com/darshaningalagi/whatsapp_automation/blob/main/main.py"
click node_excel_helper "https://github.com/darshaningalagi/whatsapp_automation/blob/main/excel_service.py"
click node_workbook "https://github.com/darshaningalagi/whatsapp_automation/blob/main/contacts.xlsx"
click node_whatsapp_service "https://github.com/darshaningalagi/whatsapp_automation/blob/main/whatsapp_service.py"
click node_profile "https://github.com/darshaningalagi/whatsapp_automation/tree/main/chrome_profile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_user toneBlue
class node_excel_helper,node_workbook toneAmber
class node_whatsapp_service,node_profile toneMint
class node_whatsapp_web toneIndigo
```

## Components

### Desktop workflow

- [GUI and send orchestration](https://github.com/darshaningalagi/whatsapp_automation/blob/main/main.py): `main.py`

### Contact workbook

- [Excel helper](https://github.com/darshaningalagi/whatsapp_automation/blob/main/excel_service.py): `excel_service.py`
- [Selected contact workbook](https://github.com/darshaningalagi/whatsapp_automation/blob/main/contacts.xlsx): `contacts.xlsx`

### WhatsApp automation

- [Browser driver and sender](https://github.com/darshaningalagi/whatsapp_automation/blob/main/whatsapp_service.py): `whatsapp_service.py`
- [Persistent Chrome profile](https://github.com/darshaningalagi/whatsapp_automation/tree/main/chrome_profile): `chrome_profile`

### Other components

- **User**
- **WhatsApp Web**

## Connections

- User → GUI and send orchestration: selects and configures (evidence: `main.py`)
- GUI and send orchestration → Selected contact workbook: reads contacts (evidence: `main.py`)
- GUI and send orchestration → Selected contact workbook: writes statuses (evidence: `main.py`)
- GUI and send orchestration → Browser driver and sender: starts driver; sends (evidence: `main.py`)
- Browser driver and sender → Persistent Chrome profile: uses session data (evidence: `whatsapp_service.py`)
- Browser driver and sender → WhatsApp Web: navigates and sends (evidence: `whatsapp_service.py`)
