# estvita/separator architecture

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

- Interactive diagram: https://gitdiagram.com/estvita/separator
- Repository: https://github.com/estvita/separator

## Overview

Separator.biz is a Django-based hub for creating and managing Bitrix24 applications, with integrations for WhatsApp Business, WhatsApp Web, OLX, Asterisk telephony, and chatbot connectors. Users and integration events enter through web pages or API endpoints; integration services process portal and messaging operations, with Celery tasks handling asynchronous work and Django models persisting configuration and state. The README documents these integration capabilities; unsampled implementation details are represented at their existing app-directory paths, and links without direct source evidence are omitted.

Main entry points: [`config/api_router.py`](https://github.com/estvita/separator/blob/main/config/api_router.py) (API router), [`separator/waba/api/views.py`](https://github.com/estvita/separator/blob/main/separator/waba/api/views.py) (WABA webhook), [`separator/waweb/tasks.py`](https://github.com/estvita/separator/blob/main/separator/waweb/tasks.py) (WhatsApp Web tasks), [`separator/bitrix/tasks.py`](https://github.com/estvita/separator/blob/main/separator/bitrix/tasks.py) (Bitrix tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and accounts"]
  node_api_router["API router<br/>[api_router.py]"]
  node_user_accounts[("User accounts<br/>[models.py]")]
end

subgraph group_bitrix["Bitrix24 hub"]
  node_bitrix_api["Bitrix API<br/>[views.py]"]
  node_bitrix_portals[("Portal data<br/>[models.py]")]
  node_bitrix_tasks["Bitrix tasks<br/>[tasks.py]"]
  node_bitrix_client["Bitrix client<br/>[crest.py]"]
end

subgraph group_messaging["Messaging channels"]
  node_waba_api["WABA webhook<br/>[views.py]"]
  node_waba_service["WABA messaging"]
  node_waba_tasks["WABA tasks<br/>[tasks.py]"]
  node_waweb_api["WhatsApp Web API<br/>[views.py]"]
  node_waweb_tasks["WhatsApp Web tasks<br/>[tasks.py]"]
  node_waweb_data[("WhatsApp Web data<br/>[models.py]")]
end

subgraph group_integrations["Other integrations"]
  node_olx_service["OLX integration"]
  node_asterx_service["AsterX telephony"]
  node_voip_service["VoIP extensions"]
  node_bitbot_service["BitBot connector"]
end

subgraph group_runtime["Shared runtime"]
  node_home_services[("Plans and trials<br/>[models.py]")]
end

node_user(("User"))
node_external_services{{"External platforms"}}

node_user -->|"sends requests"| node_api_router
node_api_router -->|"routes to"| node_bitrix_api
node_api_router -->|"routes to"| node_waba_api
node_api_router -->|"routes to"| node_waweb_api
node_api_router -->|"routes to"| node_user_accounts
node_bitrix_api -->|"reads and updates"| node_bitrix_portals
node_bitrix_tasks -->|"calls"| node_bitrix_client
node_bitrix_tasks -->|"loads portal data"| node_bitrix_portals
node_waba_api -->|"delegates to"| node_waba_service
node_waba_api -->|"schedules"| node_waba_tasks
node_waba_tasks -->|"uses utilities"| node_waba_service
node_waweb_api -->|"dispatches events"| node_waweb_tasks
node_waweb_tasks -->|"updates session data"| node_waweb_data
node_waweb_tasks -->|"forwards messages"| node_bitrix_tasks
node_waba_service -->|"connects to WhatsApp"| node_external_services
node_olx_service -->|"connects to OLX"| node_external_services
node_asterx_service -->|"integrates with Asterisk"| node_external_services
node_voip_service -->|"integrates with PBX"| node_external_services
node_bitbot_service -->|"connects chatbots"| node_external_services
node_user_accounts -.->|"supports account services"| node_home_services

click node_api_router "https://github.com/estvita/separator/blob/main/config/api_router.py"
click node_user_accounts "https://github.com/estvita/separator/blob/main/separator/users/models.py"
click node_bitrix_api "https://github.com/estvita/separator/blob/main/separator/bitrix/api/views.py"
click node_bitrix_portals "https://github.com/estvita/separator/blob/main/separator/bitrix/models.py"
click node_bitrix_tasks "https://github.com/estvita/separator/blob/main/separator/bitrix/tasks.py"
click node_bitrix_client "https://github.com/estvita/separator/blob/main/separator/bitrix/crest.py"
click node_waba_api "https://github.com/estvita/separator/blob/main/separator/waba/api/views.py"
click node_waba_service "https://github.com/estvita/separator/tree/main/separator/waba"
click node_waba_tasks "https://github.com/estvita/separator/blob/main/separator/waba/tasks.py"
click node_waweb_api "https://github.com/estvita/separator/blob/main/separator/waweb/api/views.py"
click node_waweb_tasks "https://github.com/estvita/separator/blob/main/separator/waweb/tasks.py"
click node_waweb_data "https://github.com/estvita/separator/blob/main/separator/waweb/models.py"
click node_olx_service "https://github.com/estvita/separator/tree/main/separator/olx"
click node_asterx_service "https://github.com/estvita/separator/tree/main/separator/asterx"
click node_voip_service "https://github.com/estvita/separator/tree/main/separator/voip"
click node_bitbot_service "https://github.com/estvita/separator/tree/main/separator/bitbot"
click node_home_services "https://github.com/estvita/separator/blob/main/separator/home/models.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_api_router,node_user_accounts,node_user toneBlue
class node_bitrix_api,node_bitrix_portals,node_bitrix_tasks,node_bitrix_client toneAmber
class node_waba_api,node_waba_service,node_waba_tasks,node_waweb_api,node_waweb_tasks,node_waweb_data toneMint
class node_olx_service,node_asterx_service,node_voip_service,node_bitbot_service toneRose
class node_home_services,node_external_services toneIndigo
```

## Components

### Access and accounts

- [API router](https://github.com/estvita/separator/blob/main/config/api_router.py): `config/api_router.py`
- [User accounts](https://github.com/estvita/separator/blob/main/separator/users/models.py): `separator/users/models.py`

### Bitrix24 hub

- [Bitrix API](https://github.com/estvita/separator/blob/main/separator/bitrix/api/views.py): `separator/bitrix/api/views.py`
- [Portal data](https://github.com/estvita/separator/blob/main/separator/bitrix/models.py): `separator/bitrix/models.py`
- [Bitrix tasks](https://github.com/estvita/separator/blob/main/separator/bitrix/tasks.py): `separator/bitrix/tasks.py`
- [Bitrix client](https://github.com/estvita/separator/blob/main/separator/bitrix/crest.py): `separator/bitrix/crest.py`

### Messaging channels

- [WABA webhook](https://github.com/estvita/separator/blob/main/separator/waba/api/views.py): `separator/waba/api/views.py`
- [WABA messaging](https://github.com/estvita/separator/tree/main/separator/waba): `separator/waba`
- [WABA tasks](https://github.com/estvita/separator/blob/main/separator/waba/tasks.py): `separator/waba/tasks.py`
- [WhatsApp Web API](https://github.com/estvita/separator/blob/main/separator/waweb/api/views.py): `separator/waweb/api/views.py`
- [WhatsApp Web tasks](https://github.com/estvita/separator/blob/main/separator/waweb/tasks.py): `separator/waweb/tasks.py`
- [WhatsApp Web data](https://github.com/estvita/separator/blob/main/separator/waweb/models.py): `separator/waweb/models.py`

### Other integrations

- [OLX integration](https://github.com/estvita/separator/tree/main/separator/olx): `separator/olx`
- [AsterX telephony](https://github.com/estvita/separator/tree/main/separator/asterx): `separator/asterx`
- [VoIP extensions](https://github.com/estvita/separator/tree/main/separator/voip): `separator/voip`
- [BitBot connector](https://github.com/estvita/separator/tree/main/separator/bitbot): `separator/bitbot`

### Shared runtime

- [Plans and trials](https://github.com/estvita/separator/blob/main/separator/home/models.py): `separator/home/models.py`

### Other components

- **User**
- **External platforms**

## Connections

- User → API router: sends requests (evidence: `README.md`)
- API router → Bitrix API: routes to (evidence: `config/api_router.py`)
- API router → WABA webhook: routes to (evidence: `config/api_router.py`)
- API router → WhatsApp Web API: routes to (evidence: `config/api_router.py`)
- API router → User accounts: routes to (evidence: `config/api_router.py`)
- Bitrix API → Portal data: reads and updates (evidence: `separator/bitrix/api/views.py`)
- Bitrix tasks → Bitrix client: calls (evidence: `separator/bitrix/tasks.py`)
- Bitrix tasks → Portal data: loads portal data (evidence: `separator/bitrix/tasks.py`)
- WABA webhook → WABA messaging: delegates to (evidence: `separator/waba/api/views.py`)
- WABA webhook → WABA tasks: schedules (evidence: `separator/waba/api/views.py`)
- WABA tasks → WABA messaging: uses utilities (evidence: `separator/waba/tasks.py`)
- WhatsApp Web API → WhatsApp Web tasks: dispatches events (evidence: `separator/waweb/api/views.py`)
- WhatsApp Web tasks → WhatsApp Web data: updates session data (evidence: `separator/waweb/tasks.py`)
- WhatsApp Web tasks → Bitrix tasks: forwards messages (evidence: `separator/waweb/tasks.py`)
- WABA messaging → External platforms: connects to WhatsApp (evidence: `README.md`)
- OLX integration → External platforms: connects to OLX (evidence: `README.md`)
- AsterX telephony → External platforms: integrates with Asterisk (evidence: `README.md`)
- VoIP extensions → External platforms: integrates with PBX (evidence: `separator/voip/tasks.py`)
- BitBot connector → External platforms: connects chatbots (evidence: `README.md`)
- User accounts → Plans and trials: supports account services
