Enterprise CRM is a comprehensive, production-ready Customer Relationship Management system built on the ObjectStack Protocol. It demonstrates all 128+ protocol modules across 15 categories, showcasing enterprise-grade architecture following Salesforce and ServiceNow best practices.
- 10 Core Objects organized by domain (Sales, Service, Marketing, Products)
- 50+ Field Types including advanced types (Location, Color, Address)
- Comprehensive Relationships with lookups and master-detail
- Smart Validations with script-based rules and formulas
- 5 User Profiles (Admin, Sales Manager, Sales Rep, Service Agent, Marketing User)
- Role Hierarchy with 10 roles
- Sharing Rules (criteria-based, owner-based, territory-based)
- Field-Level Security for sensitive data
- Organization-Wide Defaults for baseline access control
- 5 AI Agents (Sales Assistant, Service Agent, Lead Enrichment, Revenue Intelligence, Email Campaign)
- 4 RAG Pipelines for knowledge retrieval
- Natural Language Queries for intuitive data access
- Predictive Analytics (lead scoring, revenue forecasting)
- 5 Automated Flows (Lead Conversion, Opportunity Approval, Case Escalation, Quote Generation, Campaign Enrollment)
- Workflow Rules for field updates and notifications
- Approval Processes for large deals and contracts
- Scheduled Jobs for batch processing
- 3 Interactive Dashboards (Sales, Service, Executive)
- 8 Pre-built Reports (opportunities, accounts, cases, leads, tasks)
- Real-time Metrics with KPIs and trends
- Custom Charts (funnel, bar, line, pie, table)
Follows the by-type directory layout — the ObjectStack standard aligned with Salesforce DX:
src/
├── objects/ # 📦 10 Core Objects (account, contact, lead, opportunity, ...)
├── views/ # 👁️ UI Views (FormView & ListView configurations for all objects)
├── pages/ # 📄 Pages (Record, Home, App, Utility page layouts)
├── actions/ # ⚡ Custom Actions (lead, contact, opportunity, case, global)
├── apis/ # 🌐 REST Endpoints (pipeline-stats, lead-convert)
├── apps/ # 🚀 App Configuration (crm.app.ts)
├── dashboards/ # 📊 3 Dashboards (sales, service, executive)
├── reports/ # 📈 8 Reports (opportunity, account, case, lead, contact, task)
├── flows/ # 🔄 5 Flows (lead-conversion, opportunity-approval, ...)
├── agents/ # 🤖 5 AI Agents (sales, service, lead-enrichment, ...)
├── rag/ # 🧠 4 RAG Pipelines (sales-knowledge, support, product, ...)
├── profiles/ # 🔒 5 Profiles (admin, sales-manager, sales-rep, ...)
└── sharing/ # 🛡️ Sharing Rules & Role Hierarchy
Comprehensive guides covering all aspects:
- Data Modeling - Objects, fields, relationships, validations
- Business Logic - Workflows, triggers, formulas
- Security - Profiles, roles, sharing, permissions
- AI Capabilities - Agents, RAG, NLQ, ML
The CRM includes comprehensive UI examples demonstrating all form layouts and page types:
- 6 Form Layout Types: Simple, Tabbed, Wizard, Split, Drawer, Modal
- Advanced Features: Collapsible sections, 1-4 column layouts, conditional visibility, cascading dependencies
- 5 List View Types: Grid, Kanban, Calendar, Gallery, filtered views
- Field Controls: readonly, required, hidden, colSpan, visibleOn, dependsOn, custom widgets
- Record Page: Comprehensive detail page with highlights, tabs, accordion, related lists, AI chat
- Home Page: Dashboard-style with KPIs and quick actions
- App Page: Application launcher grid
- Utility Page: Floating utility panels
See src/views/lead.view.ts and src/pages/ for complete implementations.
# Install dependencies (from monorepo root)
corepack enable && pnpm install
# Build the application
pnpm --filter @example/app-crm build
# Expected: Build succeeds with no type errors
# Type-check
pnpm --filter @example/app-crm typecheck
# Expected: No errors — all 10 objects validated against @objectstack/spec
# Run development server
pnpm --filter @example/app-crm dev
# Expected: Server starts at http://localhost:3000| Category | Count | Examples |
|---|---|---|
| Objects | 10 | Account, Opportunity, Case, Product |
| Fields | 100+ | AutoNumber, Formula, Lookup, Address |
| Views | 12+ | Grid, Kanban, Calendar, Gallery, Forms (Simple, Tabbed, Wizard, Split, Drawer, Modal) |
| Pages | 4 | Record Detail, Home, App Launcher, Utility Bar |
| Profiles | 5 | Admin, Sales Manager, Sales Rep |
| Sharing Rules | 5+ | Criteria-based, Territory-based |
| AI Agents | 5 | Sales Assistant, Service Agent |
| RAG Pipelines | 4 | Sales Knowledge, Support KB |
| Flows | 5 | Lead Conversion, Approval |
| Dashboards | 3 | Sales, Service, Executive |
| Reports | 8 | Opportunities, Cases, Leads |
企业级CRM 是基于 ObjectStack 协议构建的综合性、生产就绪的客户关系管理系统。它展示了15个类别中的128+协议模块,遵循 Salesforce 和 ServiceNow 的企业级架构最佳实践。
- 10个核心对象 按领域组织(销售、服务、营销、产品)
- 50+字段类型 包括高级类型(位置、颜色、地址)
- 全面的关系 查找和主从关系
- 智能验证 基于脚本的规则和公式
- 5种用户配置文件 (管理员、销售经理、销售代表、服务代表、营销用户)
- 角色层次结构 包含10个角色
- 共享规则 (基于条件、基于所有者、基于区域)
- 字段级安全 保护敏感数据
- 组织范围默认值 基线访问控制
- 5个AI代理 (销售助手、服务代理、线索丰富、收入智能、邮件营销)
- 4个RAG管道 用于知识检索
- 自然语言查询 直观的数据访问
- 预测分析 (线索评分、收入预测)
- 5个自动化流程 (线索转换、商机审批、案例升级、报价生成、营销注册)
- 工作流规则 字段更新和通知
- 审批流程 大型交易和合同
- 定时任务 批处理
- 3个交互式仪表板 (销售、服务、高管)
- 8个预制报表 (商机、客户、案例、线索、任务)
- 实时指标 KPI和趋势
- 自定义图表 (漏斗、柱状、折线、饼图、表格)
# 安装依赖(从 monorepo 根目录)
corepack enable && pnpm install
# 构建应用
pnpm --filter @example/app-crm build
# 预期: 构建成功,无类型错误
# 类型检查
pnpm --filter @example/app-crm typecheck
# 预期: 无错误 — 所有10个对象通过 @objectstack/spec 验证
# 运行开发服务器
pnpm --filter @example/app-crm dev
# 预期: 服务器启动在 http://localhost:3000构建全球最顶级的企业管理软件平台 🚀