7.3 KiB
7.3 KiB
| name | version | description | trigger_conditions | ||||
|---|---|---|---|---|---|---|---|
| integrated-crm-app | 1.0.0 | Complete integrated CRM application combining customer management, contract management, opportunity management, financial management, appbase foundation, and RBAC security modules into a unified web application. |
|
Integrated CRM Application
Overview
This skill provides a complete, production-ready integrated CRM application that seamlessly combines six core modules into a unified web interface:
- Customer Management - Comprehensive client lifecycle management
- Opportunity Management - Sales pipeline and revenue forecasting
- Contract Management - AI-powered contract lifecycle with milestone tracking
- Financial Management - Order-level receivables and payments management
- AppBase - Foundation module for code and parameter management
- RBAC - Role-based access control and multi-tenant security
The application follows all established module development specifications and provides a cohesive user experience through a tab-based navigation interface.
Core Features
Unified Interface
- TabPanel Navigation: Single-page application with six main tabs
- Responsive Design: Adapts to different screen sizes and devices
- Consistent UX: Uniform styling and interaction patterns across all modules
- Integrated Login: Centralized authentication using RBAC module
Module Integration Points
Customer ↔ Opportunity Integration
- Customer 360° view includes associated opportunities
- Opportunity creation can reference existing customers
- Handover workflows include both customer and opportunity data
Opportunity ↔ Contract Integration
- One-click contract generation from opportunities
- Contract status automatically updates opportunity stage
- Revenue forecasting considers both open opportunities and active contracts
Contract ↔ Financial Integration
- Automatic receivable creation from contract payment milestones
- Order-level financial tracking linked to contract fulfillment
- Payment completion triggers contract milestone updates
Financial ↔ Customer Integration
- Customer financial summary shows total receivables/payments
- Overdue notifications sent to both sales and finance teams
- Customer credit limits enforced during opportunity/contract creation
Security and Multi-tenancy
- Organization Isolation: All data separated by org_id
- RBAC Permissions: Fine-grained access control per module and function
- Audit Trail: Comprehensive logging of all critical operations
- API Key Management: Programmatic access via userapp table
Technical Architecture
Frontend Architecture
- Bricks Framework: JSON-driven component system
- Main Layout:
base.uiwith TabPanel organizing all modules - Authentication:
login.ui+login.dspyusing RBAC functions - Module Integration: Frame components loading individual module UIs
Backend Architecture
- Module Loader:
init.pyloads all six modules in correct order - Dependency Order: AppBase → RBAC → Business Modules
- Function Exposure: ServerEnv exposes all required functions
- Async Design: Proper awaitify usage for synchronous functions
Database Architecture
- Shared Schema: All modules use same database with org_id isolation
- Referential Integrity: Foreign keys maintain data consistency
- Performance Optimization: Strategic indexing on frequently queried fields
- DDL Generation: Automated schema creation from JSON/XLSX definitions
Directory Structure
integrated_crm_app/
├── integrated_crm_app/ # Python package
│ ├── __init__.py # Package marker
│ └── init.py # Main module loader
├── wwwroot/ # Main application frontend
│ ├── base.ui # Unified layout with TabPanel
│ ├── login.ui # Centralized login form
│ └── login.dspy # RBAC-integrated auth handler
├── build.sh # Build script for all modules
├── pyproject.toml # Package configuration
└── README.md # Comprehensive documentation
Implementation Workflow
Step 1: Module Preparation
- Ensure all six modules exist in
~/repos/directory - Verify each module follows development specifications
- Confirm database table definitions are complete
Step 2: Main Application Setup
- Create main application directory structure
- Implement unified
init.pymodule loader - Design
base.uiTabPanel layout - Create centralized authentication flow
Step 3: Build Integration
- Implement
build.shscript to process all modules - Generate DDL scripts for database schema
- Create symbolic links for frontend resources
- Test module loading and function exposure
Step 4: Testing and Validation
- Verify all modules load without conflicts
- Test cross-module data integration
- Validate RBAC permissions across all functions
- Confirm responsive design on different devices
Usage Instructions
Installation
- Place all six modules in
~/repos/directory - Run
./build.shto generate database schemas and links - Execute DDL scripts to create database tables
- Start AhServer with the integrated application
Navigation
- Login: Access
/main/login.uifor authentication - Main Interface: Redirects to
/main/base.uiafter login - Module Switching: Use TabPanel to navigate between modules
- System Admin: Last tab contains RBAC and AppBase management
Customization Points
- UI Layout: Modify
base.uito rearrange or add tabs - Authentication: Extend
login.dspyfor additional auth methods - Business Logic: Add cross-module validation in individual modules
- Reporting: Create new reports using combined data sources
Verification Checklist
- All six modules load correctly in dependency order
- Unified TabPanel interface displays all modules
- Centralized authentication works with RBAC
- Cross-module data relationships function properly
- Organization-based data isolation enforced
- Responsive design works on mobile/desktop
- Build script processes all module types (JSON/XLSX)
- Production-ready code with proper error handling
- Complete documentation in README.md
Extension Opportunities
Advanced Features
- Workflow Automation: Cross-module approval workflows
- Advanced Analytics: Unified dashboards across all modules
- Mobile App: Native mobile interface using same backend
- API Gateway: RESTful API layer for external integration
Integration Scenarios
- ERP Integration: Connect with external accounting systems
- Marketing Automation: Link with email/campaign platforms
- Document Management: Integrate with file storage services
- Payment Gateways: Connect with online payment processors
This integrated CRM application provides a solid foundation for enterprise customer relationship management with full extensibility and customization capabilities.