-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathobjectstack.config.ts
More file actions
95 lines (86 loc) · 2.92 KB
/
objectstack.config.ts
File metadata and controls
95 lines (86 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import { App } from '@objectstack/spec';
import { Account } from './src/domains/crm/account.object';
import { Contact } from './src/domains/crm/contact.object';
import { Opportunity } from './src/domains/crm/opportunity.object';
import { Lead } from './src/domains/crm/lead.object';
import { Case } from './src/domains/crm/case.object';
import { Task } from './src/domains/crm/task.object';
import { PipelineStatsApi, LeadConvertApi } from './src/server';
import { CrmActions } from './src/ui/actions';
import { CrmDashboards } from './src/ui/dashboards';
import { CrmReports } from './src/ui/reports';
export default App.create({
name: 'crm_example',
label: 'CRM App',
description: 'Comprehensive CRM example demonstrating all ObjectStack Protocol features',
version: '2.0.0',
icon: 'briefcase',
// All objects in the app
objects: [
Account,
Contact,
Opportunity,
Lead,
Case,
Task
],
// Custom APIs
apis: [
PipelineStatsApi,
LeadConvertApi
],
// Navigation menu structure
navigation: [
{
id: 'group_sales',
type: 'group',
label: 'Sales',
children: [
{ id: 'nav_lead', type: 'object', objectName: 'lead', label: 'Leads' },
{ id: 'nav_account', type: 'object', objectName: 'account', label: 'Accounts' },
{ id: 'nav_contact', type: 'object', objectName: 'contact', label: 'Contacts' },
{ id: 'nav_opportunity', type: 'object', objectName: 'opportunity', label: 'Opportunities' },
{ id: 'nav_sales_dashboard', type: 'dashboard', dashboardName: 'sales_dashboard', label: 'Sales Dashboard' },
]
},
{
id: 'group_service',
type: 'group',
label: 'Service',
children: [
{ id: 'nav_case', type: 'object', objectName: 'case', label: 'Cases' },
{ id: 'nav_service_dashboard', type: 'dashboard', dashboardName: 'service_dashboard', label: 'Service Dashboard' },
]
},
{
id: 'group_activities',
type: 'group',
label: 'Activities',
children: [
{ id: 'nav_task', type: 'object', objectName: 'task', label: 'Tasks' },
]
},
{
id: 'group_analytics',
type: 'group',
label: 'Analytics',
children: [
{ id: 'nav_exec_dashboard', type: 'dashboard', dashboardName: 'executive_dashboard', label: 'Executive Dashboard' },
{ id: 'nav_analytics_sales_db', type: 'dashboard', dashboardName: 'sales_dashboard', label: 'Sales Dashboard' },
{ id: 'nav_analytics_service_db', type: 'dashboard', dashboardName: 'service_dashboard', label: 'Service Dashboard' },
]
}
],
// Actions available in the app
actions: Object.values(CrmActions),
// Dashboards
dashboards: Object.values(CrmDashboards),
// Reports
reports: Object.values(CrmReports),
// App-level branding
branding: {
primaryColor: '#4169E1',
logo: '/assets/crm-logo.png',
favicon: '/assets/crm-favicon.ico',
}
});