Loading…

Star4.1kBook a meeting

Core Platform

The shared records and services every erxes plugin builds on: organizations and permissions, contacts, products, custom fields and segments, forms and documents, automations, broadcasts, email delivery, and bulk import/export.

Core API (backend/core-api, port 3300) is the always-on service behind the core subgraph. It registers with the gateway the same way a plugin API does, through its own bootstrap in src/main.ts, but holds the platform's shared data model: the collections plugins link to rather than duplicate. Everything in this section is a core-api module or a shared pipeline it runs; plugin APIs reach them through shared service interfaces, never by reading core's collections directly.

How plugins use core

  • tRPC. init-trpc.ts merges each module's router into the core appRouter, served at /trpc. A plugin builds a typed client through getPlugin('core'); the generator writes one into src/trpc/trpcClients.ts. It calls procedures such as users.findOne or customers.count.
  • meta hooks. The meta object a plugin passes to startPlugin (permissions, automations, segments, notifications, importExport, afterProcess, references) is serialized into the Redis key erxesservice:config:<name> and read back by core-api, the gateway, and the background services. That is how a plugin adds permission actions, automation triggers and actions, segment types, notification types, and import/export handlers without touching core code. See Plugin Metadata & Extensions for the full meta registration.
  • Shared interfaces. erxes-api-shared/core-modules holds the domain interfaces and producer helpers (automations, segments, permissions, properties, forms, import-export, and more) that both core and plugins compile against.

Module map

Each guide covers one area's data model, GraphQL API, permissions, and extension hooks.

Area core-api location Guide
Team members, structure, brands, RBAC modules/organization, modules/permissions, modules/auth Organizations, Users & Permissions
Customers and companies modules/contacts Contacts
Catalog, categories, units of measure modules/products Products
Custom fields, tags, dynamic audiences modules/properties, modules/tags, modules/segments Properties, Tags & Segments
Document templates with placeholders modules/documents (modules/forms is a legacy shell; the working forms module is in frontline_api. See Forms & Surveys) Documents
Workflow engine and approval locks modules/automations, modules/approval, plus the services/automations worker (see Background Services) Automations & Approvals
Campaigns and in-app/email notifications modules/broadcast, modules/notifications Broadcasts & Notifications
Outbound transports and inbound mail src/utils/email and erxes-api-shared/src/utils/email; inbound via cloudflare/mail-worker into frontline_api Email Delivery
Bulk CSV load and extraction modules/import-export Import & Export

Core API also contains modules without a dedicated page: clientportal (portal records and portal-user auth, see Client Portal), apps (machine tokens), conformities and relations (record linking), internalNote, search, template, and logs.

Guides

Operate on one system.

Talk to our team about consolidating your stack onto erxes. 30-minute walkthrough, custom to your org.