@@ -7,10 +7,8 @@ import * as views from './src/views/index.js';
77import * as apps from './src/apps/index.js' ;
88import * as dashboards from './src/dashboards/index.js' ;
99import * as datasets from './src/datasets/index.js' ;
10- import * as reports from './src/reports/index.js' ;
1110import * as pages from './src/pages/index.js' ;
1211import * as actions from './src/actions/index.js' ;
13- import * as emails from './src/emails/index.js' ;
1412import { allHooks } from './src/hooks/index.js' ;
1513import { allFlows } from './src/flows/index.js' ;
1614import {
@@ -24,29 +22,19 @@ import {
2422 WonDealActivitySharingRule ,
2523} from './src/security/index.js' ;
2624import { CrmSeedData } from './src/data/index.js' ;
27- import { LeadCsvImportMapping , ContactJsonSyncMapping } from './src/data/crm-mappings.js' ;
2825import { CrmDatasource , CrmAnalyticsDatasource } from './src/datasources/crm.datasource.js' ;
2926import { CrmTranslationBundle } from './src/translations/crm.translation.js' ;
30- import { ContactExtension } from './src/extensions/contact.extension.js' ;
31- import { CustomerPortal } from './src/portals/customer.portal.js' ;
32- import { CrmLightTheme , CrmDarkTheme } from './src/themes/crm.theme.js' ;
33- import { LeadScoringJob , PipelineReportJob , RenewalSweepJob } from './src/jobs/crm-jobs.js' ;
34- import {
35- PipelineSummaryEndpoint ,
36- LeadConvertEndpoint ,
37- MarketingWebhookEndpoint ,
38- } from './src/api/crm-endpoints.js' ;
39- import { OpportunityChangedWebhook , DealWonSlackWebhook } from './src/webhooks/crm-webhooks.js' ;
40- import { PipelineCube , LeadFunnelCube } from './src/analytics/crm.cube.js' ;
41- import { HubSpotConnector , SlackConnector } from './src/connectors/crm-connectors.js' ;
4227
4328/**
44- * CRM example — exercises the full metadata loading pipeline with at
45- * least one record of every form-bearing metadata type so the Studio
46- * metadata-admin UI can be developed and validated against real data.
29+ * CRM example — a MINIMAL, realistic relational bundle that smoke-tests the
30+ * metadata application loading pipeline: objects/relationships → views →
31+ * app → dashboard (dataset-backed) → hook → one screen-flow wizard → seed.
32+ * Deliberately small so `pnpm dev:crm` boots fast for backend debugging.
4733 *
48- * For a full enterprise reference (10+ objects, RAG, sharing rules,
49- * etc.) see https://github.com/objectstack-ai/hotcrm
34+ * NOT a feature showcase: capability breadth (cubes, extensions, apis,
35+ * webhooks, portals, themes, reports, jobs, emails, automation variety)
36+ * lives in examples/app-showcase, whose coverage manifest enforces it.
37+ * For a full enterprise reference see https://github.com/objectstack-ai/hotcrm
5038 */
5139export default defineStack ( {
5240 manifest : {
@@ -58,12 +46,10 @@ export default defineStack({
5846 description : 'Minimal CRM workspace used by the framework to validate the metadata loading pipeline end-to-end.' ,
5947 } ,
6048
61- // Auto-resolved by the CLI; `ui` enables the Studio shell, `automation` loads
62- // AutomationServicePlugin + node packs so screen flows can execute, and
63- // `approvals` loads ApprovalsServicePlugin so the `approval` flow node is
64- // contributed to the engine (ADR-0019) — required for the discount-approval
65- // flow to compile/register and to surface the node in the designer palette.
66- requires : [ 'ui' , 'automation' , 'approvals' ] ,
49+ // Auto-resolved by the CLI; `ui` enables the Studio shell, `automation`
50+ // loads AutomationServicePlugin + node packs so the convert-lead screen
51+ // flow can execute.
52+ requires : [ 'ui' , 'automation' ] ,
6753
6854 // Infrastructure
6955 datasources : [ CrmDatasource , CrmAnalyticsDatasource ] ,
@@ -85,28 +71,22 @@ export default defineStack({
8571
8672 // Data
8773 objects : Object . values ( objects ) ,
88- objectExtensions : [ ContactExtension ] ,
8974
9075 // UI
9176 apps : Object . values ( apps ) ,
92- portals : [ CustomerPortal ] ,
9377 views : Object . values ( views ) ,
9478 pages : Object . values ( pages ) ,
9579 dashboards : Object . values ( dashboards ) ,
9680 datasets : Object . values ( datasets ) ,
97- reports : Object . values ( reports ) ,
9881 actions : Object . values ( actions ) ,
99- themes : [ CrmLightTheme , CrmDarkTheme ] ,
10082
10183 // Logic
10284 hooks : allHooks ,
103- // ADR-0020: `workflows` retired — record state machines are now a
85+ // ADR-0020: `workflows` retired — record state machines are a
10486 // `state_machine` validation rule on the object (see
105- // src/objects/opportunity.object.ts) and side-effecting automation is
106- // modelled as Flows (high-value-deal, stale-opportunity in allFlows) .
87+ // src/objects/opportunity.object.ts). One flow only: the convert-lead
88+ // screen wizard the smoke test drives .
10789 flows : allFlows ,
108- jobs : [ LeadScoringJob , PipelineReportJob , RenewalSweepJob ] ,
109- emailTemplates : Object . values ( emails ) ,
11090
11191 // Security
11292 roles : [ SalesRepRole , SalesManagerRole , FinanceApproverRole ] ,
@@ -117,17 +97,6 @@ export default defineStack({
11797 WonDealActivitySharingRule ,
11898 ] ,
11999
120- // API
121- apis : [ PipelineSummaryEndpoint , LeadConvertEndpoint , MarketingWebhookEndpoint ] ,
122- webhooks : [ OpportunityChangedWebhook , DealWonSlackWebhook ] ,
123-
124- // Data Extensions
125- mappings : [ LeadCsvImportMapping , ContactJsonSyncMapping ] ,
126- analyticsCubes : [ PipelineCube , LeadFunnelCube ] ,
127-
128- // Integrations
129- connectors : [ HubSpotConnector , SlackConnector ] ,
130-
131100 // Seed data
132101 data : CrmSeedData ,
133102} ) ;
0 commit comments