# ratmir26/crm architecture

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

- Interactive diagram: https://gitdiagram.com/ratmir26/crm
- Repository: https://github.com/ratmir26/crm

## Overview

Frappe CRM supports sales teams managing leads through deals, with customer communications and follow-up activities in a consolidated workflow. Its Vue application presents CRM pages, while Frappe server modules expose APIs and maintain domain records. Documented capabilities also include custom and Kanban views, dashboards, SLAs, telephony and WhatsApp integrations, ERPNext connectivity, Facebook lead syncing, and an LMS area. The available excerpts show selected frontend boot, API, utility, SLA, and integration behavior; links to unsampled subsystems are documented or marked unverified.

Main entry points: [`frontend/src/App.vue`](https://github.com/ratmir26/crm/blob/develop/frontend/src/App.vue) (CRM App), [`crm/api`](https://github.com/ratmir26/crm/tree/develop/crm/api) (CRM APIs), [`crm/fcrm/doctype/crm_lead/crm_lead.py`](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_lead/crm_lead.py) (Lead Management), [`crm/api/activities.py`](https://github.com/ratmir26/crm/blob/develop/crm/api/activities.py) (Activities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["CRM Experience"]
  node_web_app["CRM App<br/>[App.vue]"]
  node_desktop["Desktop Layout<br/>[DesktopLayout.vue]"]
  node_mobile["Mobile Layout<br/>[MobileLayout.vue]"]
  node_frontend_boot["Frontend Bootstrap<br/>[main.js]"]
  node_crm_page["CRM Page Context<br/>[crm.py]"]
  node_api["CRM APIs"]
end

subgraph group_sales["Sales Records"]
  node_leads["Lead Management<br/>[crm_lead.py]"]
  node_deals["Deal Management<br/>[crm_deal.py]"]
  node_dashboard["Dashboards<br/>[crm_dashboard.py]"]
  node_views["Custom Views"]
  node_products["Product Records<br/>[crm_products.py]"]
end

subgraph group_engagement["Engagement"]
  node_activities["Activities<br/>[activities.py]"]
  node_tasks["Task Records<br/>[crm_task.py]"]
  node_sla["Service Levels"]
  node_telephony["Call Integration"]
  node_twilio["Twilio Handler<br/>[twilio_handler.py]"]
  node_exotel["Exotel Handler<br/>[handler.py]"]
  node_whatsapp["WhatsApp API<br/>[whatsapp.py]"]
end

subgraph group_platform["Extensions"]
  node_lead_sync["Facebook Lead Sync"]
  node_erpnext["ERPNext Integration"]
  node_lms["Learning Management"]
end

node_sales_user(("Sales Team"))
node_database[("Frappe Database")]
node_twilio_service{{"Twilio"}}
node_exotel_service{{"Exotel"}}
node_whatsapp_service{{"Frappe WhatsApp"}}
node_erpnext_service{{"ERPNext"}}
node_facebook{{"Facebook"}}

node_sales_user -->|"uses"| node_web_app
node_frontend_boot -->|"mounts"| node_web_app
node_web_app -->|"selects"| node_desktop
node_web_app -->|"selects"| node_mobile
node_web_app -.->|"loads context"| node_crm_page
node_crm_page -->|"checks permission"| node_api
node_api -.->|"serves lead workflow"| node_leads
node_api -.->|"serves deal workflow"| node_deals
node_api -.->|"serves activities"| node_activities
node_sales_user -->|"manages"| node_leads
node_leads -.->|"converts"| node_deals
node_sales_user -->|"customizes"| node_views
node_sales_user -.->|"views"| node_dashboard
node_sales_user -->|"records follow-up"| node_activities
node_activities -.->|"tracks tasks"| node_tasks
node_sla -.->|"updates records"| node_database
node_telephony -.->|"routes calls"| node_twilio
node_twilio -->|"connects calls"| node_twilio_service
node_exotel -->|"handles calls"| node_exotel_service
node_whatsapp -->|"sends messages"| node_whatsapp_service
node_erpnext -->|"integrates"| node_erpnext_service
node_lead_sync -.->|"imports leads"| node_facebook
node_sales_user -.->|"uses"| node_lms
node_sales_user -.->|"manages"| node_products

click node_web_app "https://github.com/ratmir26/crm/blob/develop/frontend/src/App.vue"
click node_desktop "https://github.com/ratmir26/crm/blob/develop/frontend/src/components/Layouts/DesktopLayout.vue"
click node_mobile "https://github.com/ratmir26/crm/blob/develop/frontend/src/components/Layouts/MobileLayout.vue"
click node_frontend_boot "https://github.com/ratmir26/crm/blob/develop/frontend/src/main.js"
click node_crm_page "https://github.com/ratmir26/crm/blob/develop/crm/www/crm.py"
click node_api "https://github.com/ratmir26/crm/tree/develop/crm/api"
click node_leads "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_lead/crm_lead.py"
click node_deals "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_deal/crm_deal.py"
click node_dashboard "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py"
click node_views "https://github.com/ratmir26/crm/tree/develop/crm/fcrm/doctype/crm_view_settings"
click node_products "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_products/crm_products.py"
click node_activities "https://github.com/ratmir26/crm/blob/develop/crm/api/activities.py"
click node_tasks "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_task/crm_task.py"
click node_sla "https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_service_level_agreement/crm_service_level_agreement.py"
click node_telephony "https://github.com/ratmir26/crm/tree/develop/crm/integrations"
click node_twilio "https://github.com/ratmir26/crm/blob/develop/crm/integrations/twilio/twilio_handler.py"
click node_exotel "https://github.com/ratmir26/crm/blob/develop/crm/integrations/exotel/handler.py"
click node_whatsapp "https://github.com/ratmir26/crm/blob/develop/crm/api/whatsapp.py"
click node_lead_sync "https://github.com/ratmir26/crm/tree/develop/crm/lead_syncing"
click node_erpnext "https://github.com/ratmir26/crm/tree/develop/crm/integrations/erpnext"
click node_lms "https://github.com/ratmir26/crm/tree/develop/crm/lms"

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_desktop,node_mobile,node_frontend_boot,node_crm_page,node_api toneBlue
class node_leads,node_deals,node_dashboard,node_views,node_products,node_database toneAmber
class node_activities,node_tasks,node_sla,node_telephony,node_twilio,node_exotel,node_whatsapp toneMint
class node_lead_sync,node_erpnext,node_lms toneRose
class node_sales_user,node_twilio_service,node_exotel_service,node_whatsapp_service,node_erpnext_service,node_facebook toneIndigo
```

## Components

### CRM Experience

- [CRM App](https://github.com/ratmir26/crm/blob/develop/frontend/src/App.vue): `frontend/src/App.vue`
- [Desktop Layout](https://github.com/ratmir26/crm/blob/develop/frontend/src/components/Layouts/DesktopLayout.vue): `frontend/src/components/Layouts/DesktopLayout.vue`
- [Mobile Layout](https://github.com/ratmir26/crm/blob/develop/frontend/src/components/Layouts/MobileLayout.vue): `frontend/src/components/Layouts/MobileLayout.vue`
- [Frontend Bootstrap](https://github.com/ratmir26/crm/blob/develop/frontend/src/main.js): `frontend/src/main.js`
- [CRM Page Context](https://github.com/ratmir26/crm/blob/develop/crm/www/crm.py): `crm/www/crm.py`
- [CRM APIs](https://github.com/ratmir26/crm/tree/develop/crm/api): `crm/api`

### Sales Records

- [Lead Management](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_lead/crm_lead.py): `crm/fcrm/doctype/crm_lead/crm_lead.py`
- [Deal Management](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_deal/crm_deal.py): `crm/fcrm/doctype/crm_deal/crm_deal.py`
- [Dashboards](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_dashboard/crm_dashboard.py): `crm/fcrm/doctype/crm_dashboard/crm_dashboard.py`
- [Custom Views](https://github.com/ratmir26/crm/tree/develop/crm/fcrm/doctype/crm_view_settings): `crm/fcrm/doctype/crm_view_settings`
- [Product Records](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_products/crm_products.py): `crm/fcrm/doctype/crm_products/crm_products.py`

### Engagement

- [Activities](https://github.com/ratmir26/crm/blob/develop/crm/api/activities.py): `crm/api/activities.py`
- [Task Records](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_task/crm_task.py): `crm/fcrm/doctype/crm_task/crm_task.py`
- [Service Levels](https://github.com/ratmir26/crm/blob/develop/crm/fcrm/doctype/crm_service_level_agreement/crm_service_level_agreement.py): `crm/fcrm/doctype/crm_service_level_agreement/crm_service_level_agreement.py`
- [Call Integration](https://github.com/ratmir26/crm/tree/develop/crm/integrations): `crm/integrations`
- [Twilio Handler](https://github.com/ratmir26/crm/blob/develop/crm/integrations/twilio/twilio_handler.py): `crm/integrations/twilio/twilio_handler.py`
- [Exotel Handler](https://github.com/ratmir26/crm/blob/develop/crm/integrations/exotel/handler.py): `crm/integrations/exotel/handler.py`
- [WhatsApp API](https://github.com/ratmir26/crm/blob/develop/crm/api/whatsapp.py): `crm/api/whatsapp.py`

### Extensions

- [Facebook Lead Sync](https://github.com/ratmir26/crm/tree/develop/crm/lead_syncing): `crm/lead_syncing`
- [ERPNext Integration](https://github.com/ratmir26/crm/tree/develop/crm/integrations/erpnext): `crm/integrations/erpnext`
- [Learning Management](https://github.com/ratmir26/crm/tree/develop/crm/lms): `crm/lms`

### Other components

- **Sales Team**
- **Frappe Database**
- **Twilio**
- **Exotel**
- **Frappe WhatsApp**
- **ERPNext**
- **Facebook**

## Connections

- Sales Team → CRM App: uses (evidence: `README.md`)
- Frontend Bootstrap → CRM App: mounts (evidence: `frontend/src/main.js`)
- CRM App → Desktop Layout: selects (evidence: `frontend/src/App.vue`)
- CRM App → Mobile Layout: selects (evidence: `frontend/src/App.vue`)
- CRM App → CRM Page Context: loads context
- CRM Page Context → CRM APIs: checks permission (evidence: `crm/www/crm.py`)
- CRM APIs → Lead Management: serves lead workflow
- CRM APIs → Deal Management: serves deal workflow
- CRM APIs → Activities: serves activities
- Sales Team → Lead Management: manages (evidence: `README.md`)
- Lead Management → Deal Management: converts
- Sales Team → Custom Views: customizes (evidence: `README.md`)
- Sales Team → Dashboards: views
- Sales Team → Activities: records follow-up (evidence: `README.md`)
- Activities → Task Records: tracks tasks
- Service Levels → Frappe Database: updates records
- Call Integration → Twilio Handler: routes calls (evidence: `crm/integrations/twilio/twilio_handler.py`)
- Twilio Handler → Twilio: connects calls (evidence: `README.md`)
- Exotel Handler → Exotel: handles calls (evidence: `README.md`)
- WhatsApp API → Frappe WhatsApp: sends messages (evidence: `README.md`)
- ERPNext Integration → ERPNext: integrates (evidence: `README.md`)
- Facebook Lead Sync → Facebook: imports leads
- Sales Team → Learning Management: uses
- Sales Team → Product Records: manages
