# krayin/laravel-crm architecture

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

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

## Overview

Krayin is a modular Laravel CRM for managing customer relationships and the customer lifecycle. The principal workflow is administering leads through configurable pipelines and stages; the sampled controller validates requests and delegates pipeline changes to its repository, which creates or updates stages. The README also documents dashboard reporting, custom attributes, email parsing, and the admin panel, while the tree shows contacts, products, quotes, marketing, workflows, web forms, and importing. Those major capabilities are represented, but their internal wiring is not inferred from the limited sampled source.

Main entry points: [`packages/Webkul/Admin/src/Http/Controllers/Settings/PipelineController.php`](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Controllers/Settings/PipelineController.php) (Pipeline management), [`packages/Webkul/Lead/src/Repositories/PipelineRepository.php`](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Lead/src/Repositories/PipelineRepository.php) (Pipeline repository), [`config/database.php`](https://github.com/krayin/laravel-crm/blob/2.2/config/database.php) (Database configuration), [`packages/Webkul/DataTransfer/src/Helpers/Importers/Persons/Storage.php`](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Persons/Storage.php) (Person import lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sales["Sales lifecycle"]
  node_pipeline_admin["Pipeline management"]
  node_pipeline_repo["Pipeline repository"]
  node_pipeline_model["Pipeline model<br/>[Pipeline.php]"]
  node_pipeline_form["Pipeline validation<br/>[PipelineForm.php]"]
  node_pipeline_grid["Pipeline listing"]
  node_lead_crm["Lead management"]
  node_quotes["Quotes"]
end

subgraph group_customer["Customer records"]
  node_contacts["People and organizations"]
  node_products["Product catalog"]
end

subgraph group_engagement["Engagement"]
  node_activities["Activities and files"]
  node_email["Email and parsing"]
  node_marketing["Campaigns and events"]
end

subgraph group_admin["Admin and insights"]
  node_dashboard["Dashboard and reports"]
  node_customization["Custom attributes"]
  node_admin_settings["CRM settings"]
  node_automation["Workflows and forms"]
  node_webforms["Web forms"]
end

subgraph group_integration["Data and integrations"]
  node_data_import["Data transfer"]
  node_person_import_storage["Person import lookup<br/>[Storage.php]"]
  node_lead_import_storage["Lead import lookup<br/>[Storage.php]"]
  node_product_import_storage["SKU import lookup<br/>[SKUStorage.php]"]
  node_database_config["Database configuration<br/>[database.php]"]
end

node_admin_user(("CRM administrator"))

node_admin_user -->|"manages pipeline"| node_pipeline_admin
node_pipeline_admin -->|"validates request"| node_pipeline_form
node_pipeline_admin -->|"creates or updates"| node_pipeline_repo
node_pipeline_repo -->|"persists pipeline"| node_pipeline_model
node_pipeline_admin -->|"processes listing"| node_pipeline_grid
node_pipeline_admin -->|"queries records"| node_database_config
node_pipeline_repo -->|"persists stages"| node_database_config
node_person_import_storage -->|"loads person records"| node_contacts
node_lead_import_storage -->|"loads lead records"| node_lead_crm
node_product_import_storage -->|"loads product records"| node_products

click node_pipeline_admin "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Controllers/Settings/PipelineController.php"
click node_pipeline_repo "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Lead/src/Repositories/PipelineRepository.php"
click node_pipeline_model "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Lead/src/Models/Pipeline.php"
click node_pipeline_form "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Requests/PipelineForm.php"
click node_pipeline_grid "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/DataGrids/Settings/PipelineDataGrid.php"
click node_lead_crm "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Lead/src"
click node_contacts "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Contact/src"
click node_products "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Product/src"
click node_quotes "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Quote/src"
click node_activities "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Activity/src"
click node_email "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Email/src"
click node_marketing "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Marketing/src"
click node_dashboard "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php"
click node_customization "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Attribute/src"
click node_admin_settings "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Routes/Admin/settings-routes.php"
click node_automation "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Automation/src"
click node_webforms "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/WebForm/src"
click node_data_import "https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/DataTransfer/src"
click node_person_import_storage "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Persons/Storage.php"
click node_lead_import_storage "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Leads/Storage.php"
click node_product_import_storage "https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Products/SKUStorage.php"
click node_database_config "https://github.com/krayin/laravel-crm/blob/2.2/config/database.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_pipeline_admin,node_pipeline_repo,node_pipeline_model,node_pipeline_form,node_pipeline_grid,node_lead_crm,node_quotes toneBlue
class node_contacts,node_products toneAmber
class node_activities,node_email,node_marketing toneMint
class node_dashboard,node_customization,node_admin_settings,node_automation,node_webforms toneRose
class node_data_import,node_person_import_storage,node_lead_import_storage,node_product_import_storage,node_database_config,node_admin_user toneIndigo
```

## Components

### Sales lifecycle

- [Pipeline management](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Controllers/Settings/PipelineController.php): `packages/Webkul/Admin/src/Http/Controllers/Settings/PipelineController.php`
- [Pipeline repository](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Lead/src/Repositories/PipelineRepository.php): `packages/Webkul/Lead/src/Repositories/PipelineRepository.php`
- [Pipeline model](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Lead/src/Models/Pipeline.php): `packages/Webkul/Lead/src/Models/Pipeline.php`
- [Pipeline validation](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Requests/PipelineForm.php): `packages/Webkul/Admin/src/Http/Requests/PipelineForm.php`
- [Pipeline listing](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/DataGrids/Settings/PipelineDataGrid.php): `packages/Webkul/Admin/src/DataGrids/Settings/PipelineDataGrid.php`
- [Lead management](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Lead/src): `packages/Webkul/Lead/src`
- [Quotes](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Quote/src): `packages/Webkul/Quote/src`

### Customer records

- [People and organizations](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Contact/src): `packages/Webkul/Contact/src`
- [Product catalog](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Product/src): `packages/Webkul/Product/src`

### Engagement

- [Activities and files](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Activity/src): `packages/Webkul/Activity/src`
- [Email and parsing](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Email/src): `packages/Webkul/Email/src`
- [Campaigns and events](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Marketing/src): `packages/Webkul/Marketing/src`

### Admin and insights

- [Dashboard and reports](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php): `packages/Webkul/Admin/src/Http/Controllers/DashboardController.php`
- [Custom attributes](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Attribute/src): `packages/Webkul/Attribute/src`
- [CRM settings](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/Admin/src/Routes/Admin/settings-routes.php): `packages/Webkul/Admin/src/Routes/Admin/settings-routes.php`
- [Workflows and forms](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/Automation/src): `packages/Webkul/Automation/src`
- [Web forms](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/WebForm/src): `packages/Webkul/WebForm/src`

### Data and integrations

- [Data transfer](https://github.com/krayin/laravel-crm/tree/2.2/packages/Webkul/DataTransfer/src): `packages/Webkul/DataTransfer/src`
- [Person import lookup](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Persons/Storage.php): `packages/Webkul/DataTransfer/src/Helpers/Importers/Persons/Storage.php`
- [Lead import lookup](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Leads/Storage.php): `packages/Webkul/DataTransfer/src/Helpers/Importers/Leads/Storage.php`
- [SKU import lookup](https://github.com/krayin/laravel-crm/blob/2.2/packages/Webkul/DataTransfer/src/Helpers/Importers/Products/SKUStorage.php): `packages/Webkul/DataTransfer/src/Helpers/Importers/Products/SKUStorage.php`
- [Database configuration](https://github.com/krayin/laravel-crm/blob/2.2/config/database.php): `config/database.php`

### Other components

- **CRM administrator**

## Connections

- CRM administrator → Pipeline management: manages pipeline
- Pipeline management → Pipeline validation: validates request
- Pipeline management → Pipeline repository: creates or updates
- Pipeline repository → Pipeline model: persists pipeline
- Pipeline management → Pipeline listing: processes listing
- Pipeline management → Database configuration: queries records
- Pipeline repository → Database configuration: persists stages
- Person import lookup → People and organizations: loads person records
- Lead import lookup → Lead management: loads lead records
- SKU import lookup → Product catalog: loads product records
