Skip to content

Commit df11373

Browse files
authored
Merge pull request #2624 from objectstack-ai/claude/metadata-showcase-redesign-ougiov
Examples cleanup: slim app-crm to its smoke core, migrate apis: to showcase, app-todo truth pass
2 parents acc1542 + 2590281 commit df11373

39 files changed

Lines changed: 169 additions & 1857 deletions

examples/app-crm/objectstack.config.ts

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import * as views from './src/views/index.js';
77
import * as apps from './src/apps/index.js';
88
import * as dashboards from './src/dashboards/index.js';
99
import * as datasets from './src/datasets/index.js';
10-
import * as reports from './src/reports/index.js';
1110
import * as pages from './src/pages/index.js';
1211
import * as actions from './src/actions/index.js';
13-
import * as emails from './src/emails/index.js';
1412
import { allHooks } from './src/hooks/index.js';
1513
import { allFlows } from './src/flows/index.js';
1614
import {
@@ -24,29 +22,19 @@ import {
2422
WonDealActivitySharingRule,
2523
} from './src/security/index.js';
2624
import { CrmSeedData } from './src/data/index.js';
27-
import { LeadCsvImportMapping, ContactJsonSyncMapping } from './src/data/crm-mappings.js';
2825
import { CrmDatasource, CrmAnalyticsDatasource } from './src/datasources/crm.datasource.js';
2926
import { 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
*/
5139
export 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
});
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
22

33
export { ConvertLeadAction } from './convert-lead.action.js';
4-
export { ParkLeadAction } from './park-lead.action.js';

examples/app-crm/src/actions/park-lead.action.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

examples/app-crm/src/analytics/crm.cube.ts

Lines changed: 0 additions & 122 deletions
This file was deleted.

examples/app-crm/src/api/crm-endpoints.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)