# 12manikrishna/bulk-notification-dispatcher architecture

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

- Interactive diagram: https://gitdiagram.com/12manikrishna/bulk-notification-dispatcher
- Repository: https://github.com/12manikrishna/bulk-notification-dispatcher

## Overview

This Django notification-dispatch application lets users create email campaigns, import recipients from CSV, review valid and rejected rows, then start or cancel delivery and inspect progress. HTTP views validate and serialize requests, selectors read campaign data, and services enforce lifecycle rules and enqueue background work. Celery tasks process imports and send messages using configured email services; persistent campaign and recipient records provide state. The frontend dashboard and delivery/import scripts support the same workflow. Relationships below follow shown calls and imports; README content and some implementation excerpts were unavailable, so uncertain links are omitted.

Main entry points: [`server/apps/core/views.py`](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/views.py) (API views), [`server/apps/core/models/models.py`](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/models/models.py) (Campaign records), [`server/apps/core/tasks.py`](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/tasks.py) (Import and delivery), [`server/apps/core/services.py`](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/services.py) (Campaign services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_views["API views<br/>[views.py]"]
  node_routes["API routes<br/>[urls.py]"]
  node_serializers["Request serializers<br/>[serializer.py]"]
  node_responses["Response envelope<br/>[responses.py]"]
  node_pagination["API pagination<br/>[pagination.py]"]
end

subgraph group_domain["Campaign domain"]
  node_selectors["Read selectors<br/>[selectors.py]"]
  node_services["Campaign services<br/>[services.py]"]
  node_models[("Campaign records<br/>[models.py]")]
  node_enums["Lifecycle states<br/>[enums.py]"]
  node_exceptions["Domain errors<br/>[exceptions.py]"]
  node_csv["CSV validation<br/>[csv_utils.py]"]
end

subgraph group_async["Background processing"]
  node_tasks["Import and delivery<br/>[tasks.py]"]
  node_broker["Task broker"]
  node_email["Email service"]
end

subgraph group_ui["Web interface"]
  node_dashboard["Campaign dashboard<br/>[dashboard.html]"]
  node_dashboardjs["Dashboard behavior<br/>[dashboard.js]"]
  node_deliveryjs["Delivery interface<br/>[delivery.js]"]
  node_importjs["Import interface"]
end

subgraph group_infra["Runtime configuration"]
  node_settings["Django settings<br/>[common.py]"]
  node_celery["Celery app<br/>[celery.py]"]
end

node_user(("Campaign user"))

node_user -->|"makes requests"| node_views
node_routes -->|"routes to"| node_views
node_views -->|"validates with"| node_serializers
node_views -->|"queries via"| node_selectors
node_views -->|"mutates via"| node_services
node_views -->|"paginates with"| node_pagination
node_views -->|"formats with"| node_responses
node_serializers -->|"validates upload"| node_csv
node_serializers -->|"serializes"| node_models
node_selectors -->|"reads"| node_models
node_services -->|"updates"| node_models
node_services -->|"enqueues"| node_tasks
node_tasks -->|"processes records"| node_models
node_tasks -->|"sends messages"| node_email
node_tasks -.->|"runs asynchronously"| node_broker
node_services -.->|"dispatches tasks"| node_broker
node_models -->|"uses states"| node_enums
node_models -->|"raises"| node_exceptions
node_dashboard -.->|"uses script"| node_dashboardjs
node_dashboardjs -.->|"calls API"| node_views
node_deliveryjs -.->|"calls API"| node_views
node_importjs -.->|"calls API"| node_views
node_settings -.->|"configures app"| node_models
node_settings -->|"configures mail"| node_email
node_settings -->|"configures broker"| node_broker
node_celery -->|"loads settings"| node_settings
node_celery -.->|"discovers tasks"| node_tasks

click node_views "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/views.py"
click node_routes "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/urls.py"
click node_serializers "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/serializer.py"
click node_responses "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/responses.py"
click node_pagination "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/pagination.py"
click node_selectors "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/selectors.py"
click node_services "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/services.py"
click node_models "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/models/models.py"
click node_enums "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/enums.py"
click node_exceptions "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/exceptions.py"
click node_csv "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/csv_utils.py"
click node_tasks "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/tasks.py"
click node_dashboard "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/templates/core/dashboard.html"
click node_dashboardjs "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/dashboard.js"
click node_deliveryjs "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/delivery.js"
click node_importjs "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/recipient-imports.js"
click node_settings "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/config/settings/common.py"
click node_celery "https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/config/celery.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_views,node_routes,node_serializers,node_responses,node_pagination,node_user toneBlue
class node_selectors,node_services,node_models,node_enums,node_exceptions,node_csv toneAmber
class node_tasks,node_broker,node_email toneMint
class node_dashboard,node_dashboardjs,node_deliveryjs,node_importjs toneRose
class node_settings,node_celery toneIndigo
```

## Components

### HTTP API

- [API views](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/views.py): `server/apps/core/views.py`
- [API routes](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/urls.py): `server/apps/core/urls.py`
- [Request serializers](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/serializer.py): `server/apps/core/serializer.py`
- [Response envelope](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/responses.py): `server/apps/core/responses.py`
- [API pagination](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/pagination.py): `server/apps/core/pagination.py`

### Campaign domain

- [Read selectors](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/selectors.py): `server/apps/core/selectors.py`
- [Campaign services](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/services.py): `server/apps/core/services.py`
- [Campaign records](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/models/models.py): `server/apps/core/models/models.py`
- [Lifecycle states](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/enums.py): `server/apps/core/enums.py`
- [Domain errors](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/exceptions.py): `server/apps/core/exceptions.py`
- [CSV validation](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/csv_utils.py): `server/apps/core/csv_utils.py`

### Background processing

- [Import and delivery](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/tasks.py): `server/apps/core/tasks.py`
- **Task broker**
- **Email service**

### Web interface

- [Campaign dashboard](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/templates/core/dashboard.html): `server/apps/core/templates/core/dashboard.html`
- [Dashboard behavior](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/dashboard.js): `server/apps/core/static/core/js/dashboard.js`
- [Delivery interface](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/delivery.js): `server/apps/core/static/core/js/delivery.js`
- [Import interface](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/apps/core/static/core/js/recipient-imports.js): `server/apps/core/static/core/js/recipient-imports.js`

### Runtime configuration

- [Django settings](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/config/settings/common.py): `server/config/settings/common.py`
- [Celery app](https://github.com/12manikrishna/bulk-notification-dispatcher/blob/main/server/config/celery.py): `server/config/celery.py`

### Other components

- **Campaign user**

## Connections

- Campaign user → API views: makes requests
- API routes → API views: routes to (evidence: `server/apps/core/urls.py`)
- API views → Request serializers: validates with (evidence: `server/apps/core/views.py`)
- API views → Read selectors: queries via (evidence: `server/apps/core/views.py`)
- API views → Campaign services: mutates via (evidence: `server/apps/core/views.py`)
- API views → API pagination: paginates with (evidence: `server/apps/core/views.py`)
- API views → Response envelope: formats with (evidence: `server/apps/core/views.py`)
- Request serializers → CSV validation: validates upload (evidence: `server/apps/core/serializer.py`)
- Request serializers → Campaign records: serializes (evidence: `server/apps/core/serializer.py`)
- Read selectors → Campaign records: reads (evidence: `server/apps/core/selectors.py`)
- Campaign services → Campaign records: updates (evidence: `server/apps/core/services.py`)
- Campaign services → Import and delivery: enqueues (evidence: `server/apps/core/services.py`)
- Import and delivery → Campaign records: processes records (evidence: `server/apps/core/tasks.py`)
- Import and delivery → Email service: sends messages (evidence: `server/apps/core/tasks.py`)
- Import and delivery → Task broker: runs asynchronously
- Campaign services → Task broker: dispatches tasks
- Campaign records → Lifecycle states: uses states (evidence: `server/apps/core/models/models.py`)
- Campaign records → Domain errors: raises (evidence: `server/apps/core/models/models.py`)
- Campaign dashboard → Dashboard behavior: uses script
- Dashboard behavior → API views: calls API
- Delivery interface → API views: calls API
- Import interface → API views: calls API
- Django settings → Campaign records: configures app
- Django settings → Email service: configures mail (evidence: `server/config/settings/common.py`)
- Django settings → Task broker: configures broker (evidence: `server/config/settings/common.py`)
- Celery app → Django settings: loads settings (evidence: `server/config/celery.py`)
- Celery app → Import and delivery: discovers tasks (evidence: `server/apps/core/tasks.py`)
