# crm-heroes/heroes-crm architecture

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

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

## Overview

Heroes CRM is a Laravel 10 and Vue 3 CRM. A representative user workflow is managing a project pipeline and assigning prospect labels through its API; the README also identifies queued work for integrations, imports, email, documents, media, and SMS. The tree shows broader order, campaign, questionnaire, reporting, and prospect-facing capabilities. Source excerpts establish the pipeline and Pipedrive relationships, but not most unsampled routes or job dispatches, so those branches are shown without inferred call edges.

Main entry points: [`app/Http/Controllers/API/Project/Prospect/PipelineController.php`](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/Prospect/PipelineController.php) (Prospect pipeline API), [`app/Http/Controllers/API/Project/PipelineController.php`](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/PipelineController.php) (Pipeline API), [`app/Models/Project.php`](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Project.php) (Project records), [`app/Models/Pipeline.php`](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Pipeline.php) (Pipeline records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api_ui["API and interface"]
  node_api["Project API"]
  node_pipeline_ui["Pipeline interface<br/>[Pipeline.vue]"]
  node_pipeline_api["Pipeline API"]
  node_prospect_pipeline_api["Prospect pipeline API"]
end

subgraph group_crm_data["CRM records"]
  node_project[("Project records<br/>[Project.php]")]
  node_prospect[("Prospect records<br/>[Prospect.php]")]
  node_pipeline[("Pipeline records<br/>[Pipeline.php]")]
  node_label[("Label records<br/>[Label.php]")]
  node_role[("Role records<br/>[Role.php]")]
  node_user_records[("User records<br/>[User.php]")]
  node_order[("Order records<br/>[Order.php]")]
  node_interaction[("Interaction records<br/>[Interaction.php]")]
  node_import[("Import records<br/>[Import.php]")]
end

subgraph group_workflows["CRM workflows"]
  node_campaigns["Campaign automation<br/>[Campaign.php]"]
  node_documents["Documents and invoices"]
  node_questionnaires["Questionnaires"]
  node_imports["Prospect import"]
  node_prospect_label_event["Prospect label event"]
end

subgraph group_integrations["External integrations"]
  node_pipedrive_api["Pipedrive API"]
  node_pipedrive_service["Pipedrive client<br/>[Pipedrive.php]"]
  node_pipedrive_account[("Pipedrive accounts")]
  node_google["Google integrations"]
  node_messaging["Messaging integrations"]
  node_pipedrive_jobs["Pipedrive jobs<br/>[PersonAdd.php]"]
end

subgraph group_analytics["Analytics and tracking"]
  node_stats["CRM statistics<br/>[StatController.php]"]
  node_filters["Query filters<br/>[Filters.php]"]
  node_project_settings["Project settings<br/>[ProjectSetting.php]"]
  node_tracker["Activity tracking<br/>[Tracker.php]"]
  node_tracker_route["Route tracking<br/>[Route.php]"]
end

node_user(("CRM user"))

node_pipeline_api -->|"queries project"| node_project
node_pipeline_api -->|"reads and updates"| node_pipeline
node_project -->|"has many"| node_pipeline
node_pipeline -->|"has labels"| node_label
node_prospect_pipeline_api -->|"updates labels"| node_prospect
node_prospect_pipeline_api -->|"checks membership"| node_pipeline
node_prospect_pipeline_api -->|"attaches label"| node_label
node_prospect_pipeline_api -->|"validates project"| node_project
node_prospect_pipeline_api -->|"dispatches event"| node_prospect_label_event
node_pipedrive_api -->|"uses client"| node_pipedrive_service
node_pipedrive_api -->|"uses account"| node_pipedrive_account
node_pipedrive_api -->|"dispatches jobs"| node_pipedrive_jobs
node_prospect -->|"applies filters"| node_filters
node_project -->|"applies filters"| node_filters
node_tracker_route -->|"uses tracker"| node_tracker
node_user -.->|"uses interface"| node_pipeline_ui
node_pipeline_ui -.->|"requests pipeline data"| node_pipeline_api
node_api -.->|"routes requests"| node_pipeline_api

click node_api "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/ProjectController.php"
click node_pipeline_ui "https://github.com/crm-heroes/heroes-crm/blob/main/resources/js/components/pipeline/list/Pipeline.vue"
click node_pipeline_api "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/PipelineController.php"
click node_prospect_pipeline_api "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/Prospect/PipelineController.php"
click node_project "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Project.php"
click node_prospect "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Prospect.php"
click node_pipeline "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Pipeline.php"
click node_label "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Label.php"
click node_role "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Role.php"
click node_user_records "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/User.php"
click node_order "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Order.php"
click node_interaction "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Interaction.php"
click node_import "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Import.php"
click node_campaigns "https://github.com/crm-heroes/heroes-crm/blob/main/app/Console/Commands/Campaign.php"
click node_documents "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/DocumentController.php"
click node_questionnaires "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/QuestionnaireController.php"
click node_imports "https://github.com/crm-heroes/heroes-crm/blob/main/app/Jobs/ImportProspects.php"
click node_pipedrive_api "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/PipedriveController.php"
click node_pipedrive_service "https://github.com/crm-heroes/heroes-crm/blob/main/app/Services/Pipedrive.php"
click node_pipedrive_account "https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/PipedriveAccount.php"
click node_google "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/Google/DriveController.php"
click node_messaging "https://github.com/crm-heroes/heroes-crm/blob/main/app/Channels/UltramsgChannel.php"
click node_stats "https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/StatController.php"
click node_filters "https://github.com/crm-heroes/heroes-crm/blob/main/app/Filters/Filters.php"
click node_project_settings "https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/ProjectSetting.php"
click node_tracker "https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/Tracker/Tracker.php"
click node_tracker_route "https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/Tracker/Route.php"
click node_prospect_label_event "https://github.com/crm-heroes/heroes-crm/blob/main/app/Events/ProspectLabelAttached.php"
click node_pipedrive_jobs "https://github.com/crm-heroes/heroes-crm/blob/main/app/Jobs/Pipedrive/PersonAdd.php"

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,node_pipeline_ui,node_pipeline_api,node_prospect_pipeline_api,node_user toneBlue
class node_project,node_prospect,node_pipeline,node_label,node_role,node_user_records,node_order,node_interaction,node_import toneAmber
class node_campaigns,node_documents,node_questionnaires,node_imports,node_prospect_label_event toneMint
class node_pipedrive_api,node_pipedrive_service,node_pipedrive_account,node_google,node_messaging,node_pipedrive_jobs toneRose
class node_stats,node_filters,node_project_settings,node_tracker,node_tracker_route toneIndigo
```

## Components

### API and interface

- [Project API](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/ProjectController.php): `app/Http/Controllers/API/ProjectController.php`
- [Pipeline interface](https://github.com/crm-heroes/heroes-crm/blob/main/resources/js/components/pipeline/list/Pipeline.vue): `resources/js/components/pipeline/list/Pipeline.vue`
- [Pipeline API](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/PipelineController.php): `app/Http/Controllers/API/Project/PipelineController.php`
- [Prospect pipeline API](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/Prospect/PipelineController.php): `app/Http/Controllers/API/Project/Prospect/PipelineController.php`

### CRM records

- [Project records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Project.php): `app/Models/Project.php`
- [Prospect records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Prospect.php): `app/Models/Prospect.php`
- [Pipeline records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Pipeline.php): `app/Models/Pipeline.php`
- [Label records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Label.php): `app/Models/Label.php`
- [Role records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Role.php): `app/Models/Role.php`
- [User records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/User.php): `app/Models/User.php`
- [Order records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Interaction records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Interaction.php): `app/Models/Interaction.php`
- [Import records](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/Import.php): `app/Models/Import.php`

### CRM workflows

- [Campaign automation](https://github.com/crm-heroes/heroes-crm/blob/main/app/Console/Commands/Campaign.php): `app/Console/Commands/Campaign.php`
- [Documents and invoices](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/DocumentController.php): `app/Http/Controllers/API/Project/DocumentController.php`
- [Questionnaires](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/QuestionnaireController.php): `app/Http/Controllers/API/Project/QuestionnaireController.php`
- [Prospect import](https://github.com/crm-heroes/heroes-crm/blob/main/app/Jobs/ImportProspects.php): `app/Jobs/ImportProspects.php`
- [Prospect label event](https://github.com/crm-heroes/heroes-crm/blob/main/app/Events/ProspectLabelAttached.php): `app/Events/ProspectLabelAttached.php`

### External integrations

- [Pipedrive API](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/PipedriveController.php): `app/Http/Controllers/API/Project/PipedriveController.php`
- [Pipedrive client](https://github.com/crm-heroes/heroes-crm/blob/main/app/Services/Pipedrive.php): `app/Services/Pipedrive.php`
- [Pipedrive accounts](https://github.com/crm-heroes/heroes-crm/blob/main/app/Models/PipedriveAccount.php): `app/Models/PipedriveAccount.php`
- [Google integrations](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/Google/DriveController.php): `app/Http/Controllers/Google/DriveController.php`
- [Messaging integrations](https://github.com/crm-heroes/heroes-crm/blob/main/app/Channels/UltramsgChannel.php): `app/Channels/UltramsgChannel.php`
- [Pipedrive jobs](https://github.com/crm-heroes/heroes-crm/blob/main/app/Jobs/Pipedrive/PersonAdd.php): `app/Jobs/Pipedrive/PersonAdd.php`

### Analytics and tracking

- [CRM statistics](https://github.com/crm-heroes/heroes-crm/blob/main/app/Http/Controllers/API/Project/StatController.php): `app/Http/Controllers/API/Project/StatController.php`
- [Query filters](https://github.com/crm-heroes/heroes-crm/blob/main/app/Filters/Filters.php): `app/Filters/Filters.php`
- [Project settings](https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/ProjectSetting.php): `app/Utils/ProjectSetting.php`
- [Activity tracking](https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/Tracker/Tracker.php): `app/Utils/Tracker/Tracker.php`
- [Route tracking](https://github.com/crm-heroes/heroes-crm/blob/main/app/Utils/Tracker/Route.php): `app/Utils/Tracker/Route.php`

### Other components

- **CRM user**

## Connections

- Pipeline API → Project records: queries project (evidence: `app/Http/Controllers/API/Project/PipelineController.php`)
- Pipeline API → Pipeline records: reads and updates (evidence: `app/Http/Controllers/API/Project/PipelineController.php`)
- Project records → Pipeline records: has many (evidence: `app/Models/Project.php`)
- Pipeline records → Label records: has labels (evidence: `app/Models/Pipeline.php`)
- Prospect pipeline API → Prospect records: updates labels (evidence: `app/Http/Controllers/API/Project/Prospect/PipelineController.php`)
- Prospect pipeline API → Pipeline records: checks membership (evidence: `app/Http/Controllers/API/Project/Prospect/PipelineController.php`)
- Prospect pipeline API → Label records: attaches label (evidence: `app/Http/Controllers/API/Project/Prospect/PipelineController.php`)
- Prospect pipeline API → Project records: validates project (evidence: `app/Http/Controllers/API/Project/Prospect/PipelineController.php`)
- Prospect pipeline API → Prospect label event: dispatches event (evidence: `app/Http/Controllers/API/Project/Prospect/PipelineController.php`)
- Pipedrive API → Pipedrive client: uses client (evidence: `app/Http/Controllers/API/Project/PipedriveController.php`)
- Pipedrive API → Pipedrive accounts: uses account (evidence: `app/Http/Controllers/API/Project/PipedriveController.php`)
- Pipedrive API → Pipedrive jobs: dispatches jobs (evidence: `app/Http/Controllers/API/Project/PipedriveController.php`)
- Prospect records → Query filters: applies filters (evidence: `app/Models/Prospect.php`)
- Project records → Query filters: applies filters (evidence: `app/Models/Project.php`)
- Route tracking → Activity tracking: uses tracker (evidence: `app/Utils/Tracker/Route.php`)
- CRM user → Pipeline interface: uses interface
- Pipeline interface → Pipeline API: requests pipeline data
- Project API → Pipeline API: routes requests
