# emaildelivery/edcom-ce architecture

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

- Interactive diagram: https://gitdiagram.com/emaildelivery/edcom-ce
- Repository: https://github.com/emaildelivery/edcom-ce

## Overview

EmailDelivery.com is a self-hosted email marketing platform paired with delivery infrastructure. A customer or administrator works in the browser; the platform manages contacts, campaigns, funnels, and transactional messages, then orchestrates delivery through configurable Postal Routes and delivery backends. The map also includes event/webhook processing and shared persistence, task, and storage layers. Several major modules are represented from the source index and README capabilities; their internal connections are omitted where the excerpts do not establish them.

Main entry points: [`api/shared/send.py`](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/send.py) (Send orchestration), [`api/campaigns.py`](https://github.com/emaildelivery/edcom-ce/blob/main/api/campaigns.py) (Campaigns), [`api/shared/webhooks.py`](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/webhooks.py) (Event webhooks), [`client/src/App.js`](https://github.com/emaildelivery/edcom-ce/blob/main/client/src/App.js) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["ESP workspace"]
  node_web_app["Web application<br/>[App.js]"]
  node_campaigns_ui["Campaign interface<br/>[Broadcasts.js]"]
  node_contacts_ui["Contact interface<br/>[Contacts.js]"]
  node_templates["Email editors<br/>[EDDOM.js]"]
end

subgraph group_orchestration["API and orchestration"]
  node_api["API application<br/>[app.py]"]
  node_campaigns["Campaigns<br/>[campaigns.py]"]
  node_contacts["Contacts and segments<br/>[contacts.py]"]
  node_funnels["Funnels<br/>[funnels.py]"]
  node_transactional["Transactional mail<br/>[transactional.py]"]
end

subgraph group_delivery["Delivery infrastructure"]
  node_postal_routes["Postal Routes<br/>[backends.py]"]
  node_send["Send orchestration<br/>[send.py]"]
  node_backends["Delivery backends<br/>[backends.py]"]
  node_velocity["Velocity MTA<br/>[main.go]"]
  node_smtp_relay["SMTP relay<br/>[main.go]"]
end

subgraph group_operations["Events and operations"]
  node_events["Event processing<br/>[events.py]"]
  node_webhooks["Event webhooks<br/>[webhooks.py]"]
  node_database[("Application database<br/>[db.py]")]
  node_task_queue["Background tasks<br/>[tasks.py]"]
  node_object_storage[("Object storage<br/>[s3.py]")]
end

node_customer(("Customer or admin"))
node_external_services["ESP and SMTP services"]

node_customer -->|"uses"| node_web_app
node_web_app -->|"routes to"| node_campaigns_ui
node_web_app -->|"routes to"| node_contacts_ui
node_campaigns_ui -.->|"edits content"| node_templates
node_customer -->|"configures"| node_postal_routes
node_web_app -.->|"calls API"| node_api
node_api -->|"imports"| node_campaigns
node_api -->|"imports"| node_contacts
node_api -->|"imports"| node_funnels
node_campaigns -->|"imports"| node_send
node_campaigns -->|"uses"| node_database
node_campaigns -->|"schedules"| node_task_queue
node_campaigns -->|"selects route"| node_postal_routes
node_funnels -.->|"sends messages"| node_send
node_transactional -.->|"sends mail"| node_send
node_send -->|"schedules tasks"| node_task_queue
node_send -->|"reads and writes"| node_database
node_send -->|"uses"| node_object_storage
node_send -->|"uses"| node_contacts
node_send -->|"uses"| node_webhooks
node_postal_routes -.->|"selects delivery"| node_backends
node_backends -.->|"delivers through"| node_external_services
node_backends -.->|"delivers through"| node_velocity
node_backends -.->|"delivers through"| node_smtp_relay
node_events -.->|"dispatches events"| node_webhooks
node_webhooks -->|"schedules delivery"| node_task_queue
node_webhooks -->|"posts events"| node_external_services
node_webhooks -->|"removes hooks"| node_database

click node_web_app "https://github.com/emaildelivery/edcom-ce/blob/main/client/src/App.js"
click node_campaigns_ui "https://github.com/emaildelivery/edcom-ce/blob/main/client/src/containers/Broadcasts.js"
click node_contacts_ui "https://github.com/emaildelivery/edcom-ce/blob/main/client/src/containers/Contacts.js"
click node_templates "https://github.com/emaildelivery/edcom-ce/blob/main/client/src/components/EDDOM.js"
click node_api "https://github.com/emaildelivery/edcom-ce/blob/main/api/app.py"
click node_campaigns "https://github.com/emaildelivery/edcom-ce/blob/main/api/campaigns.py"
click node_contacts "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/contacts.py"
click node_funnels "https://github.com/emaildelivery/edcom-ce/blob/main/api/funnels.py"
click node_transactional "https://github.com/emaildelivery/edcom-ce/blob/main/api/transactional.py"
click node_postal_routes "https://github.com/emaildelivery/edcom-ce/blob/main/api/backends.py"
click node_send "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/send.py"
click node_backends "https://github.com/emaildelivery/edcom-ce/blob/main/api/backends.py"
click node_velocity "https://github.com/emaildelivery/edcom-ce/blob/main/velocity/sender/main.go"
click node_smtp_relay "https://github.com/emaildelivery/edcom-ce/blob/main/smtprelay/main.go"
click node_events "https://github.com/emaildelivery/edcom-ce/blob/main/api/events.py"
click node_webhooks "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/webhooks.py"
click node_database "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/db.py"
click node_task_queue "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/tasks.py"
click node_object_storage "https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/s3.py"

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_web_app,node_campaigns_ui,node_contacts_ui,node_templates toneBlue
class node_api,node_campaigns,node_contacts,node_funnels,node_transactional toneAmber
class node_postal_routes,node_send,node_backends,node_velocity,node_smtp_relay toneMint
class node_events,node_webhooks,node_database,node_task_queue,node_object_storage toneRose
class node_customer,node_external_services toneIndigo
```

## Components

### ESP workspace

- [Web application](https://github.com/emaildelivery/edcom-ce/blob/main/client/src/App.js): `client/src/App.js`
- [Campaign interface](https://github.com/emaildelivery/edcom-ce/blob/main/client/src/containers/Broadcasts.js): `client/src/containers/Broadcasts.js`
- [Contact interface](https://github.com/emaildelivery/edcom-ce/blob/main/client/src/containers/Contacts.js): `client/src/containers/Contacts.js`
- [Email editors](https://github.com/emaildelivery/edcom-ce/blob/main/client/src/components/EDDOM.js): `client/src/components/EDDOM.js`

### API and orchestration

- [API application](https://github.com/emaildelivery/edcom-ce/blob/main/api/app.py): `api/app.py`
- [Campaigns](https://github.com/emaildelivery/edcom-ce/blob/main/api/campaigns.py): `api/campaigns.py`
- [Contacts and segments](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/contacts.py): `api/shared/contacts.py`
- [Funnels](https://github.com/emaildelivery/edcom-ce/blob/main/api/funnels.py): `api/funnels.py`
- [Transactional mail](https://github.com/emaildelivery/edcom-ce/blob/main/api/transactional.py): `api/transactional.py`

### Delivery infrastructure

- [Postal Routes](https://github.com/emaildelivery/edcom-ce/blob/main/api/backends.py): `api/backends.py`
- [Send orchestration](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/send.py): `api/shared/send.py`
- [Delivery backends](https://github.com/emaildelivery/edcom-ce/blob/main/api/backends.py): `api/backends.py`
- [Velocity MTA](https://github.com/emaildelivery/edcom-ce/blob/main/velocity/sender/main.go): `velocity/sender/main.go`
- [SMTP relay](https://github.com/emaildelivery/edcom-ce/blob/main/smtprelay/main.go): `smtprelay/main.go`

### Events and operations

- [Event processing](https://github.com/emaildelivery/edcom-ce/blob/main/api/events.py): `api/events.py`
- [Event webhooks](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/webhooks.py): `api/shared/webhooks.py`
- [Application database](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/db.py): `api/shared/db.py`
- [Background tasks](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/tasks.py): `api/shared/tasks.py`
- [Object storage](https://github.com/emaildelivery/edcom-ce/blob/main/api/shared/s3.py): `api/shared/s3.py`

### Other components

- **Customer or admin**
- **ESP and SMTP services**

## Connections

- Customer or admin → Web application: uses
- Web application → Campaign interface: routes to
- Web application → Contact interface: routes to
- Campaign interface → Email editors: edits content
- Customer or admin → Postal Routes: configures
- Web application → API application: calls API
- API application → Campaigns: imports (evidence: `api/app.py`)
- API application → Contacts and segments: imports (evidence: `api/app.py`)
- API application → Funnels: imports (evidence: `api/app.py`)
- Campaigns → Send orchestration: imports (evidence: `api/campaigns.py`)
- Campaigns → Application database: uses (evidence: `api/campaigns.py`)
- Campaigns → Background tasks: schedules (evidence: `api/campaigns.py`)
- Campaigns → Postal Routes: selects route (evidence: `api/campaigns.py`)
- Funnels → Send orchestration: sends messages
- Transactional mail → Send orchestration: sends mail
- Send orchestration → Background tasks: schedules tasks (evidence: `api/shared/send.py`)
- Send orchestration → Application database: reads and writes (evidence: `api/shared/send.py`)
- Send orchestration → Object storage: uses (evidence: `api/shared/send.py`)
- Send orchestration → Contacts and segments: uses (evidence: `api/shared/send.py`)
- Send orchestration → Event webhooks: uses (evidence: `api/shared/send.py`)
- Postal Routes → Delivery backends: selects delivery
- Delivery backends → ESP and SMTP services: delivers through
- Delivery backends → Velocity MTA: delivers through
- Delivery backends → SMTP relay: delivers through
- Event processing → Event webhooks: dispatches events
- Event webhooks → Background tasks: schedules delivery (evidence: `api/shared/webhooks.py`)
- Event webhooks → ESP and SMTP services: posts events (evidence: `api/shared/webhooks.py`)
- Event webhooks → Application database: removes hooks (evidence: `api/shared/webhooks.py`)
