Overview
Discover what makes EspoCRM powerful
EspoCRM is a lightweight, open‑source Customer Relationship Management platform that exposes its core logic through a RESTful API and a modern single‑page application (SPA) front end. From a developer’s standpoint, it functions as both an out‑of‑the‑box CRM and a pluggable framework for building custom business applications. The codebase is written in **PHP 8.2+**, leveraging object‑oriented principles, SOLID design, and a dependency injection container that allows for seamless extension of services. The SPA is built with **Vue.js** (or a similar progressive framework) and communicates with the backend via JSON over HTTPS, making it straightforward to integrate into existing front‑end stacks or replace the UI entirely.
Entity Management
Workflow Engine
Security Model
API Extensibility
Overview
EspoCRM is a lightweight, open‑source Customer Relationship Management platform that exposes its core logic through a RESTful API and a modern single‑page application (SPA) front end. From a developer’s standpoint, it functions as both an out‑of‑the‑box CRM and a pluggable framework for building custom business applications. The codebase is written in PHP 8.2+, leveraging object‑oriented principles, SOLID design, and a dependency injection container that allows for seamless extension of services. The SPA is built with Vue.js (or a similar progressive framework) and communicates with the backend via JSON over HTTPS, making it straightforward to integrate into existing front‑end stacks or replace the UI entirely.
Architecture
EspoCRM’s architecture is split into three logical layers:
- Presentation Layer – A Vue.js SPA that renders entities, dashboards, and workflows in a responsive UI. It consumes the REST API and uses WebSocket for real‑time updates.
- Application Layer – A PHP MVC framework that implements business rules, data validation, and security. It is heavily typed, uses interfaces for core services (e.g.,
EntityManager,EventDispatcher), and follows a modular plugin system where each extension can ship its own controllers, views, and database migrations. - Data Layer – Supports MySQL 8+/MariaDB 10+ and PostgreSQL 15+ via Doctrine‑like ORM. Entities are defined in YAML/JSON metadata, allowing developers to add new fields or relationships without touching SQL. The framework also provides a flexible caching layer (Redis, Memcached) and supports multi‑tenant deployments by scoping data to a
companyId.
The REST API is versioned, stateless, and fully documented (OpenAPI/Swagger). It exposes CRUD endpoints for all entities, as well as custom actions defined by extensions. Webhooks can be configured to notify external services on entity changes, and an event bus allows internal modules to react to lifecycle events.
Core Capabilities
- Entity Management – Define custom entities, fields (text, int, datetime, lookup), and relationships (one‑to‑many, many‑to‑many) via metadata. The ORM auto‑generates SQL migrations.
- Workflow Engine – Declarative business rules that trigger on create/update/delete, support email templates, task creation, and external API calls.
- Security Model – Role‑based access control (RBAC) with field‑level permissions, ownership rules, and user‑group hierarchies.
- API Extensibility – Developers can register new REST endpoints, add query parameters, and expose custom business logic. The SDK is available in PHP, JavaScript, and other languages.
- UI Customization – Layouts, panels, buttons, and dashboards can be modified through the admin UI or programmatically via metadata. Custom widgets can be added to the SPA.
- Reporting & Analytics – Built‑in reporting engine with pivot tables and export to CSV/PDF, plus integration hooks for BI tools.
Deployment & Infrastructure
EspoCRM is designed to run on any LAMP/LEMP stack. It ships with a Docker Compose configuration that includes the PHP FPM container, Nginx reverse proxy, and optional Redis. Traefik integration is also provided for dynamic routing in micro‑service environments. For production, the recommended stack includes:
- PHP 8.2+ with OPCache and Xdebug disabled.
- MySQL/MariaDB 8+/10+ or PostgreSQL 15+ with proper replication for high availability.
- Redis as a session store and cache backend.
- Nginx/Traefik as the HTTP gateway, enabling HTTPS termination and load balancing.
- Cron jobs for scheduled workflows and email queues.
The application scales horizontally by running multiple PHP workers behind a load balancer, while the database layer can be scaled using master‑slave replication or read replicas. Because the SPA is stateless, it can be served from a CDN to reduce latency.
Integration & Extensibility
EspoCRM’s plugin system is the cornerstone of its extensibility. Each extension resides in a separate directory, containing:
- Metadata – YAML/JSON that defines new entities or modifies existing ones.
- Controllers & Services – PHP classes that hook into the DI container.
- Views – Vue components or HTML templates for custom UI elements.
- Migrations – SQL scripts that run on install.
The framework also exposes a robust event bus (EventManager) where extensions can subscribe to Entity::beforeSave, Entity::afterDelete, etc. Webhooks are configurable via the admin UI, allowing developers to publish events to external systems (e.g., Slack, Zapier, custom webhooks). Additionally, EspoCRM can act as an OAuth2 provider or resource server, enabling single‑sign‑on with external identity providers.
Developer Experience
EspoCRM’s documentation is split into admin, user, and developer sections, with a dedicated Development guide that walks through creating extensions, testing hooks, and debugging. The codebase follows PSR‑4 autoloading and uses Composer for dependency management, making it familiar to PHP developers. Community support is active on GitHub, a dedicated forum, and Slack channels, while the open‑source license (MIT) removes
Open SourceReady to get started?
Join the community and start self-hosting EspoCRM today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Reaparr
Cross‑platform Plex media downloader that syncs libraries
HAProxy
High‑performance TCP/HTTP load balancer for reliable scaling
Liwan
Privacy‑First Web Analytics in a Single Binary
VoucherVault
Digital voucher and loyalty card manager
Music Player Daemon
Remote, flexible music server for desktop and network playback
code-server
Self-hosted development-tools
