# shakaran/whatly architecture

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

- Interactive diagram: https://gitdiagram.com/shakaran/whatly
- Repository: https://github.com/shakaran/whatly

## Overview

Whatly is a Qt desktop wrapper for WhatsApp Web, not an independent messaging client. The main workflow is opening an account in the native application, loading WhatsApp Web in a Qt WebEngine view, and adding native desktop behavior around it. Separate account profiles isolate sessions; documented feature branches add themes, privacy controls, scheduling, notifications, spell-check, and AI assistance. The excerpts show profile configuration and scheduled-message startup, but most feature wiring is unsampled, so those links are omitted or marked unverified.

Main entry points: [`src/mainwindow.h`](https://github.com/shakaran/whatly/blob/main/src/mainwindow.h) (Main window), [`src/webengineprofilemanager.cpp`](https://github.com/shakaran/whatly/blob/main/src/webengineprofilemanager.cpp) (Account profiles), [`src/main.cpp`](https://github.com/shakaran/whatly/blob/main/src/main.cpp) (Application startup), [`src/webview.h`](https://github.com/shakaran/whatly/blob/main/src/webview.h) (Web view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_launcher["Application startup<br/>[main.cpp]"]
  node_window["Main window<br/>[mainwindow.h]"]
end

subgraph group_web["Web session"]
  node_webview["Web view<br/>[webview.h]"]
  node_webpage["Web page handling<br/>[webenginepage.cpp]"]
  node_themes["Chat themes<br/>[chattheme.cpp]"]
  node_wallpaper["Chat wallpaper<br/>[chatwallpaper.cpp]"]
  node_privacy["Privacy controls<br/>[privacyblur.cpp]"]
  node_spellcheck["Spell-check dictionaries<br/>[dictionaries.h]"]
end

subgraph group_accounts["Accounts and settings"]
  node_profiles["Account profiles"]
  node_profileidentity["Process profile<br/>[appprofile.h]"]
  node_settings["Settings<br/>[settingsmanager.h]"]
  node_storage[("Web storage<br/>[storageinfo.cpp]")]
end

subgraph group_messaging["Messaging features"]
  node_scheduled["Scheduled messages"]
  node_replies["Saved replies"]
  node_assistant["AI assistant<br/>[aiassistant.h]"]
  node_translation["Translation<br/>[translator.h]"]
end

subgraph group_native["Native features"]
  node_notifications["Notifications"]
  node_tray["System tray<br/>[trayicon.cpp]"]
end

node_user(("Desktop user"))
node_whatsapp["WhatsApp Web"]

node_user -->|"starts"| node_launcher
node_launcher -.->|"opens"| node_window
node_window -.->|"hosts"| node_webview
node_webview -->|"loads"| node_whatsapp
node_window -->|"starts queue"| node_scheduled
node_profiles -->|"uses namespace"| node_profileidentity
node_profiles -->|"reads settings"| node_settings
node_profiles -->|"configures paths"| node_storage
node_window -.->|"uses profiles"| node_profiles
node_window -.->|"applies rules"| node_notifications
node_window -.->|"updates tray"| node_tray
node_profiles -->|"configures"| node_themes
node_profiles -->|"configures"| node_wallpaper
node_profiles -->|"configures"| node_spellcheck
node_webpage -.->|"handles page"| node_whatsapp
node_window -.->|"offers replies"| node_replies
node_window -.->|"offers assistance"| node_assistant
node_window -.->|"offers translation"| node_translation
node_profiles -->|"configures"| node_privacy

click node_launcher "https://github.com/shakaran/whatly/blob/main/src/main.cpp"
click node_window "https://github.com/shakaran/whatly/blob/main/src/mainwindow.h"
click node_webview "https://github.com/shakaran/whatly/blob/main/src/webview.h"
click node_webpage "https://github.com/shakaran/whatly/blob/main/src/webenginepage.cpp"
click node_profiles "https://github.com/shakaran/whatly/blob/main/src/webengineprofilemanager.cpp"
click node_profileidentity "https://github.com/shakaran/whatly/blob/main/src/appprofile.h"
click node_settings "https://github.com/shakaran/whatly/blob/main/src/settingsmanager.h"
click node_scheduled "https://github.com/shakaran/whatly/blob/main/src/scheduledmessages.h"
click node_replies "https://github.com/shakaran/whatly/blob/main/src/cannedresponses.cpp"
click node_assistant "https://github.com/shakaran/whatly/blob/main/src/aiassistant.h"
click node_translation "https://github.com/shakaran/whatly/blob/main/src/translator.h"
click node_themes "https://github.com/shakaran/whatly/blob/main/src/chattheme.cpp"
click node_wallpaper "https://github.com/shakaran/whatly/blob/main/src/chatwallpaper.cpp"
click node_privacy "https://github.com/shakaran/whatly/blob/main/src/privacyblur.cpp"
click node_spellcheck "https://github.com/shakaran/whatly/blob/main/src/dictionaries.h"
click node_notifications "https://github.com/shakaran/whatly/blob/main/src/notificationrules.cpp"
click node_tray "https://github.com/shakaran/whatly/blob/main/src/trayicon.cpp"
click node_storage "https://github.com/shakaran/whatly/blob/main/src/storageinfo.cpp"

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_launcher,node_window,node_user toneBlue
class node_webview,node_webpage,node_themes,node_wallpaper,node_privacy,node_spellcheck toneAmber
class node_profiles,node_profileidentity,node_settings,node_storage toneMint
class node_scheduled,node_replies,node_assistant,node_translation toneRose
class node_notifications,node_tray,node_whatsapp toneIndigo
```

## Components

### Desktop application

- [Application startup](https://github.com/shakaran/whatly/blob/main/src/main.cpp): `src/main.cpp`
- [Main window](https://github.com/shakaran/whatly/blob/main/src/mainwindow.h): `src/mainwindow.h`

### Web session

- [Web view](https://github.com/shakaran/whatly/blob/main/src/webview.h): `src/webview.h`
- [Web page handling](https://github.com/shakaran/whatly/blob/main/src/webenginepage.cpp): `src/webenginepage.cpp`
- [Chat themes](https://github.com/shakaran/whatly/blob/main/src/chattheme.cpp): `src/chattheme.cpp`
- [Chat wallpaper](https://github.com/shakaran/whatly/blob/main/src/chatwallpaper.cpp): `src/chatwallpaper.cpp`
- [Privacy controls](https://github.com/shakaran/whatly/blob/main/src/privacyblur.cpp): `src/privacyblur.cpp`
- [Spell-check dictionaries](https://github.com/shakaran/whatly/blob/main/src/dictionaries.h): `src/dictionaries.h`

### Accounts and settings

- [Account profiles](https://github.com/shakaran/whatly/blob/main/src/webengineprofilemanager.cpp): `src/webengineprofilemanager.cpp`
- [Process profile](https://github.com/shakaran/whatly/blob/main/src/appprofile.h): `src/appprofile.h`
- [Settings](https://github.com/shakaran/whatly/blob/main/src/settingsmanager.h): `src/settingsmanager.h`
- [Web storage](https://github.com/shakaran/whatly/blob/main/src/storageinfo.cpp): `src/storageinfo.cpp`

### Messaging features

- [Scheduled messages](https://github.com/shakaran/whatly/blob/main/src/scheduledmessages.h): `src/scheduledmessages.h`
- [Saved replies](https://github.com/shakaran/whatly/blob/main/src/cannedresponses.cpp): `src/cannedresponses.cpp`
- [AI assistant](https://github.com/shakaran/whatly/blob/main/src/aiassistant.h): `src/aiassistant.h`
- [Translation](https://github.com/shakaran/whatly/blob/main/src/translator.h): `src/translator.h`

### Native features

- [Notifications](https://github.com/shakaran/whatly/blob/main/src/notificationrules.cpp): `src/notificationrules.cpp`
- [System tray](https://github.com/shakaran/whatly/blob/main/src/trayicon.cpp): `src/trayicon.cpp`

### Other components

- **Desktop user**
- **WhatsApp Web**

## Connections

- Desktop user → Application startup: starts (evidence: `README.md`)
- Application startup → Main window: opens
- Main window → Web view: hosts
- Web view → WhatsApp Web: loads (evidence: `README.md`)
- Main window → Scheduled messages: starts queue (evidence: `src/mainwindow_webengine.cpp`)
- Account profiles → Process profile: uses namespace (evidence: `src/webengineprofilemanager.cpp`)
- Account profiles → Settings: reads settings (evidence: `src/webengineprofilemanager.cpp`)
- Account profiles → Web storage: configures paths (evidence: `src/webengineprofilemanager.cpp`)
- Main window → Account profiles: uses profiles
- Main window → Notifications: applies rules
- Main window → System tray: updates tray
- Account profiles → Chat themes: configures (evidence: `src/webengineprofilemanager.cpp`)
- Account profiles → Chat wallpaper: configures (evidence: `src/webengineprofilemanager.cpp`)
- Account profiles → Spell-check dictionaries: configures (evidence: `src/webengineprofilemanager.cpp`)
- Web page handling → WhatsApp Web: handles page
- Main window → Saved replies: offers replies
- Main window → AI assistant: offers assistance
- Main window → Translation: offers translation
- Account profiles → Privacy controls: configures (evidence: `src/webengineprofilemanager.cpp`)
