# xenotrix-technologies/xenoerp architecture

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

- Interactive diagram: https://gitdiagram.com/xenotrix-technologies/xenoerp
- Repository: https://github.com/xenotrix-technologies/xenoerp

## Overview

XenoERP is a modular Django ERP/CRM for agency and service-business operations. The principal workflow is staff entering through the unified CRM routes, managing leads through client/project work, and handling related activity, support, marketing, content, finance, and HR in domain apps. Core provides organization, identity, and permission foundations. The README documents capabilities and route aggregation; sampled source confirms selected model relationships and WhatsApp message logging, but most runtime handlers and URL wiring were not excerpted, so those links are documented rather than inferred from imports.

Main entry points: [`crm/urls.py`](https://github.com/xenotrix-technologies/xenoerp/blob/main/crm/urls.py) (CRM gateway), [`leads/views.py`](https://github.com/xenotrix-technologies/xenoerp/blob/main/leads/views.py) (Lead pipeline), [`activities/models.py`](https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/models.py) (Activity records), [`projects/views.py`](https://github.com/xenotrix-technologies/xenoerp/blob/main/projects/views.py) (Clients and agreements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["Gateway and access"]
  node_crm_gateway["CRM gateway<br/>[urls.py]"]
  node_identity[("Organization and access<br/>[models.py]")]
end

subgraph group_sales["Sales and delivery"]
  node_leads["Lead pipeline<br/>[views.py]"]
  node_services["Service catalog<br/>[views.py]"]
  node_projects["Clients and agreements<br/>[views.py]"]
  node_support["Customer support<br/>[views.py]"]
end

subgraph group_operations["Work operations"]
  node_activities["Tasks and calendar<br/>[views.py]"]
  node_activity_data[("Activity records<br/>[models.py]")]
  node_campaigns["Campaign intelligence<br/>[views.py]"]
  node_content["Content production<br/>[views.py]"]
end

subgraph group_business["Business management"]
  node_finance["Finance ledgers<br/>[views.py]"]
  node_invoices["Invoices and payments<br/>[invoice_views.py]"]
  node_documents["Quotation documents<br/>[document_views.py]"]
  node_finance_data[("Finance records<br/>[models.py]")]
  node_hr["Human resources<br/>[views.py]"]
end

subgraph group_platform["External services"]
  node_whatsapp["WhatsApp client"]
end

node_staff(("Staff user"))
node_meta{{"Meta WhatsApp API"}}

node_staff -->|"opens routes"| node_crm_gateway
node_crm_gateway -.->|"uses access foundation"| node_identity
node_crm_gateway -->|"routes to"| node_leads
node_crm_gateway -->|"routes to"| node_services
node_crm_gateway -->|"routes to"| node_projects
node_crm_gateway -->|"routes to"| node_support
node_crm_gateway -->|"routes to"| node_activities
node_crm_gateway -->|"routes to"| node_campaigns
node_crm_gateway -->|"routes to"| node_content
node_crm_gateway -->|"routes to"| node_finance
node_crm_gateway -->|"routes to"| node_invoices
node_crm_gateway -->|"routes to"| node_documents
node_crm_gateway -->|"routes to"| node_hr
node_leads -->|"checks organization"| node_identity
node_leads -->|"selects service"| node_services
node_leads -->|"promotes client"| node_projects
node_projects -->|"uses catalog"| node_services
node_activities -.->|"records activity"| node_activity_data
node_whatsapp -->|"sends messages"| node_meta
node_whatsapp -->|"logs messages"| node_activity_data
node_support -.->|"logs interactions"| node_activity_data
node_finance -.->|"updates ledgers"| node_finance_data
node_invoices -.->|"tracks payments"| node_finance_data
node_documents -->|"stores quotations"| node_finance_data
node_hr -.->|"references events"| node_activity_data

click node_crm_gateway "https://github.com/xenotrix-technologies/xenoerp/blob/main/crm/urls.py"
click node_identity "https://github.com/xenotrix-technologies/xenoerp/blob/main/core/models.py"
click node_leads "https://github.com/xenotrix-technologies/xenoerp/blob/main/leads/views.py"
click node_services "https://github.com/xenotrix-technologies/xenoerp/blob/main/services/views.py"
click node_projects "https://github.com/xenotrix-technologies/xenoerp/blob/main/projects/views.py"
click node_support "https://github.com/xenotrix-technologies/xenoerp/blob/main/support/views.py"
click node_activities "https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/views.py"
click node_activity_data "https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/models.py"
click node_campaigns "https://github.com/xenotrix-technologies/xenoerp/blob/main/campaigns/views.py"
click node_content "https://github.com/xenotrix-technologies/xenoerp/blob/main/content_tracker/views.py"
click node_finance "https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/views.py"
click node_invoices "https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/invoice_views.py"
click node_documents "https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/document_views.py"
click node_finance_data "https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/models.py"
click node_hr "https://github.com/xenotrix-technologies/xenoerp/blob/main/hr/views.py"
click node_whatsapp "https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/whatsapp_service.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_crm_gateway,node_identity,node_staff toneBlue
class node_leads,node_services,node_projects,node_support toneAmber
class node_activities,node_activity_data,node_campaigns,node_content,node_meta toneMint
class node_finance,node_invoices,node_documents,node_finance_data,node_hr toneRose
class node_whatsapp toneIndigo
```

## Components

### Gateway and access

- [CRM gateway](https://github.com/xenotrix-technologies/xenoerp/blob/main/crm/urls.py): `crm/urls.py`
- [Organization and access](https://github.com/xenotrix-technologies/xenoerp/blob/main/core/models.py): `core/models.py`

### Sales and delivery

- [Lead pipeline](https://github.com/xenotrix-technologies/xenoerp/blob/main/leads/views.py): `leads/views.py`
- [Service catalog](https://github.com/xenotrix-technologies/xenoerp/blob/main/services/views.py): `services/views.py`
- [Clients and agreements](https://github.com/xenotrix-technologies/xenoerp/blob/main/projects/views.py): `projects/views.py`
- [Customer support](https://github.com/xenotrix-technologies/xenoerp/blob/main/support/views.py): `support/views.py`

### Work operations

- [Tasks and calendar](https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/views.py): `activities/views.py`
- [Activity records](https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/models.py): `activities/models.py`
- [Campaign intelligence](https://github.com/xenotrix-technologies/xenoerp/blob/main/campaigns/views.py): `campaigns/views.py`
- [Content production](https://github.com/xenotrix-technologies/xenoerp/blob/main/content_tracker/views.py): `content_tracker/views.py`

### Business management

- [Finance ledgers](https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/views.py): `finance/views.py`
- [Invoices and payments](https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/invoice_views.py): `finance/invoice_views.py`
- [Quotation documents](https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/document_views.py): `finance/document_views.py`
- [Finance records](https://github.com/xenotrix-technologies/xenoerp/blob/main/finance/models.py): `finance/models.py`
- [Human resources](https://github.com/xenotrix-technologies/xenoerp/blob/main/hr/views.py): `hr/views.py`

### External services

- [WhatsApp client](https://github.com/xenotrix-technologies/xenoerp/blob/main/activities/whatsapp_service.py): `activities/whatsapp_service.py`

### Other components

- **Staff user**
- **Meta WhatsApp API**

## Connections

- Staff user → CRM gateway: opens routes
- CRM gateway → Organization and access: uses access foundation
- CRM gateway → Lead pipeline: routes to
- CRM gateway → Service catalog: routes to
- CRM gateway → Clients and agreements: routes to
- CRM gateway → Customer support: routes to
- CRM gateway → Tasks and calendar: routes to
- CRM gateway → Campaign intelligence: routes to
- CRM gateway → Content production: routes to
- CRM gateway → Finance ledgers: routes to
- CRM gateway → Invoices and payments: routes to
- CRM gateway → Quotation documents: routes to
- CRM gateway → Human resources: routes to
- Lead pipeline → Organization and access: checks organization (evidence: `leads/views.py`)
- Lead pipeline → Service catalog: selects service (evidence: `leads/views.py`)
- Lead pipeline → Clients and agreements: promotes client (evidence: `leads/views.py`)
- Clients and agreements → Service catalog: uses catalog (evidence: `projects/views.py`)
- Tasks and calendar → Activity records: records activity
- WhatsApp client → Meta WhatsApp API: sends messages (evidence: `activities/whatsapp_service.py`)
- WhatsApp client → Activity records: logs messages (evidence: `activities/whatsapp_service.py`)
- Customer support → Activity records: logs interactions (evidence: `support/views.py`)
- Finance ledgers → Finance records: updates ledgers
- Invoices and payments → Finance records: tracks payments
- Quotation documents → Finance records: stores quotations (evidence: `finance/document_views.py`)
- Human resources → Activity records: references events (evidence: `hr/views.py`)
