CRM

This page describes crm-starter, the open-source CRM demo plugin (com.auraboot.crm-starter). It is a config-type plugin: every model, page, command and permission below is declared as DSL JSON, with no backend Java. You can import it, read its source, and copy it as a starting point.

The richer enterprise CRM (quotes, SLA policies, complaint handling) is a separate plugin. This page only documents what crm-starter actually ships, so every identifier here is one you can grep in the plugin and call against a running instance.

Why a CRM belongs on a runtime, not a CRUD builder

A sales process is a chain of state changes — qualify a lead, convert it, advance an opportunity, win or lose it — and each change needs to be permissioned, audited, and reachable from automation and AI as well as the UI. A spreadsheet replacement turns each step into a screen and stops there. On AuraBoot each step is a command: the "Win" button on the opportunity page invokes crm:win_opportunity, the same command an automation rule or an agent would call, and it runs through the command pipeline that applies permissions, audit and events uniformly.

What the demo ships

ArtifactCountSource
Models6config/models.json + config/fields/
Pages19config/pages/ (list / form / detail per model + kanban/board)
Commandsper model in config/commands/e.g. config/commands/crm_opportunity.json
Permission codes12config/permissions.json
Roles2 (crm_admin, crm_sales)config/roles.json
Dashboards2 (crm_overview, crm_lead_analytics)config/dashboards/

The six models

ModelPurposeKey status values
crm_accountCustomer company; rating A/B/C/Dcrm_account_status: active / inactive
crm_contactContact at an account; role enumcrm_contact_role: decision_maker / technical / procurement / influencer / other
crm_leadPre-qualification lead with score & sourcecrm_lead_status: new → contacted → qualified → converted / lost
crm_opportunityPipeline deal with amount & probabilitycrm_opp_stage: discovery → qualification → proposal → negotiation → closed_won / closed_lost
crm_activityCall / visit / email / meeting / wechatcrm_activity_type
crm_campaignMarketing campaigncrm_campaign_status: planned / active / completed / cancelled

Fields are physical columns, prefixed per model — for example crm_lead carries crm_lead_company, crm_lead_source (enum), crm_lead_score (integer), crm_lead_status (enum), crm_lead_assigned_to. Field types use the platform's dataType values (string, integer, enum, text, date, decimal, …) — there is no inline length syntax like string(120); length is a separate field property.

Commands

Commands are named crm:<verb>_<noun>. The opportunity model is representative — config/commands/crm_opportunity.json declares:

CommandWhat it does
crm:create_opportunityCreate a deal (inputs: crm_opp_name, crm_opp_account_id, crm_opp_stage, crm_opp_expected_amount, crm_opp_expected_close_date, crm_opp_probability, crm_opp_notes)
crm:update_opportunityEdit an existing deal
crm:qualify_opportunityAdvance discovery → qualification
crm:advance_opp_to_proposalAdvance to proposal
crm:advance_opp_to_negotiationAdvance to negotiation
crm:win_opportunityClose closed_won
crm:lose_opportunityClose closed_lost
crm:list_opportunities / crm:detail_opportunity / crm:delete_opportunityList / read / delete

The lead model follows the same shape (crm:create_lead, crm:convert_lead, …), as do account, contact, activity and campaign. A state-transition button on a page is wired to one of these command codes, not to a raw table write — so the UI, automation rules, and agents all go through the same authorized, audited path.

Permissions

crm-starter declares 12 permission codes following the <module>.<resource>.<action> convention, with manage and read per resource:

crm.account.manage   crm.account.read
crm.contact.manage   crm.contact.read
crm.lead.manage      crm.lead.read
crm.opportunity.manage  crm.opportunity.read
crm.activity.manage  crm.activity.read
…

and 2 roles, crm_admin (all manage) and crm_sales (manage leads / opportunities / contacts / activities, read accounts). These are evaluated by the platform's five-layer permission engine (RBAC + ReBAC + org scope + ABAC + field-level); the demo uses role-based grants and owner-field data scope, and you add ABAC or field-level rules by configuration as your model needs them.

Pipeline and dashboards

The lead-to-opportunity flow is expressed as the status enums above plus the state-transition commands; the demo drives it through list, kanban, and lead-board pages rather than a BPMN process (this is a config-only plugin — to add an orchestrated approval flow, model it in the BPMN Designer and bind its service tasks to these same commands). Two dashboards ship: crm_overview and crm_lead_analytics, backed by named queries such as crm_lead_status_stats.

Editions

  • Open sourcecrm-starter is the demo documented here: 6 models, the command set above, 12 permissions, 2 roles, 19 pages and 2 dashboards. Import it, or copy it as the skeleton for your own CRM-shaped plugin.
  • Enterprise — a larger CRM plugin adds quotes, SLA policies and complaint handling, plus delivery and integration support. It is a superset of the demo with a data-upgrade path; see Pricing for the edition comparison.

Next steps

  • System overview — how plugins, commands, and the runtime fit together
  • Command pipeline — the execution contract used by every command above
  • Permissions — the five-layer model behind the roles above
  • Plugin manifest — how a config plugin declares its models, commands, pages and roles