commit bf8ea82b083206c7bc9eb0252bfb4964412966c8 Author: yashwin-foxy Date: Fri Oct 10 18:17:39 2025 +0530 first commit mermaid files and project flow added diff --git a/Mermaid_Selector.html b/Mermaid_Selector.html new file mode 100644 index 0000000..87a9e05 --- /dev/null +++ b/Mermaid_Selector.html @@ -0,0 +1,631 @@ + + + + + + Mermaid Diagram Viewer + + + + +
+
+

🎨 Mermaid Diagram Viewer

+

Upload a file or paste your Mermaid code to visualize beautiful diagrams

+
+ +
+
+

πŸ“ Input

+ +
+ + +
+ +
+ + +
+ +
+
+
πŸ“
+

Click to upload or drag and drop

+

Supports .mmd, .mermaid, .txt files

+
+ +
+ +
+
+ +
+

πŸ–ΌοΈ Preview

+
+
+
πŸ“Š
+

Your diagram will appear here

+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/RE Dealer onboarding Preliminary System Design, Security & Technical Doc V1.1.pdf b/RE Dealer onboarding Preliminary System Design, Security & Technical Doc V1.1.pdf new file mode 100644 index 0000000..7039f03 Binary files /dev/null and b/RE Dealer onboarding Preliminary System Design, Security & Technical Doc V1.1.pdf differ diff --git a/RE Dealer onboarding preliminary Syastem.md b/RE Dealer onboarding preliminary Syastem.md new file mode 100644 index 0000000..f04b5be --- /dev/null +++ b/RE Dealer onboarding preliminary Syastem.md @@ -0,0 +1,758 @@ +RE Workflow Solutions +Preliminary System Design, Security & Technical +Document +Preliminary Approach & Solution Analysis Document +25 - August- 2025 +Version 1. 0 +Contents +1 Objective +2 Problem Statement +3 System Requirements +3.1 Functional Requirements +3.2 Non-Functional Requirements +4 Bird Eye View +5 System Design +6 System Design Explanation +6.1 User Authentication & Access Flow +6.1.1 Step-by-Step Authentication Flow +6.2 API Driven Framework +6.3 Frontend Layer (React.js) +6.4 Backend Service (Node.js) +6.5 Data Handling & Storage +7 Scalability & Performance +8 DPDP Act Compliance +9 Security Requirements and Technical Implementation +9.1 Input Validation and Sanitization +9.2 Secure File Handling +9.3 DDoS and API Rate Limiting +10 Monitoring & Maintenance +11 Camunda Support +1 Objective +Automate the Dealer Development process to streamline prospect applications, vacancy checks, +approvals, and LOI issuance. Enhance efficiency and scalability for 1,000 users, ensuring a +seamless dealer onboarding experience. Maintain DPDP compliance with secure, reliable +processes, reducing manual effort and improving decision-making for stakeholders. + +Additionally, the review and approval process differs from scenario to scenario, so the system +should be dynamically capable enough to cater this need. + +2 Problem Statement +The absence of a Dealer Development automation system creates significant challenges in +managing the dealer onboarding process efficiently and securely. Currently, manual processes +for handling prospect applications, vacancy checks, approvals, and LOI issuance are time- +consuming, error-prone, and lack scalability. + +This leads to delays in processing applications, inconsistent data handling, and difficulties in +generating timely reports, such as daily web lead summaries and location-wise details. +Additionally, the lack of automated security measures increases the security risk of non- +compliance with Digital Personal Data Protection (DPDP) regulations, particularly for sensitive +prospect data. Without a centralized system, stakeholder coordination (DD Lead, RBM, ZBH, +NBH) is fragmented, hindering decision-making and impacting the overall dealer onboarding +experience. + +3 System Requirements +3.1 Functional Requirements +Dealer Onboarding Workflow +Capture enquiries via form, validate against opportunity list. +Automated emails, reminders, scoring, and top-candidate shortlisting. +Multi-level approvals (ASM β†’ ZM β†’ RBM β†’ ZBH β†’ NBH). +Profile sheet submission, KT evaluations, and final LOI issuance. +Custom Approval Workflows: Admin can configure different approval chains +depending on region size (e.g., simpler workflows for smaller regions, extended +hierarchies for larger regions). +Dealer Exit Workflow +Resignation: Letter submission, ASM template, approvals (ZBH β†’ DD Lead β†’ NBH), +legal concurrence, dealer acknowledgment. +Termination: Record reasons, prepare docs, legal show-cause notice (15-day timer), +approvals (ZBH β†’ DD Lead β†’ NBH β†’ CCO β†’ CEO), final termination letter. +Full & Final Settlement: Coordinate with stakeholders, reconcile dues, block +SAP/MSD codes, Finance AR calculates F&F, dealer acceptance or legal escalation. +Automation +Automated notifications (acknowledgments, reminders, approvals, LOI, F&F). +SLA-driven reminders (Day 2, Day 5, 15-day cutoffs). +Reminders can be customized in terms of duration frequency vs levels. +Reporting +Every user can login and view the Dashboard & quick reports +Access Control +Role-based access for Admin, ASM, ZM, RBM, ZBH, NBH, CCO. +Regional scoping and complete audit logs. +3.2 Non-Functional Requirements +Scalability : Support 1 0 ,000 total users and 200 concurrent users. +Performance : Achieve <2s latency for most operations during peak hours (9 AM–5 PM +IST). +Availability : Ensure 99.9% uptime. +Security : Comply with DPDP Act, 2023, with encryption and RBAC. +Reliability : Maintain data consistency and fault tolerance across workflows. +4 Bird Eye View + +The Bird Eye View provides a high-level architectural overview of the RE Workflow Application, illustrating the key components, user interactions, and data flow patterns that form the foundation of the entire system. + +## 4.1 System Architecture Overview + +The RE Workflow App follows a centralized, secure, and scalable architecture designed to serve multiple user roles while maintaining strict security protocols and efficient data management. + +### 4.1.1 User Ecosystem +The system serves a diverse range of stakeholders across the Royal Enfield dealer development hierarchy: + +**Primary User Roles:** +- **Super Admin**: System administrators with full access and configuration rights +- **ASM (Area Sales Manager)**: Regional sales management and dealer oversight +- **ZM (Zone Manager)**: Zone-level management and approval authority +- **RBM (Regional Business Manager)**: Regional business strategy and decision-making +- **DD (Dealer Development)**: Dealer development specialists and coordinators +- **NBH (National Business Head)**: Strategic oversight and final approvals +- **Finance**: Financial approval and settlement processing + +### 4.1.2 Authentication & Authorization Flow + +**RE Bridge Centralised SSO Integration** +- Single Sign-On (SSO) authentication through Royal Enfield's centralized identity management system +- Seamless integration with existing corporate Active Directory infrastructure +- Role-based access control (RBAC) ensuring users access only authorized functions +- Session management with automatic timeout and security token refresh + +**Authentication Process:** +1. User initiates login through RE Bridge Centralised SSO +2. Credentials validated against corporate Active Directory +3. Role-based permissions assigned and validated +4. Secure session established with appropriate access levels +5. User redirected to RE Workflow App with authenticated access + +## 4.2 Core System Components + +### 4.2.1 Security Layer +The security layer serves as the primary gatekeeper for all system access: + +**Security Functions:** +- **Authentication Verification**: Validates user credentials and session tokens +- **Authorization Control**: Enforces role-based access permissions +- **Session Management**: Maintains secure user sessions with timeout controls +- **Audit Logging**: Records all access attempts and security events +- **Data Protection**: Ensures compliance with DPDP Act requirements + +**Security Protocols:** +- TLS 1.3 encryption for all data transmission +- Multi-factor authentication for sensitive operations +- Regular security token rotation and validation +- Comprehensive audit trails for compliance reporting + +### 4.2.2 Core Business & Services Modules +The heart of the application where all business logic and workflow processing occurs: + +**Primary Modules:** +- **Dealer Onboarding Management**: Complete lifecycle management from application to LOI issuance +- **Custom Workflow Engine**: Dynamic workflow configuration and execution +- **Dealer Resignation Processing**: Structured resignation and termination workflows +- **Full & Final Settlement**: Financial settlement calculation and processing +- **Dashboard & Analytics**: Real-time reporting and performance metrics +- **Document Management**: Secure document storage, retrieval, and version control + +**Business Process Integration:** +- Automated workflow orchestration +- Multi-level approval chain management +- SLA tracking and enforcement +- Real-time status updates and notifications +- Integration with external systems (SAP, DMS, Email) + +### 4.2.3 Database Layer (PostgreSQL) + +**Primary Database Functions:** +- **Transactional Data Storage**: ACID-compliant data persistence for all business operations +- **User Management**: User profiles, roles, and permission storage +- **Workflow State Management**: Process instance tracking and state persistence +- **Document Metadata**: File references and metadata storage +- **Audit Trail Storage**: Comprehensive logging of all system activities + +**Database Architecture:** +- **Primary Instance**: Handles all write operations and critical transactions +- **Read Replica**: Optimizes reporting and analytics queries +- **Backup & Recovery**: Automated backup with point-in-time recovery capability +- **Performance Optimization**: Query optimization and indexing strategies + +### 4.2.4 Supporting Services + +**Monitoring Services:** +- **System Health Monitoring**: Real-time system performance tracking +- **Business Metrics Tracking**: KPI monitoring and alerting +- **Capacity Planning**: Resource utilization monitoring and forecasting +- **SLA Compliance**: Service level agreement monitoring and reporting + +**Logging Services:** +- **Application Logging**: Comprehensive application event logging +- **Security Logging**: Authentication, authorization, and security event logging +- **Performance Logging**: System performance and bottleneck identification +- **Compliance Logging**: DPDP Act compliance and audit trail maintenance + +### 4.2.5 Cloud Storage Integration + +**Storage Functions:** +- **Document Archive**: Secure storage for all business documents and files +- **Backup Storage**: Automated backup storage for disaster recovery +- **Media Storage**: Image and document storage for dealer applications +- **Compliance Storage**: Long-term storage for audit and compliance records + +**Storage Features:** +- **Encryption at Rest**: AES-256 encryption for all stored data +- **Access Control**: Role-based access to stored documents +- **Version Control**: Document versioning and change tracking +- **Retention Policies**: Automated data retention and archival policies + +## 4.3 Data Flow Architecture + +### 4.3.1 User Interaction Flow +1. **Authentication**: User β†’ RE Bridge Centralised SSO β†’ Security Layer +2. **Authorization**: Security Layer validates permissions and grants access +3. **Business Processing**: User interacts with Core Business & Services Modules +4. **Data Operations**: Business modules interact with PostgreSQL Database +5. **Document Management**: File operations handled through Cloud Storage +6. **Monitoring & Logging**: All activities logged and monitored continuously + +### 4.3.2 System Integration Flow +1. **External System Integration**: SAP, DMS, and third-party system connectivity +2. **Data Synchronization**: Real-time data sync between systems +3. **Notification Delivery**: Email, SMS, and push notification processing +4. **Report Generation**: Automated report creation and distribution +5. **Backup & Recovery**: Continuous backup and disaster recovery processes + +## 4.4 Scalability and Performance Considerations + +### 4.4.1 Horizontal Scaling +- **Load Distribution**: Multiple instances of Core Business & Services Modules +- **Database Scaling**: Read replica distribution for improved query performance +- **Storage Scaling**: Cloud storage auto-scaling based on demand +- **Caching Strategy**: Redis caching for frequently accessed data + +### 4.4.2 Performance Optimization +- **Connection Pooling**: Optimized database connection management +- **Query Optimization**: Efficient database query design and indexing +- **CDN Integration**: Content delivery network for static assets +- **Asynchronous Processing**: Background job processing for non-critical operations + +## 4.5 Security and Compliance + +### 4.5.1 Data Protection +- **Encryption**: End-to-end encryption for all data transmission and storage +- **Access Control**: Multi-layered access control with role-based permissions +- **Audit Trails**: Comprehensive logging for compliance and security monitoring +- **Data Localization**: Compliance with data residency requirements + +### 4.5.2 DPDP Act Compliance +- **Data Minimization**: Collection of only necessary personal data +- **Consent Management**: Explicit consent tracking and management +- **Data Subject Rights**: User access and data portability capabilities +- **Breach Notification**: Automated breach detection and notification systems + +## 4.6 System Dependencies and Integration Points + +### 4.6.1 External Dependencies +- **RE Bridge Centralised SSO**: Authentication and authorization services +- **Active Directory**: User identity and role management +- **SAP System**: Dealer master data and financial processing +- **DMS System**: Document management and archival services +- **Cloud Storage**: Scalable document and file storage + +### 4.6.2 Internal Dependencies +- **PostgreSQL Database**: Primary data storage and transaction management +- **Monitoring Services**: System health and performance monitoring +- **Logging Services**: Application and security event logging +- **Notification Services**: Multi-channel communication capabilities + +This Bird Eye View establishes the foundation for the detailed system design, ensuring that all architectural decisions align with the high-level requirements for security, scalability, and user experience. + +5 System Design + +The RE Workflow Solution follows a modern, scalable microservices architecture designed to handle high-volume dealer onboarding processes with enterprise-grade security and performance. The system is built on a multi-layered architecture that ensures separation of concerns, scalability, and maintainability. + +## 5.1 Architecture Overview + +The system architecture consists of the following key layers: + +### 5.1.1 Access and Authentication Layer +- **Admin Web App**: Browser-based access portal for all users +- **WAF Firewall**: Web Application Firewall providing DDoS protection and security filtering +- **API Gateway (Kong)**: Centralized entry point handling authentication, rate limiting, and request routing + +### 5.1.2 Core Business Services Layer +- **Schedulers**: Task scheduling and automation services +- **Core Business Modules**: Main application logic for dealer processes +- **Logstash**: Log collection and processing + +### 5.1.3 Data and Storage Layer +- **PostgreSQL Database**: Primary data store with read replicas +- **Redis Cache**: Session management and performance optimization +- **Object Storage**: Document and file management + +### 5.1.4 Monitoring and Operations Layer +- **Grafana & Prometheus**: Metrics collection and visualization +- **ELK Stack**: Logging, search, and analytics +- **Message Queue**: Asynchronous processing and notifications + +### 5.1.5 External Integration Layer +- **Notification Services**: Email, SMS, and push notifications +- **External APIs**: SAP, DMS, and third-party integrations + +## 5.2 Detailed Component Architecture + +### 5.2.1 API Gateway (Kong) Configuration + +The API Gateway serves as the single entry point and implements: + +**Rate Limiting** +- IP-based rate limiting: 100 requests/minute per IP +- User-based rate limiting: 500 requests/minute per authenticated user +- Whitelist support for trusted sources + +**Metric Collection** +- Request/response metrics +- Performance monitoring +- User activity tracking +- API usage analytics + +**Header Transformation** +- Security header injection +- Request/response header standardization +- CORS policy enforcement + +**Error Handling** +- Centralized error response formatting +- Error code standardization +- Detailed logging for debugging + +### 5.2.2 Authentication Flow Architecture + +**SSO Integration Flow:** +1. User accesses portal via browser +2. WAF validates and filters request +3. API Gateway checks for active session +4. If no session, redirect to Identity Provider (MS AD/Okta) +5. IdP validates credentials against Active Directory +6. Authorization code returned to portal +7. Portal exchanges code for access/refresh tokens +8. Local session created with secure cookie +9. User granted access to application + +**Session Management:** +- Secure HTTP-only cookies with SameSite protection +- Session timeout: 8 hours of inactivity +- Automatic token refresh using refresh tokens +- Multi-device session tracking + +### 5.2.3 Core Business Modules + +**Dealer Application & Onboarding Module** +- Application form processing and validation +- Automated scoring and ranking algorithms +- Multi-level approval workflow management +- Document collection and verification +- LOI/LOA generation and distribution + +**Custom Workflow Module** +- Dynamic workflow configuration +- Template-based workflow creation +- Regional customization support +- Approval chain management +- SLA tracking and enforcement + +**Dealer Resignation Module** +- Resignation request processing +- Template-based letter generation +- Multi-level approval workflows +- Legal concurrence management +- Dealer acknowledgment tracking + +**Full & Final Settlement Module** +- F&F calculation engine +- Stakeholder coordination +- SAP integration for code blocking +- Finance AR integration +- Legal escalation management + +**Dashboard, Reports & Analytics Module** +- Real-time dashboard updates +- Custom report generation +- Performance metrics and KPIs +- Export functionality (PDF, Excel, CSV) +- Data visualization and charts + +### 5.2.4 Database Architecture (PostgreSQL) + +**Primary Database Instance** +- Write operations and transactions +- ACID compliance +- Data integrity enforcement +- Backup and recovery + +**Read Replica Instance** +- Read-only queries for reporting +- Load distribution +- Performance optimization +- Real-time synchronization + +**Write-Ahead Logging (WAL)** +- Transaction durability +- Point-in-time recovery +- Replication support +- Crash recovery + +**Database Access Layer (DAL)** +- Connection pooling (max 100 connections) +- Query builder with SQL injection protection +- Database error handling and retry logic +- Performance monitoring and optimization + +### 5.2.5 Caching Strategy (Redis) + +**Session Cache** +- User session storage +- Authentication tokens +- Permission and role caching +- TTL: 8 hours + +**Application Cache** +- Frequently accessed data (towns, dealer codes) +- Master data caching +- Report result caching +- TTL: 24 hours + +**Performance Cache** +- API response caching +- Database query result caching +- Static content caching +- TTL: 1 hour + +### 5.2.6 Outbound Network Layer + +**External API Integration** +- SAP system integration for dealer creation +- DMS integration for document management +- Third-party service integrations + +**Circuit Breaker Pattern** +- Automatic failure detection +- Fallback mechanisms +- Recovery testing +- Service degradation handling + +**Retry Logic** +- Exponential backoff for failed requests +- Maximum retry count: 3 +- Timeout configuration: 30 seconds +- Network error handling + +**Response Validation** +- Schema validation for external responses +- Data integrity checks +- Error response handling +- Logging and monitoring + +### 5.2.7 Monitoring and Alerting + +**Metrics Collection (Prometheus)** +- System performance metrics +- Application performance indicators +- Business process metrics +- Custom KPI tracking + +**Visualization (Grafana)** +- Real-time dashboards +- Historical trend analysis +- Alert visualization +- Custom metric displays + +**Alerting System** +- Threshold-based alerts +- Anomaly detection +- Escalation procedures +- Integration with notification services + +### 5.2.8 Logging and Analytics (ELK Stack) + +**Log Collection (Logstash)** +- Application log aggregation +- System log collection +- Error log processing +- Performance log analysis + +**Search and Analytics (ElasticSearch)** +- Log indexing and search +- Performance analytics +- Error pattern analysis +- Compliance audit trails + +**Visualization (Kibana)** +- Log visualization dashboards +- Performance trend analysis +- Error investigation tools +- Compliance reporting + +### 5.2.9 Notification Services + +**Email Notifications** +- SMTP gateway integration +- Template-based email generation +- Delivery tracking and retry +- Bounce handling + +**SMS Notifications** +- SMS gateway integration +- Bulk SMS capabilities +- Delivery confirmation +- Cost optimization + +**Push Notifications** +- Firebase integration +- Mobile app notifications +- Web push notifications +- Delivery analytics + +## 5.3 Data Flow Architecture + +### 5.3.1 Request Processing Flow + +1. **User Request**: Browser β†’ WAF β†’ API Gateway +2. **Authentication**: API Gateway β†’ IdP β†’ Active Directory +3. **Authorization**: Role validation β†’ Permission check +4. **Routing**: Load balancer β†’ Core business modules +5. **Processing**: Business logic β†’ Database operations +6. **Response**: Data retrieval β†’ Cache check β†’ Response formatting +7. **Delivery**: API Gateway β†’ Browser + +### 5.3.2 Asynchronous Processing Flow + +1. **Event Trigger**: Business process completion +2. **Message Queue**: Event queuing for processing +3. **Background Jobs**: Email sending, report generation +4. **External Integration**: SAP updates, document processing +5. **Notification**: User notifications via multiple channels + +### 5.3.3 Data Synchronization Flow + +1. **Primary Write**: Database write operation +2. **WAL Generation**: Write-ahead log creation +3. **Replica Sync**: Real-time synchronization to read replica +4. **Cache Update**: Redis cache invalidation/update +5. **Index Update**: Search index refresh + +## 5.4 Security Architecture + +### 5.4.1 Network Security +- WAF protection against common attacks +- TLS 1.3 encryption for all communications +- Network segmentation and firewall rules +- VPN access for administrative functions + +### 5.4.2 Application Security +- Input validation and sanitization +- SQL injection prevention +- XSS protection +- CSRF token implementation + +### 5.4.3 Data Security +- AES-256 encryption for data at rest +- Field-level encryption for sensitive data +- Secure key management +- Data masking for non-production environments + +### 5.4.4 Access Control +- Role-based access control (RBAC) +- Principle of least privilege +- Multi-factor authentication for sensitive roles +- Session management and timeout + +## 5.5 Scalability and Performance + +### 5.5.1 Horizontal Scaling +- Load balancer distribution +- Database read replicas +- Microservice architecture +- Container orchestration support + +### 5.5.2 Performance Optimization +- Redis caching strategy +- Database query optimization +- CDN integration for static assets +- Connection pooling + +### 5.5.3 Monitoring and Metrics +- Real-time performance monitoring +- Capacity planning metrics +- SLA tracking and reporting +- Performance bottleneck identification + +## 5.6 Disaster Recovery and Backup + +### 5.6.1 Backup Strategy +- Daily automated backups +- Point-in-time recovery capability +- Cross-region backup replication +- Backup testing and validation + +### 5.6.2 High Availability +- Multi-AZ deployment +- Database failover automation +- Service redundancy +- Health check monitoring + +### 5.6.3 Recovery Procedures +- RTO: 4 hours maximum +- RPO: 1 hour maximum +- Automated recovery testing +- Documentation and runbooks + +6 System Design Explanation +6.1 User Authentication & Access Flow +The system leverages Royal Enfield’s existing Active Directory (AD) via an Identity Provider +(IdP) (Azure AD / ADFS) for authentication. This means that user identity and credentials are not +managed within the portal but by AD, ensuring consistency with corporate policies. + +6.1.1 Step-by-Step Authentication Flow +First-Time Access + +A user navigates to the portal (e.g., https://dd-portal.re.com/). +The portal checks for an active application session (secure session cookie sid). If +absent/expired, the user is redirected to the IdP’s /authorize endpoint. +The IdP validates the user credentials against AD +Upon successful authentication, the IdP (Identity Provider) redirects back to the portal’s +callback URL with an authorization code. +The portal backend exchanges the authorization code with the IdP’s /token endpoint +over HTTPS. Response includes: ID Token (identity claims), Access Token, and Refresh +Token. +The ID Token is validated using IdP’s public keys and claims are extracted (user, roles, +groups). +A secure application session is created (stored locally), and an opaque sid cookie is set in +the user’s browser. +User gains access to the portal and their dashboard. +Subsequent Access + +On the next request, the browser presents the sid cookie. +If the session is still valid, the request is allowed directly. +If expired, the portal redirects to the IdP. +If the IdP SSO session is still valid, a new token is issued silently via Refresh Token (no +login prompt). +If IdP SSO is also expired, the user must re-enter credentials. +6.2 API Driven Framework +Expose all business capabilities (Applications, Evaluations, Approvals, Documents, Notifications, +F&F, Reports) as versioned, secure APIs. This decouples frontends (web portal today, mobile app +tomorrow) from backend services and enables internal/partner integrations without +re-engineering. + +6.3 Frontend Layer (React.js) +The frontend of the Dealer Development Automation system will be a web portal accessible to +applicants and internal staff. It will provide intuitive forms for dealer applications , +interactive dashboards for approvals and evaluations , and comprehensive reporting +views (daily summaries, location-wise performance, F&F status). The portal will communicate +exclusively with backend services through the API Gateway , ensuring a clean separation of +concerns and enabling an API-driven architecture. +The frontend will be developed using ReactJS , chosen for its strong ecosystem and wide +community support available. React allows us to build highly responsive UIs where approval +workflows, reminders, and multi-level evaluation forms can be represented as reusable +components, reducing development effort and improving maintainability. + +6.4 Backend Service (Node.js) +Node.js has become one of the most widely adopted backend technologies because of its API +First, event-driven, non-blocking I/O architecture , which makes it highly efficient at handling +thousands of concurrent API calls, webhooks, and real-time events with minimal resource usage. +The combination of performance, developer productivity, ecosystem maturity, and platform +support makes Node.js not just a trending choice, but a future-proof technology for building +scalable, API-driven enterprise systems like the Dealer Development Automation platform + +6.5 Data Handling & Storage +PostgreSQL : Database: Primary transactional store; read replica for reporting. +Redis Cache : Session storage, rate limiting, reminder state. +Object Storage : Legal and operational document archive over cloud storage +Audit Logs : Immutable records of all approvals, actions, and data changes for +compliance. +Monitoring & Logging : Prometheus/Grafana for metrics, ELK/Cloud Logging for logs. +7 Scalability & Performance +Load Handling : 1,000 requests/minute (200 users Γ— 5 calls/minute). +API Gateway : Handles rate limiting, load balancing, routing. +Database : +PostgreSQL: Read replicas for queries. +Object Storage: Scalable for documents. +Caching : Redis for frequent queries (e.g., user roles, town lists). +Asynchronous Processing : Message Queue for emails and integrations. +Microservice-ready design allows scaling each service independently. +Event-driven architecture ensures async notifications and workflows. +Configurable workflows support regional customization. +Mobile-ready design with JWT support for future app extensions. +Libraries & Dependencies We ensure to use the libraries which are having healthy +cadence & footprint, check known issues on it’s GIT, Licence, ran by foundation or single +person & GIT Insights +8 DPDP Act Compliance +The system adheres to the Digital Personal Data Protection Act, 2023 , with the following measures: + +Data Minimization : Collect only necessary data (e.g., dealer name, contact, financial +details). +Consent Management : Obtain explicit consent via web forms, stored in a DB +Data Subject Rights : Provide interface for dealers to access their data. +Data Security : Use TLS 1.3 for data in transit and AES-256 for data at rest. +Data Localization : Deploy databases and storage in India-based cloud regions. +Breach Notification : Alerts within 72 hours of a data breach. +Audit Trails : Log all data access and modifications for compliance audits. +9 Security Requirements and Technical Implementation +DPDP-Specific : +Data Localization : Deploy in India-based regions. +Consent Management : Store consent records, provide opt-out. +Breach Notification : Alerts within 72 hours +Audit Trails : Log data access in ELK Stack. +General Security : +Encryption : TLS 1.3, AES-256. +WAF : Deploy cloud specific WAF. +MFA : Enforce for sensitive roles. +Secure APIs : Use API keys, OAuth tokens, rate limiting. +API Gateway / Reverse Proxy: TLS termination, rate limiting, request validation, +and routing. +Network Firewall: Ensures only HTTPS (443) is exposed externally; internal DBs +remain private. +Secrets Management: All API keys, DB credentials, and OAuth secrets stored in +KMS/Vault. +9.1 Input Validation and Sanitization +Requirement : Mitigate injection attacks (e.g., SQL injection, Cross-Site Scripting [XSS]) +on user inputs such as questionnaire responses, comments, and custom flow +configurations. +Rationale : Malicious inputs could execute unauthorized scripts or corrupt data, +particularly in the platform’s interactive forms and dynamic workflows. +Risk Level : Medium +Implementation Strategy : +Validation : Enforce input schemas in Node.js, validating data types (e.g., email +regex, numeric scores) before processing. +9.2 Secure File Handling +Requirement : Safeguard uploaded files (e.g., business plans, financial documents, legal +papers) against unauthorized access, tampering, or malware. +Rationale : Exposure of confidential business data could disrupt the onboarding process +or lead to legal liabilities, given the platform’s document-centric nature. +Risk Level : High +Implementation Strategy : +Storage : Utilize a secure object storage service (e.g., AWS S3 with SSE-KMS) with +private access policies and server-side encryption. +Access : Generate time-bound pre-signed URLs (e.g., 300-second expiration) via +Node.js routes, authenticated with user tokens. +9.3 DDoS and API Rate Limiting +Requirement : Defend against Distributed Denial of Service (DDoS) attacks and API abuse +during peak onboarding activity. +Rationale : High-traffic features (e.g., report downloads, progress sharing) are vulnerable +to overload, potentially disrupting service availability. +Risk Level : Medium +Implementation Strategy : +Rate Limiting : Configure express-rate-limit in Node.js to cap API requests at 100 +per minute per IP, with whitelisting for trusted sources. +DDoS Mitigation : Integrate a CDN with Web Application Firewall (WAF) +capabilities (e.g., Cloudflare) to filter malicious traffic and distribute load. +10 Monitoring & Maintenance +Monitoring : Prometheus for metrics, Grafana for dashboards. +Logging : ELK Stack for DPDP-compliant audits. +Maintenance : CI/CD pipeline with Jenkins/GitHub Actions. +11 Camunda Support +Camunda provides APIs to let external applications start, advance, and complete workflow steps. +In Camunda 7 , this is done via the REST API +(e.g., POST /process-definition/key/dealer_application/start to start a new dealer +application flow). In Camunda 8 (Zeebe engine) , APIs are available as gRPC client libraries (Java, +Node.js, Go) or via a REST gateway ; for example, a Node.js service can +call zbc.createProcessInstance({ bpmnProcessId: "dealer_application_v1", +variables: { applicantId: "APP123" } }) whenever a dealer submits an application form. +This integration allows the process instance to flow through approval tasks (ASM β†’ ZM β†’ NBH), +with each stage visible in Camunda Operate , and bottlenecks/heatmaps available in Camunda +Optimize. Camunda offers a free Community Edition (open source) for self-managed setups, and +a SaaS version (Camunda 8) with usage-based pricing; as of 2025, SaaS plans start with a free +tier (up to 5 users and limited usage) , then scale to Team/Enterprise plans based on process +instance volume, storage, and enterprise features like Optimize, Tasklist, and SLA support. \ No newline at end of file diff --git a/RE-Workflow-Management-System-Project-KickoffV1.1.pdf b/RE-Workflow-Management-System-Project-KickoffV1.1.pdf new file mode 100644 index 0000000..20a3037 Binary files /dev/null and b/RE-Workflow-Management-System-Project-KickoffV1.1.pdf differ diff --git a/RE_Abbrevations.txt b/RE_Abbrevations.txt new file mode 100644 index 0000000..616fab0 --- /dev/null +++ b/RE_Abbrevations.txt @@ -0,0 +1,93 @@ +# ROYAL ENFIELD WORKFLOW PORTAL - ABBREVIATIONS & ACRONYMS + +## Business Roles & Designations +DDL : Dealer Development Lead +ZBH : Zonal Business Head +NBH : National Business Head +CCO : Chief Commercial Officer +CEO : Chief Executive Officer +ASM : Area Sales Manager +ZM : Zone Manager +RBM : Regional Business Manager +DD : Dealer Development +SPOC : Single Point of Contact +SME : Subject Matter Expert + +## Business Processes & Documents +LOI : Letter of Intent +LOA : Letter of Agreement +FDD : Financial Due Diligence +KT : Knowledge Transfer +F&F : Full & Final Settlement +FJC : Field Journey Calendar +MOM : Minutes of Meeting +TAT : Turnaround Time +SLA : Service Level Agreement +CX : Customer Experience +GMA : Gear & Merchandise Accessories +CNR : Customer & Network Relations + +## Technical Terms & Systems +API : Application Programming Interface +SSO : Single Sign-On +RBAC : Role-Based Access Control +SAP : Systems, Applications & Products in Data Processing +DMS : Document Management System +MSD : Master Service Directory +AR : Accounts Receivable +IO : Internal Order +PR : Purchase Request +PO : Purchase Order + +## Security & Compliance +DPDP : Digital Personal Data Protection +MFA : Multi-Factor Authentication +WAF : Web Application Firewall +JWT : JSON Web Token +JWE : JSON Web Encryption +SSL : Secure Sockets Layer +XSS : Cross-Site Scripting +CSRF : Cross-Site Request Forgery +HSTS : HTTP Strict Transport Security +HPKP : HTTP Public Key Pinning +CORS : Cross-Origin Resource Sharing +MIME : Multipurpose Internet Mail Extensions + +## Database & Infrastructure +PGSQL : PostgreSQL +DAL : Database Access Layer +WAL : Write-Ahead Logging +ELK : Elasticsearch, Logstash, Kibana +CDN : Content Delivery Network +TTL : Time To Live +RTO : Recovery Time Objective +RPO : Recovery Point Objective +HA : High Availability + +## Development & Testing +UAT : User Acceptance Testing +SRS : Software Requirements Specification +CR : Change Request +MIS : Management Information System +AMS : Annual Maintenance and Support +CI : Continuous Integration +CD : Continuous Deployment + +## Workflow & BPM +BPM : Business Process Management +BPMN : Business Process Model and Notation +OCR : Optical Character Recognition + +## Cloud & Platforms +SaaS : Software as a Service +PaaS : Platform as a Service +IaaS : Infrastructure as a Service + +## Compliance & Standards +GDPR : General Data Protection Regulation +HIPAA : Health Insurance Portability and Accountability Act +OWASP : Open Web Application Security Project + + + + diff --git a/RE_FULLSCOPE_AND PROJECT_STRUCTURE.md b/RE_FULLSCOPE_AND PROJECT_STRUCTURE.md new file mode 100644 index 0000000..d2bbca5 --- /dev/null +++ b/RE_FULLSCOPE_AND PROJECT_STRUCTURE.md @@ -0,0 +1,969 @@ +# Royal Enfield Workflow Portal - Project Setup Guide + +## πŸ“ Frontend Folder Structure (React.js) + +``` +re-workflow-portal-frontend/ +β”œβ”€β”€ public/ +β”‚ β”œβ”€β”€ assets/ +β”‚ β”‚ β”œβ”€β”€ images/ +β”‚ β”‚ β”œβ”€β”€ icons/ +β”‚ β”‚ └── fonts/ +β”‚ └── favicon.ico +β”œβ”€β”€ src/ +β”‚ β”œβ”€β”€ pages/ +β”‚ β”‚ β”œβ”€β”€ auth/ +β”‚ β”‚ β”‚ β”œβ”€β”€ Login.jsx +β”‚ β”‚ β”‚ └── Register.jsx +β”‚ β”‚ β”œβ”€β”€ dashboard/ +β”‚ β”‚ β”‚ └── Dashboard.jsx +β”‚ β”‚ β”œβ”€β”€ dealer-onboarding/ +β”‚ β”‚ β”‚ β”œβ”€β”€ DealerOnboarding.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ applications/ +β”‚ β”‚ β”‚ β”‚ └── Applications.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ evaluation/ +β”‚ β”‚ β”‚ β”‚ └── Evaluation.jsx +β”‚ β”‚ β”‚ └── details/ +β”‚ β”‚ β”‚ └── DealerDetails.jsx +β”‚ β”‚ β”œβ”€β”€ dealer-offboarding/ +β”‚ β”‚ β”‚ β”œβ”€β”€ DealerOffboarding.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ resignation/ +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ResignationForm.jsx +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ResignationTracking.jsx +β”‚ β”‚ β”‚ β”‚ └── ResignationApproval.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ termination/ +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ TerminationForm.jsx +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ TerminationProcess.jsx +β”‚ β”‚ β”‚ β”‚ └── TerminationApproval.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ full-final/ +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ FFTracking.jsx +β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ FFSettlement.jsx +β”‚ β”‚ β”‚ β”‚ └── FFStakeholderTracking.jsx +β”‚ β”‚ β”‚ └── documents/ +β”‚ β”‚ β”‚ β”œβ”€β”€ ResignationLetter.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ TerminationNotice.jsx +β”‚ β”‚ β”‚ └── DocumentGeneration.jsx +β”‚ β”‚ β”œβ”€β”€ field-visit/ +β”‚ β”‚ β”‚ β”œβ”€β”€ FieldVisit.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ planning/ +β”‚ β”‚ β”‚ β”‚ └── Planning.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ execution/ +β”‚ β”‚ β”‚ β”‚ └── Execution.jsx +β”‚ β”‚ β”‚ └── mom/ +β”‚ β”‚ β”‚ └── MOM.jsx +β”‚ β”‚ β”œβ”€β”€ dealer-claim/ +β”‚ β”‚ β”‚ β”œβ”€β”€ DealerClaim.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ requests/ +β”‚ β”‚ β”‚ β”‚ └── Requests.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ proposals/ +β”‚ β”‚ β”‚ β”‚ └── Proposals.jsx +β”‚ β”‚ β”‚ └── approvals/ +β”‚ β”‚ β”‚ └── Approvals.jsx +β”‚ β”‚ β”œβ”€β”€ reports/ +β”‚ β”‚ β”‚ └── Reports.jsx +β”‚ β”‚ β”œβ”€β”€ masters/ +β”‚ β”‚ β”‚ β”œβ”€β”€ Masters.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ towns/ +β”‚ β”‚ β”‚ β”‚ └── Towns.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ dealer-codes/ +β”‚ β”‚ β”‚ β”‚ └── DealerCodes.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ evaluation-criteria/ +β”‚ β”‚ β”‚ β”‚ └── EvaluationCriteria.jsx +β”‚ β”‚ β”‚ └── workflow-templates/ +β”‚ β”‚ β”‚ └── WorkflowTemplates.jsx +β”‚ β”‚ β”œβ”€β”€ workflow-engine/ +β”‚ β”‚ β”‚ β”œβ”€β”€ WorkflowEngine.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ templatized/ +β”‚ β”‚ β”‚ β”‚ └── TemplatizedWorkflow.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ non-templatized/ +β”‚ β”‚ β”‚ β”‚ └── NonTemplatizedWorkflow.jsx +β”‚ β”‚ β”‚ └── template-builder/ +β”‚ β”‚ β”‚ └── TemplateBuilder.jsx +β”‚ β”‚ β”œβ”€β”€ user-management/ +β”‚ β”‚ β”‚ β”œβ”€β”€ UserManagement.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ roles/ +β”‚ β”‚ β”‚ β”‚ └── Roles.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ permissions/ +β”‚ β”‚ β”‚ β”‚ └── Permissions.jsx +β”‚ β”‚ β”‚ └── regional-scoping/ +β”‚ β”‚ β”‚ └── RegionalScoping.jsx +β”‚ β”‚ └── NotFound.jsx +β”‚ β”œβ”€β”€ components/ +β”‚ β”‚ β”œβ”€β”€ common/ +β”‚ β”‚ β”‚ β”œβ”€β”€ Button/ +β”‚ β”‚ β”‚ β”‚ └── Button.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Input/ +β”‚ β”‚ β”‚ β”‚ └── Input.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Modal/ +β”‚ β”‚ β”‚ β”‚ └── Modal.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Table/ +β”‚ β”‚ β”‚ β”‚ └── Table.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Loader/ +β”‚ β”‚ β”‚ β”‚ └── Loader.jsx +β”‚ β”‚ β”‚ └── Notification/ +β”‚ β”‚ β”‚ └── Notification.jsx +β”‚ β”‚ β”œβ”€β”€ layout/ +β”‚ β”‚ β”‚ β”œβ”€β”€ Header/ +β”‚ β”‚ β”‚ β”‚ └── Header.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Sidebar/ +β”‚ β”‚ β”‚ β”‚ └── Sidebar.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ Footer/ +β”‚ β”‚ β”‚ β”‚ └── Footer.jsx +β”‚ β”‚ β”‚ └── Breadcrumb/ +β”‚ β”‚ β”‚ └── Breadcrumb.jsx +β”‚ β”‚ β”œβ”€β”€ forms/ +β”‚ β”‚ β”‚ β”œβ”€β”€ DealerApplicationForm/ +β”‚ β”‚ β”‚ β”‚ └── DealerApplicationForm.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ QuestionnaireForm/ +β”‚ β”‚ β”‚ β”‚ └── QuestionnaireForm.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ EvaluationForm/ +β”‚ β”‚ β”‚ β”‚ └── EvaluationForm.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ ClaimForm/ +β”‚ β”‚ β”‚ β”‚ └── ClaimForm.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ ResignationForm/ +β”‚ β”‚ β”‚ β”‚ └── ResignationForm.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ TerminationForm/ +β”‚ β”‚ β”‚ β”‚ └── TerminationForm.jsx +β”‚ β”‚ β”‚ └── FFSettlementForm/ +β”‚ β”‚ β”‚ └── FFSettlementForm.jsx +β”‚ β”‚ β”œβ”€β”€ workflow/ +β”‚ β”‚ β”‚ β”œβ”€β”€ WorkflowViewer/ +β”‚ β”‚ β”‚ β”‚ └── WorkflowViewer.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ ApprovalFlow/ +β”‚ β”‚ β”‚ β”‚ └── ApprovalFlow.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ StatusTracker/ +β”‚ β”‚ β”‚ β”‚ └── StatusTracker.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ TemplateBuilder/ +β”‚ β”‚ β”‚ β”‚ └── TemplateBuilder.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ WorkflowEngine/ +β”‚ β”‚ β”‚ β”‚ └── WorkflowEngine.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ DynamicWorkflow/ +β”‚ β”‚ β”‚ β”‚ └── DynamicWorkflow.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ OCRProcessor/ +β”‚ β”‚ β”‚ β”‚ └── OCRProcessor.jsx +β”‚ β”‚ β”‚ └── DigitalSignature/ +β”‚ β”‚ β”‚ └── DigitalSignature.jsx +β”‚ β”‚ β”œβ”€β”€ user-management/ +β”‚ β”‚ β”‚ β”œβ”€β”€ RoleManager/ +β”‚ β”‚ β”‚ β”‚ └── RoleManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ PermissionMatrix/ +β”‚ β”‚ β”‚ β”‚ └── PermissionMatrix.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ RegionalScoping/ +β”‚ β”‚ β”‚ β”‚ └── RegionalScoping.jsx +β”‚ β”‚ β”‚ └── UserProfile/ +β”‚ β”‚ β”‚ └── UserProfile.jsx +β”‚ β”‚ β”œβ”€β”€ masters/ +β”‚ β”‚ β”‚ β”œβ”€β”€ MasterDataManager/ +β”‚ β”‚ β”‚ β”‚ └── MasterDataManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ TownManager/ +β”‚ β”‚ β”‚ β”‚ └── TownManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ DealerCodeManager/ +β”‚ β”‚ β”‚ β”‚ └── DealerCodeManager.jsx +β”‚ β”‚ β”‚ └── EvaluationCriteriaManager/ +β”‚ β”‚ β”‚ └── EvaluationCriteriaManager.jsx +β”‚ β”‚ β”œβ”€β”€ offboarding/ +β”‚ β”‚ β”‚ β”œβ”€β”€ ResignationManager/ +β”‚ β”‚ β”‚ β”‚ └── ResignationManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ TerminationManager/ +β”‚ β”‚ β”‚ β”‚ └── TerminationManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ FFSettlementManager/ +β”‚ β”‚ β”‚ β”‚ └── FFSettlementManager.jsx +β”‚ β”‚ β”‚ β”œβ”€β”€ DocumentGenerator/ +β”‚ β”‚ β”‚ β”‚ └── DocumentGenerator.jsx +β”‚ β”‚ β”‚ └── StakeholderTracker/ +β”‚ β”‚ β”‚ └── StakeholderTracker.jsx +β”‚ β”‚ └── dashboard/ +β”‚ β”‚ β”œβ”€β”€ StatCard/ +β”‚ β”‚ β”‚ └── StatCard.jsx +β”‚ β”‚ β”œβ”€β”€ ChartWidget/ +β”‚ β”‚ β”‚ └── ChartWidget.jsx +β”‚ β”‚ └── RecentActivity/ +β”‚ β”‚ └── RecentActivity.jsx +β”‚ β”œβ”€β”€ hooks/ +β”‚ β”‚ β”œβ”€β”€ useAuth.js +β”‚ β”‚ β”œβ”€β”€ useWorkflow.js +β”‚ β”‚ β”œβ”€β”€ useDealer.js +β”‚ β”‚ β”œβ”€β”€ useNotification.js +β”‚ β”‚ β”œβ”€β”€ useTemplate.js +β”‚ β”‚ β”œβ”€β”€ useOCR.js +β”‚ β”‚ β”œβ”€β”€ useDigitalSignature.js +β”‚ β”‚ β”œβ”€β”€ useUserManagement.js +β”‚ β”‚ β”œβ”€β”€ useMasterData.js +β”‚ β”‚ β”œβ”€β”€ useOffboarding.js +β”‚ β”‚ β”œβ”€β”€ useResignation.js +β”‚ β”‚ β”œβ”€β”€ useTermination.js +β”‚ β”‚ └── useFFSettlement.js +β”‚ β”œβ”€β”€ lib/ +β”‚ β”‚ β”œβ”€β”€ api/ +β”‚ β”‚ β”‚ β”œβ”€β”€ axios-config.js +β”‚ β”‚ β”‚ β”œβ”€β”€ endpoints.js +β”‚ β”‚ β”‚ └── interceptors.js +β”‚ β”‚ β”œβ”€β”€ utils/ +β”‚ β”‚ β”‚ β”œβ”€β”€ validation.js +β”‚ β”‚ β”‚ β”œβ”€β”€ formatters.js +β”‚ β”‚ β”‚ └── helpers.js +β”‚ β”‚ └── constants/ +β”‚ β”‚ β”œβ”€β”€ roles.js +β”‚ β”‚ β”œβ”€β”€ status.js +β”‚ β”‚ └── routes.js +β”‚ β”œβ”€β”€ services/ +β”‚ β”‚ β”œβ”€β”€ auth.service.js +β”‚ β”‚ β”œβ”€β”€ dealer.service.js +β”‚ β”‚ β”œβ”€β”€ workflow.service.js +β”‚ β”‚ β”œβ”€β”€ field-visit.service.js +β”‚ β”‚ β”œβ”€β”€ claim.service.js +β”‚ β”‚ β”œβ”€β”€ report.service.js +β”‚ β”‚ β”œβ”€β”€ template.service.js +β”‚ β”‚ β”œβ”€β”€ ocr.service.js +β”‚ β”‚ β”œβ”€β”€ digital-signature.service.js +β”‚ β”‚ β”œβ”€β”€ user-management.service.js +β”‚ β”‚ β”œβ”€β”€ master-data.service.js +β”‚ β”‚ β”œβ”€β”€ sms.service.js +β”‚ β”‚ β”œβ”€β”€ push-notification.service.js +β”‚ β”‚ β”œβ”€β”€ offboarding.service.js +β”‚ β”‚ β”œβ”€β”€ resignation.service.js +β”‚ β”‚ β”œβ”€β”€ termination.service.js +β”‚ β”‚ └── ff-settlement.service.js +β”‚ β”œβ”€β”€ store/ +β”‚ β”‚ β”œβ”€β”€ slices/ +β”‚ β”‚ β”‚ β”œβ”€β”€ authSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ dealerSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ workflowSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ templateSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ userManagementSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ masterDataSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ notificationSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ offboardingSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ resignationSlice.js +β”‚ β”‚ β”‚ β”œβ”€β”€ terminationSlice.js +β”‚ β”‚ β”‚ └── ffSettlementSlice.js +β”‚ β”‚ └── index.js +β”‚ β”œβ”€β”€ types/ +β”‚ β”‚ β”œβ”€β”€ auth.types.js +β”‚ β”‚ β”œβ”€β”€ dealer.types.js +β”‚ β”‚ β”œβ”€β”€ workflow.types.js +β”‚ β”‚ β”œβ”€β”€ template.types.js +β”‚ β”‚ β”œβ”€β”€ user-management.types.js +β”‚ β”‚ β”œβ”€β”€ master-data.types.js +β”‚ β”‚ β”œβ”€β”€ notification.types.js +β”‚ β”‚ β”œβ”€β”€ offboarding.types.js +β”‚ β”‚ β”œβ”€β”€ resignation.types.js +β”‚ β”‚ β”œβ”€β”€ termination.types.js +β”‚ β”‚ β”œβ”€β”€ ff-settlement.types.js +β”‚ β”‚ └── common.types.js +β”‚ β”œβ”€β”€ App.js +β”‚ β”œβ”€β”€ index.js +β”‚ └── setupTests.js +β”œβ”€β”€ .env.local +β”œβ”€β”€ .env.development +β”œβ”€β”€ .env.production +β”œβ”€β”€ webpack.config.js +β”œβ”€β”€ tailwind.config.js +β”œβ”€β”€ babel.config.js +β”œβ”€β”€ package.json +β”œβ”€β”€ package-lock.json +└── README.md +``` + +## πŸ“ Backend Folder Structure (Node.js) + +``` +re-workflow-portal-backend/ +β”œβ”€β”€ src/ +β”‚ β”œβ”€β”€ config/ +β”‚ β”‚ β”œβ”€β”€ database.config.ts +β”‚ β”‚ β”œβ”€β”€ app.config.ts +β”‚ β”‚ β”œβ”€β”€ camunda.config.ts +β”‚ β”‚ β”œβ”€β”€ email.config.ts +β”‚ β”‚ └── ad.config.ts +β”‚ β”œβ”€β”€ controllers/ +β”‚ β”‚ β”œβ”€β”€ auth.controller.ts +β”‚ β”‚ β”œβ”€β”€ dealer.controller.ts +β”‚ β”‚ β”œβ”€β”€ workflow.controller.ts +β”‚ β”‚ β”œβ”€β”€ field-visit.controller.ts +β”‚ β”‚ β”œβ”€β”€ claim.controller.ts +β”‚ β”‚ β”œβ”€β”€ report.controller.ts +β”‚ β”‚ β”œβ”€β”€ master.controller.ts +β”‚ β”‚ β”œβ”€β”€ template.controller.ts +β”‚ β”‚ β”œβ”€β”€ ocr.controller.ts +β”‚ β”‚ β”œβ”€β”€ digital-signature.controller.ts +β”‚ β”‚ β”œβ”€β”€ user-management.controller.ts +β”‚ β”‚ └── notification.controller.ts +β”‚ β”œβ”€β”€ services/ +β”‚ β”‚ β”œβ”€β”€ auth/ +β”‚ β”‚ β”‚ β”œβ”€β”€ auth.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ ad.service.ts +β”‚ β”‚ β”‚ └── jwt.service.ts +β”‚ β”‚ β”œβ”€β”€ dealer/ +β”‚ β”‚ β”‚ β”œβ”€β”€ dealer.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ onboarding.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ offboarding.service.ts +β”‚ β”‚ β”‚ └── evaluation.service.ts +β”‚ β”‚ β”œβ”€β”€ workflow/ +β”‚ β”‚ β”‚ β”œβ”€β”€ camunda.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ approval.service.ts +β”‚ β”‚ β”‚ └── notification.service.ts +β”‚ β”‚ β”œβ”€β”€ field-visit/ +β”‚ β”‚ β”‚ └── field-visit.service.ts +β”‚ β”‚ β”œβ”€β”€ claim/ +β”‚ β”‚ β”‚ └── claim.service.ts +β”‚ β”‚ β”œβ”€β”€ email/ +β”‚ β”‚ β”‚ β”œβ”€β”€ email.service.ts +β”‚ β”‚ β”‚ └── template.service.ts +β”‚ β”‚ β”œβ”€β”€ report/ +β”‚ β”‚ β”‚ └── report.service.ts +β”‚ β”‚ └── integration/ +β”‚ β”‚ β”œβ”€β”€ sap.service.ts +β”‚ β”‚ β”œβ”€β”€ dms.service.ts +β”‚ β”‚ β”œβ”€β”€ website-integration.service.ts +β”‚ β”‚ └── third-party-auditor.service.ts +β”‚ β”‚ β”œβ”€β”€ workflow/ +β”‚ β”‚ β”‚ β”œβ”€β”€ templatized-workflow.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ non-templatized-workflow.service.ts +β”‚ β”‚ β”‚ └── template-builder.service.ts +β”‚ β”‚ β”œβ”€β”€ ocr/ +β”‚ β”‚ β”‚ └── ocr.service.ts +β”‚ β”‚ β”œβ”€β”€ digital-signature/ +β”‚ β”‚ β”‚ └── digital-signature.service.ts +β”‚ β”‚ β”œβ”€β”€ user-management/ +β”‚ β”‚ β”‚ β”œβ”€β”€ user-management.service.ts +β”‚ β”‚ β”‚ β”œβ”€β”€ role-management.service.ts +β”‚ β”‚ β”‚ └── regional-scoping.service.ts +β”‚ β”‚ β”œβ”€β”€ master-data/ +β”‚ β”‚ β”‚ └── master-data.service.ts +β”‚ β”‚ └── notification/ +β”‚ β”‚ β”œβ”€β”€ sms.service.ts +β”‚ β”‚ └── push-notification.service.ts +β”‚ β”œβ”€β”€ models/ +β”‚ β”‚ β”œβ”€β”€ user.model.ts +β”‚ β”‚ β”œβ”€β”€ dealer.model.ts +β”‚ β”‚ β”œβ”€β”€ application.model.ts +β”‚ β”‚ β”œβ”€β”€ workflow.model.ts +β”‚ β”‚ β”œβ”€β”€ approval.model.ts +β”‚ β”‚ β”œβ”€β”€ field-visit.model.ts +β”‚ β”‚ β”œβ”€β”€ claim.model.ts +β”‚ β”‚ β”œβ”€β”€ document.model.ts +β”‚ β”‚ β”œβ”€β”€ master.model.ts +β”‚ β”‚ β”œβ”€β”€ template.model.ts +β”‚ β”‚ β”œβ”€β”€ workflow-template.model.ts +β”‚ β”‚ β”œβ”€β”€ ocr-result.model.ts +β”‚ β”‚ β”œβ”€β”€ digital-signature.model.ts +β”‚ β”‚ β”œβ”€β”€ role.model.ts +β”‚ β”‚ β”œβ”€β”€ permission.model.ts +β”‚ β”‚ β”œβ”€β”€ regional-scope.model.ts +β”‚ β”‚ └── notification.model.ts +β”‚ β”œβ”€β”€ routes/ +β”‚ β”‚ β”œβ”€β”€ auth.routes.ts +β”‚ β”‚ β”œβ”€β”€ dealer.routes.ts +β”‚ β”‚ β”œβ”€β”€ workflow.routes.ts +β”‚ β”‚ β”œβ”€β”€ field-visit.routes.ts +β”‚ β”‚ β”œβ”€β”€ claim.routes.ts +β”‚ β”‚ β”œβ”€β”€ report.routes.ts +β”‚ β”‚ β”œβ”€β”€ master.routes.ts +β”‚ β”‚ β”œβ”€β”€ template.routes.ts +β”‚ β”‚ β”œβ”€β”€ ocr.routes.ts +β”‚ β”‚ β”œβ”€β”€ digital-signature.routes.ts +β”‚ β”‚ β”œβ”€β”€ user-management.routes.ts +β”‚ β”‚ └── notification.routes.ts +β”‚ β”œβ”€β”€ middleware/ +β”‚ β”‚ β”œβ”€β”€ auth.middleware.ts +β”‚ β”‚ β”œβ”€β”€ role.middleware.ts +β”‚ β”‚ β”œβ”€β”€ validation.middleware.ts +β”‚ β”‚ β”œβ”€β”€ error.middleware.ts +β”‚ β”‚ └── logging.middleware.ts +β”‚ β”œβ”€β”€ validators/ +β”‚ β”‚ β”œβ”€β”€ dealer.validator.ts +β”‚ β”‚ β”œβ”€β”€ workflow.validator.ts +β”‚ β”‚ β”œβ”€β”€ claim.validator.ts +β”‚ β”‚ └── common.validator.ts +β”‚ β”œβ”€β”€ utils/ +β”‚ β”‚ β”œβ”€β”€ logger.ts +β”‚ β”‚ β”œβ”€β”€ response.ts +β”‚ β”‚ β”œβ”€β”€ error-handler.ts +β”‚ β”‚ β”œβ”€β”€ file-upload.ts +β”‚ β”‚ └── date-helper.ts +β”‚ β”œβ”€β”€ jobs/ +β”‚ β”‚ β”œβ”€β”€ email-reminder.job.ts +β”‚ β”‚ β”œβ”€β”€ application-expiry.job.ts +β”‚ β”‚ └── ff-notification.job.ts +β”‚ β”œβ”€β”€ types/ +β”‚ β”‚ β”œβ”€β”€ express.d.ts +β”‚ β”‚ └── custom.types.ts +β”‚ └── app.ts +β”œβ”€β”€ bpmn/ +β”‚ β”œβ”€β”€ dealer-onboarding.bpmn +β”‚ β”œβ”€β”€ dealer-offboarding.bpmn +β”‚ β”œβ”€β”€ field-visit.bpmn +β”‚ └── claim-settlement.bpmn +β”œβ”€β”€ tests/ +β”‚ β”œβ”€β”€ unit/ +β”‚ β”œβ”€β”€ integration/ +β”‚ └── e2e/ +β”œβ”€β”€ scripts/ +β”‚ β”œβ”€β”€ seed-data.ts +β”‚ └── deploy-bpmn.ts +β”œβ”€β”€ .env +β”œβ”€β”€ .env.development +β”œβ”€β”€ .env.production +β”œβ”€β”€ tsconfig.json +β”œβ”€β”€ package.json +└── README.md +``` + +## πŸ—‚οΈ Database Structure (PostgreSQL) + +**Note:** Updated from MongoDB to PostgreSQL for better ACID compliance, complex queries, and enterprise integration requirements. + +``` +Tables: +β”œβ”€β”€ users +β”œβ”€β”€ roles +β”œβ”€β”€ permissions +β”œβ”€β”€ regional_scopes +β”œβ”€β”€ dealers +β”œβ”€β”€ applications +β”œβ”€β”€ questionnaires +β”œβ”€β”€ evaluations +β”œβ”€β”€ approvals +β”œβ”€β”€ workflows +β”œβ”€β”€ workflow_templates +β”œβ”€β”€ template_instances +β”œβ”€β”€ field_visits +β”œβ”€β”€ claims +β”œβ”€β”€ documents +β”œβ”€β”€ ocr_results +β”œβ”€β”€ digital_signatures +β”œβ”€β”€ notifications +β”œβ”€β”€ audit_logs +β”œβ”€β”€ masters +β”‚ β”œβ”€β”€ towns +β”‚ β”œβ”€β”€ dealer_codes +β”‚ β”œβ”€β”€ evaluation_criteria +β”‚ └── workflow_definitions +β”œβ”€β”€ reports_cache +β”œβ”€β”€ sms_logs +β”œβ”€β”€ push_notifications +└── website_integrations +``` + +## πŸ“… Sprint-wise Breakdown (16-18 Weeks) + +### **Sprint 0: Setup & Infrastructure (1 Week)** +**Duration:** Week 1 + +**Frontend Tasks:** +- [ ] Initialize React.js project with Create React App or Vite +- [ ] Setup Tailwind CSS +- [ ] Configure folder structure +- [ ] Setup Redux Toolkit for state management +- [ ] Configure Axios interceptors +- [ ] Setup React Router DOM for routing +- [ ] Configure authentication scaffolding + +**Backend Tasks:** +- [ ] Initialize Node.js/Express project +- [ ] Setup PostgreSQL connection with Prisma ORM +- [ ] Configure Camunda/Newgen integration +- [ ] Setup JWT authentication +- [ ] Configure email service (SMTP) +- [ ] Setup logging middleware +- [ ] Configure CORS and security headers + +**DevOps:** +- [ ] Setup Git repository +- [ ] Configure CI/CD pipeline +- [ ] Setup development environment + +--- + +### **Sprint 1: Authentication & User Management (2 Weeks)** +**Duration:** Week 2-3 + +**Frontend Tasks:** +- [ ] Login page with AD integration using React Router +- [ ] User registration form with React Hook Form +- [ ] Role management UI with Material-UI components +- [ ] User profile page with responsive design +- [ ] Dashboard layout with sidebar/header navigation + +**Backend Tasks:** +- [ ] Implement AD authentication +- [ ] JWT token generation and validation +- [ ] User CRUD operations +- [ ] Role-based access control (RBAC) +- [ ] User profile management APIs + +**Integration Points:** +- Login API β†’ Frontend auth flow +- User registration β†’ Email notification +- Role assignment β†’ Permission matrix + +**Deliverable:** Fully functional authentication system + +--- + +### **Sprint 2: Master Data Management (1 Week)** +**Duration:** Week 4 + +**Frontend Tasks:** +- [ ] Master data management UI (towns, dealer codes, evaluation criteria, workflow definitions) +- [ ] CRUD forms for masters with validation +- [ ] Data tables with advanced filters and search +- [ ] Bulk upload functionality with progress tracking +- [ ] Master data versioning and audit trail + +**Backend Tasks:** +- [ ] Master data APIs (CRUD with proper validation) +- [ ] Data validation and business rules +- [ ] Bulk upload processing with error handling +- [ ] Master data synchronization with external systems +- [ ] Audit logging for all master data changes + +**Integration Points:** +- Master data APIs β†’ Frontend forms +- File upload β†’ Backend processing with validation +- External system sync β†’ Master data updates + +--- + +### **Sprint 2.5: Custom Workflow Engine (1 Week)** +**Duration:** Week 4.5 + +**Frontend Tasks:** +- [ ] Templatized workflow builder UI +- [ ] Non-templatized workflow creation interface +- [ ] Template selection and configuration +- [ ] Dynamic role assignment interface +- [ ] Workflow visualization and monitoring +- [ ] Exception handling and escalation UI + +**Backend Tasks:** +- [ ] Templatized workflow engine implementation +- [ ] Non-templatized workflow engine implementation +- [ ] Template builder service with validation +- [ ] Dynamic role assignment logic +- [ ] Exception handling and escalation matrix +- [ ] Workflow state management and persistence + +**Integration Points:** +- Workflow templates β†’ Business process automation +- Dynamic workflows β†’ Ad-hoc process handling +- Template builder β†’ Workflow configuration + +**Deliverable:** Fully functional custom workflow engine supporting both templatized and non-templatized workflows + +--- + +### **Sprint 3-5: Dealer Onboarding Module (Phase 1) (3 Weeks)** +**Duration:** Week 5-7 + +#### **Sprint 3: Application Capture** + +**Frontend Tasks:** +- [ ] "Become a Dealer" form integration +- [ ] Application listing with filters +- [ ] Application detail view +- [ ] Questionnaire web form + +**Backend Tasks:** +- [ ] Website form integration API ("Become a Dealer" form capture) +- [ ] Real-time/hourly data synchronization from RE website +- [ ] Application capture and storage with validation +- [ ] Auto-acknowledgment email with template engine +- [ ] Opportunity/Non-opportunity email logic with vacancy checking +- [ ] Questionnaire generation and scoring with weighted ranking +- [ ] D+2 and D+5 reminder emails (cron job with configurable TAT) +- [ ] Third-party FDD auditor integration with OTP-protected links + +**Integration:** +- Form submission β†’ Backend processing β†’ Email trigger +- Questionnaire link β†’ Form submission β†’ Scoring + +#### **Sprint 4: Evaluation & Assignment** + +**Frontend Tasks:** +- [ ] Shortlisting interface for DD team +- [ ] Evaluation form for ZM-DD +- [ ] Assignment workflow UI +- [ ] Approval tracking dashboard + +**Backend Tasks:** +- [ ] Ranking algorithm implementation +- [ ] Assignment workflow (DD β†’ ZM-DD β†’ RBM β†’ DDL) +- [ ] Approval logic with rejection handling +- [ ] Camunda workflow integration + +**Integration:** +- Assignment actions β†’ Workflow engine β†’ Email notifications +- Status updates β†’ Real-time dashboard refresh + +#### **Sprint 5: Financial & Legal Approvals** + +**Frontend Tasks:** +- [ ] FDD report upload interface +- [ ] NBH approval UI +- [ ] Document management interface + +**Backend Tasks:** +- [ ] OTP-protected link generation +- [ ] FDD report processing +- [ ] NBH approval workflow +- [ ] Document storage (DMS integration) + +--- + +### **Sprint 5.5: OCR & Digital Signature Integration (1 Week)** +**Duration:** Week 7.5 + +**Frontend Tasks:** +- [ ] Document upload interface with OCR preview +- [ ] Digital signature capture and validation UI +- [ ] OCR result display and verification +- [ ] Document comparison and validation interface +- [ ] Signature verification and audit trail + +**Backend Tasks:** +- [ ] OCR service integration (third-party API) +- [ ] Document processing and text extraction +- [ ] Digital signature validation and storage +- [ ] Document verification and comparison logic +- [ ] Audit trail for all document operations +- [ ] Secure document storage with encryption + +**Integration Points:** +- Document upload β†’ OCR processing β†’ Validation +- Digital signatures β†’ Secure storage β†’ Audit trail +- Document verification β†’ Workflow automation + +**Deliverable:** Complete OCR and digital signature functionality for document processing workflows + +--- + +### **Sprint 6-7: Dealer Onboarding (Phase 2) (2 Weeks)** +**Duration:** Week 8-9 + +**Frontend Tasks:** +- [ ] LOI/LOA generation UI +- [ ] EOR audit scheduling interface +- [ ] Dealer information capture form +- [ ] Onboarding completion dashboard + +**Backend Tasks:** +- [ ] LOI/LOA auto-generation +- [ ] Email automation with CC +- [ ] EOR audit workflow +- [ ] Dealer code assignment +- [ ] Integration with SAP (dealer creation) + +**Integration:** +- Document generation β†’ Email β†’ Storage +- SAP API integration β†’ Dealer code sync + +--- + +### **Sprint 8-9: Dealer Offboarding (2 Weeks)** +**Duration:** Week 10-11 + +**Frontend Tasks:** +- [ ] Resignation submission form +- [ ] Termination process UI +- [ ] F&F tracking dashboard +- [ ] Multi-level approval interface + +**Backend Tasks:** +- [ ] Resignation workflow (ZBH β†’ DD Lead β†’ NBH) +- [ ] Termination workflow (ZBH β†’ DD Lead β†’ NBH β†’ CCO β†’ CEO) +- [ ] Resignation acceptance letter generation +- [ ] Termination notice generation +- [ ] F&F process tracking +- [ ] Stakeholder notification system +- [ ] Dealer blocking logic + +**Integration:** +- Resignation/Termination β†’ Approval workflow β†’ F&F initiation +- F&F tracking β†’ Email reminders β†’ Status updates + +--- + +### **Sprint 10-11: Field Visit Report Module (2 Weeks)** +**Duration:** Week 12-13 + +**Frontend Tasks:** +- [ ] FJC planning interface +- [ ] Visit execution forms +- [ ] Discussion management UI +- [ ] MOM creation and tracking +- [ ] Document sharing interface + +**Backend Tasks:** +- [ ] FJC planning APIs +- [ ] Visit scheduling and re-planning logic +- [ ] Discussion capture and storage +- [ ] MOM generation +- [ ] Approval workflow +- [ ] Document archiving + +**Integration:** +- Planning β†’ Execution β†’ MOM β†’ Approval β†’ Archive + +--- + +### **Sprint 12-13: Dealer Claim Settlement Module (2 Weeks)** +**Duration:** Week 14-15 + +**Frontend Tasks:** +- [ ] Activity request form +- [ ] Proposal submission interface +- [ ] Evaluation and approval UI +- [ ] Claim approval workflow +- [ ] Budget tracking dashboard + +**Backend Tasks:** +- [ ] Request initiation workflow +- [ ] Proposal evaluation logic +- [ ] Multi-level approval (Requestor β†’ Dept Lead) +- [ ] Budget blocking (IO integration) +- [ ] Activity creation automation +- [ ] Claim approval logic +- [ ] E-invoice and credit note generation + +**Integration:** +- Request β†’ Proposal β†’ Approval β†’ Budget β†’ Activity β†’ Claim + +--- + +### **Sprint 14: Reports & Analytics (1 Week)** +**Duration:** Week 16 + +**Frontend Tasks:** +- [ ] Report listing with advanced filters and search +- [ ] Interactive dashboard widgets with real-time updates +- [ ] Excel/PDF export functionality with custom formatting +- [ ] Real-time metrics display with WebSocket integration +- [ ] Report scheduling and automated delivery +- [ ] Custom report builder interface + +**Backend Tasks:** +- [ ] **Dealer-wise Report API** - Comprehensive dealer performance and status reports +- [ ] **MIS Report API** - Management Information System reports with KPIs +- [ ] **Pending Request Report API** - All pending requests with aging analysis +- [ ] **F&F Tracking Report API** - Full & Final settlement tracking by stakeholder +- [ ] **Application Summary Report API** - Application pipeline and conversion metrics +- [ ] Dashboard metrics API with real-time data +- [ ] Excel/PDF generation logic with custom templates +- [ ] Report caching and performance optimization + +--- + +### **Sprint 15: Notifications & Cron Jobs (1 Week)** +**Duration:** Week 17 + +**Frontend Tasks:** +- [ ] Notification preferences management UI +- [ ] Real-time notification display with toast messages +- [ ] Notification history and tracking interface +- [ ] Multi-channel notification configuration + +**Backend Tasks:** +- [ ] **Email Notification Service** - Template-based email with delivery tracking +- [ ] **SMS Notification Service** - Bulk SMS with delivery confirmation +- [ ] **Push Notification Service** - Firebase integration for mobile/web push +- [ ] Email reminder cron jobs with configurable schedules +- [ ] Application expiry job with escalation +- [ ] F&F reminder job with stakeholder notifications +- [ ] Approval pending reminder job with aging alerts +- [ ] Multi-channel notification orchestration +- [ ] Notification delivery tracking and analytics + +--- + +### **Sprint 16: Testing & Bug Fixes (1 Week)** +**Duration:** Week 18 + +**Tasks:** +- [ ] Unit testing +- [ ] Integration testing +- [ ] UAT support +- [ ] Bug fixes +- [ ] Performance optimization + +--- + +## πŸ”„ Frontend-Backend Integration Strategy + +### **Parallel Development Approach** + +``` +Week 1: Setup (Both teams working on infrastructure) +β”œβ”€β”€ Frontend: Project setup, authentication UI +└── Backend: Project setup, authentication APIs + +Week 2-3: Authentication Module +β”œβ”€β”€ Frontend builds login β†’ Backend provides APIs β†’ Integration +└── Daily sync meetings for API contract review + +Week 4: Master Data +β”œβ”€β”€ Frontend builds CRUD UI β†’ Backend provides APIs β†’ Integration +└── Mock data used initially, then real API integration + +Week 5-7: Dealer Onboarding (Phase 1) +β”œβ”€β”€ Frontend builds forms β†’ Backend builds workflow β†’ Integration +β”œβ”€β”€ Mock APIs used for frontend development +└── Real integration after backend APIs are ready + +... (Pattern continues for all sprints) +``` + +### **Integration Milestones** + +1. **End of Sprint 1:** Authentication working end-to-end +2. **End of Sprint 2:** Master data management working +3. **End of Sprint 5:** Dealer onboarding (Phase 1) fully integrated +4. **End of Sprint 7:** Complete onboarding cycle working +5. **End of Sprint 9:** Offboarding workflows integrated +6. **End of Sprint 11:** Field visit module integrated +7. **End of Sprint 13:** Claim settlement module integrated +8. **End of Sprint 14:** All reports working + +### **Daily Integration Workflow** + +``` +Morning Standup (15 mins) +β”œβ”€β”€ Frontend team shares progress +β”œβ”€β”€ Backend team shares API status +└── Identify integration blockers + +Mid-day Sync (as needed) +β”œβ”€β”€ API contract review +β”œβ”€β”€ Mock data alignment +└── Quick integration tests + +End of Day +β”œβ”€β”€ Code push to develop branch +β”œβ”€β”€ Integration testing on dev environment +└── Bug logging in ZOHO +``` + +### **API Development Process** + +``` +1. Backend team creates API documentation (Swagger/Postman) +2. Frontend team reviews and provides feedback +3. Backend implements APIs +4. Frontend uses mock APIs during development +5. Integration happens when backend APIs are ready +6. Testing on dev environment +7. Bug fixes and optimization +``` + +--- + +## πŸ› οΈ Technology Stack + +### Frontend +- **Framework:** React.js 18+ (Create React App / Vite) +- **Language:** JavaScript (ES6+) - Updated from TypeScript for simplicity +- **Styling:** Tailwind CSS +- **State Management:** Redux Toolkit / Zustand +- **API Client:** Axios +- **Form Handling:** React Hook Form + Yup +- **UI Components:** Material-UI / Ant Design +- **Charts:** Recharts / Chart.js +- **Date Handling:** date-fns +- **Routing:** React Router DOM +- **Build Tool:** Webpack / Vite + +### Backend +- **Runtime:** Node.js 20+ +- **Framework:** Express.js +- **Language:** TypeScript +- **Database:** PostgreSQL (Updated from MongoDB for better ACID compliance and enterprise integration) +- **ORM:** Prisma (Updated from Mongoose for PostgreSQL compatibility) +- **Authentication:** JWT + Passport.js +- **BPM Platform:** Camunda Zeebe (or Newgen) +- **Email:** Nodemailer +- **Validation:** Joi / Zod +- **Logging:** Winston +- **Cron Jobs:** node-cron + +### DevOps +- **Version Control:** Git (GitLab) +- **Project Management:** ZOHO PMS +- **CI/CD:** GitLab CI or Jenkins +- **Hosting:** TBD (AWS/Azure) + +--- + + + +## πŸ“ Key Integration Points + +1. **Authentication Flow** + - AD login β†’ JWT token β†’ Protected routes β†’ Role-based access + +2. **Website Integration** + - "Become a Dealer" form β†’ Real-time sync β†’ Application processing + +3. **Dealer Onboarding Flow** + - Form submission β†’ Workflow engine β†’ Multi-level approvals β†’ Multi-channel notifications + +4. **Custom Workflow Engine** + - Template selection β†’ Dynamic role assignment β†’ Process execution β†’ Exception handling + +5. **Document Management** + - File upload β†’ OCR processing β†’ Digital signature β†’ Secure storage β†’ DMS integration + +6. **SAP Integration** + - Dealer creation β†’ Budget blocking β†’ Invoice generation β†’ Code synchronization + +7. **Multi-Channel Notifications** + - Workflow events β†’ Template engine β†’ Email/SMS/Push dispatch β†’ Delivery tracking + +8. **Third-Party Integrations** + - FDD auditor links β†’ OTP validation β†’ Document upload β†’ Processing + +9. **Real-time Updates** + - WebSocket/SSE for dashboard updates β†’ Live notifications β†’ Status tracking + +10. **Reporting Integration** + - Data aggregation β†’ Report generation β†’ Export functionality β†’ Scheduled delivery + +--- + +## βœ… Best Practices + +1. **API Versioning:** Use `/api/v1/` prefix +2. **Error Handling:** Consistent error response format +3. **Logging:** Log all API calls and errors +4. **Documentation:** Keep API documentation updated +5. **Code Reviews:** Mandatory for all PRs +6. **Testing:** Minimum 70% code coverage +7. **Security:** Input validation, SQL injection prevention, XSS protection + +## πŸ”’ Enhanced Security & Compliance Features + +### **DPDP Act Compliance** +- Data minimization and purpose limitation +- Explicit consent management with audit trails +- Data subject rights (access, portability, deletion) +- Data localization within India +- Breach notification within 72 hours +- Privacy by design implementation + +### **Advanced Security Measures** +- WAF (Web Application Firewall) protection +- MFA (Multi-Factor Authentication) for sensitive roles +- JWT token management with secure rotation +- Field-level encryption for sensitive data +- Secure document storage with AES-256 encryption +- Comprehensive audit logging for compliance + +### **Access Control & Authorization** +- Role-based access control (RBAC) with granular permissions +- Regional scoping for data access +- Principle of least privilege implementation +- Session management with automatic timeout +- API rate limiting and abuse prevention + +--- + diff --git a/Royal Enfield- Proposal Workflow Portal-WITH BPM Platform approach-1.06.txt b/Royal Enfield- Proposal Workflow Portal-WITH BPM Platform approach-1.06.txt new file mode 100644 index 0000000..c1cbb27 --- /dev/null +++ b/Royal Enfield- Proposal Workflow Portal-WITH BPM Platform approach-1.06.txt @@ -0,0 +1,649 @@ + + + +Revision History +Project +Workflow Management and dealer onboarding +Deliverable +Proposal document + +Executive Summary +Royal Enfield is an Indian multinational motorcycle manufacturing company headquartered in Chennai, Tamil Nadu, India. The Royal Enfield brand, The oldest motorcycle brand in continuous production, Royal Enfield made its first motorcycle in 1901. A division of Eicher Motors Limited, Royal Enfield has created the mid-size motorcycle segment in India with its unique and distinctive modern classic motorcycles. The company operates manufacturing plants in Chennai in India. +Softude is a global IT consulting and services company established in 2005, specializing in digital transformation and software product engineering. With over 4000 successful projects delivered, our innovative software solutions are used in 32+ countries, connecting audiences across various industries. Our highly skilled team delivers exceptional digital solutions that accelerate our clients' digital-first journey. +Our team has extensive expertise in the development and implementation of customised solutions specifically designed for the automotive industry. We have a deep understanding of the unique challenges and requirements faced by automotive operation teams, allowing us to provide highly specialized and effective solutions. +In developing our response, we have considered our experiences associated with: +With 30years + experience in automotive industry and having good expertise encompasses various aspects of the industry. +Scope +Approach: Custom Platform development through BPM Platforms +1. Camunda Zeebe (Opensource) or +2. Newgen (Saas) +The scope of this project includes the design, development, testing, and deployment of a workflow platform using BPM Platforms (Saas), Customizable with the following key features: +* Front-end Development: Build a user-friendly interface using Next.js +* Back-end Development: Implement robust back-end services using technologies compatible with MongoDB. +* Database Management: Utilize MongoDB for data storage and retrieval. +* Enterprise Integration: Develop integration capabilities with SAP and DMS systems. +* User Management: Implement secure user authentication and authorization with Single Sign-On (SSO). +* Workflow Automation: Create tools for designing, automating, and adding new workflows. +* Access Control: Implement role-based access control to manage user permissions. +Reporting and Analytics: Provide reporting dashboards to monitor workflow performance. +Note: Considering 5 reports and one Dashboard with +Develop a workflow platform for below mentioned services. The platform will use Next.js for the front-end, MongoDB for data storage, and provide back-end interfacing capabilities with enterprise applications like SAP and DMS. +Current Scope: +The initial scope of this project includes the development of the following workflows: +* Dealer Onboarding/Offboarding Process +* Field Visit Report & Action Plan +* Dealer Claim Management + + +Project 1: Dealer Onboarding and Offboarding +Below is the feature listing we have considered based on our discussion on the requirements +1. Master Module: This module includes the master data that is used in various stages of the process. It includes data such as prospect details, evaluation criteria, town list, dealer codes, etc. The role of this module is to maintain and update the master data as required. +2. Workflow Module: This module defines the workflow of the entire process, including the sequence of activities, approvals, and notifications. It ensures that the process flows smoothly from one stage to another. The role of this module is to automate and manage the workflow of the process. Implementation based on the proposed document +3. Onboarding Process Module: This module focuses on the onboarding process of the selected candidates. It includes activities such as LOI issuance, document submission, evaluation, final interview presentation, etc. this module is to facilitate and track the onboarding process of the selected candidates. +* Sending opportunity link emails to applicants in vacant locations. (manual) +* Create the application form and collecting dealer application responses through a form and calculating scores based on predefined criteria. +* Providing alerts for non-respondents to the dealer application form at different stages based on the defined TAT +* Sharing top candidate lists for further evaluation +* Sending reminder emails to non-respondents of the dealer application form. +* Data Collection: Creating forms or input fields to collect data from users +* Data Storage: Storing collected data in a database or file system, Document Management: Uploading, organizing, and hold documents within the software. +* Retrieving and displaying stored data based on user queries or filters. And roles and access. +* Enforcing data validation rules to ensure data integrity and accuracy. +* Task Assignment and Tracking: Assigning tasks to users and tracking their progress. +* Feedback and marks: Allowing users to provide feedback or reviews(marks) on certain stages from respective role. +* Plan and conducting face-to-face interviews and evaluations with prospects. And provide option to input marks +* Manual process: Conducting ASM first interactions, RBM and ZM-DD interviews, DD Lead and ZBH interviews. + +4. Role Module: This module defines the roles and access rights of different users involved in the process, list of role is defined are Admin ID, DD Lead, IT Team, ZM DD, RBM, ZBH, NBH. It ensures that each user has the appropriate access and permissions to perform their tasks. +The role of this module is to manage and assign roles to the users. Please note that the specific details and functionalities of each module may vary based on the actual implementation and system requirements. +Access Control: Implementing different levels of access for users based on their roles and permissions. +Role-based Dashboards: Creating customized dashboards for different user roles to display relevant information. + +5. Reporting module +Reporting and Analytics: Generating reports and conducting data analysis on the collected data. We will create list of 5 reports which will provide the data in defined format with filer and excel export. +# +Module +Task +Subtask +1 +Database design +Create database tables +1) Database and tables creation +2 +Inquiry capture and initial response +Automate "Become a Dealer" Form Capture. +1) Integrate with RE official website to fetch form data in real-time or on an hourly basis. + + + +2) Store data in the system for record-keeping and show the listing on the system along with the filers + + +Automated Acknowledgement Email +1)Configure an email template with placeholders for applicant details. + + + +2) Send an automated email to acknowledge the enquiry. + + +Automated Non-Opportunity Email +1) Identify locations with no vacancy and send a rejection email. + + + +2) Configure email templates with dynamic placeholders + + +Opportunity Email with Questionnaire +1) Create a web link for the questionnaire with: +Objective questions. +- Fill-in-the-blank responses. +- File upload options. +- Free text boxes. + + + +2) Configure and send email containing the web link +3 +Questionnaire Processing +Assign Weightage to Questionnaire Responses +1) Develop logic to calculate rank based on weighted responses + + +Automate Notifications for Incomplete Responses +1) Configure email reminders at D+2 and D+5 days for pending responses + + +Close Questionnaire on Expiry +1) Allow configurable expiration date for the web link (default: 20 days). + + + +2) Disable further responses after expiry. +4 +Enquiry Shortlisting and Assignment +Shortlisting by DD Team +1) Enable manual assignment of top 10 prospects to Zonal Manager (ZM-DD) based on rank. + + + +2) Capture reasons for shortlisting during assignment + + +KT Evaluation by ZM-DD +1) Allow ZM-DD to evaluate and mark prospects as shortlisted or rejected. + + +Assign to Regional Business Manager (RBM) +1) After evaluation leads comes to RBMs post-evaluation automatically. Allow RBM for evalution + + + +2) Capture reasons for the assignment and store in the database + + +Assign to DDL team +1) Lead automatically assign to DDL team after approval of RBM. + + + +2) Capture reason for the assignment and store in the database +5 +Financial and Legal Approvals +Upload Financial Due Diligence Reports +1) Provide an upload option for third-party financial reports through link, link will be OTP protected over email and that will be expire after getting the response. +2) FDD auditor for L1 and L2 , email for external agencies will be configured + + +Submit Approval to NBH +1) Allow DD Team to submit financial due diligence reports to NBH for approval + + + +2) Store NBH approvals in the system +6 +Dealer Onboarding +Issue LOI (Letter of Intent) +1) Automate LOI generation and email to prospects with CC to relevant teams + + + +2) Enable file upload for LOI storage + + +Issue LOA (Letter of Agreement) +1) Automate LOA generation and email to prospects with CC to relevant teams + + + +2) Enable file upload for LOA storage. + + +Schedule EOR Audit +1) Allow Regional DD Team to schedule and complete the audit. + + + +2) Provide format and upload option for audit reports. + + +EOR Approval +1) Capture NBH approval for EOR audit with a file upload option + + +Update Dealer Information +1) Capture and store inauguration date, dealer codes for sales, service, GMA, and Gear. +7 +Dealer Resignation Handling +Resignation Submission +1) Dealer will send email to ZBH and ZBH will take it forward and record in the system. we will manage the tracking of each activity. + + +Approval Workflow + 1) Approval work flow work same as we are doing during onboarding, below are the level where we need to manage the approval/rejection flow. +- Zonal Business Head (ZBH). +- Dealer Development Lead (DD Lead). +- National Business Head (NBH). + +2) If request rejected at any level , the request will go back to its previous level automatically and there will be a mail notification for the same to the responsible person. + + +Generate Resignation Acceptance Letter +1) Automate legal format generation for resignation acceptance after final NBH approval + + + +2) Enable NBH to approve and share the letter with predefined format with the dealer. +8 +Dealer Termination Process +Identify Termination Reasons +1) Create categories: Business, CX Issues, Ethical Issues, and Unforeseen Circumstances +2) Types of termination - a) Immediate termination b) Termination by convenience + + +Collect and Upload Documentation +1) Allow ASM to collect and upload all communication documents + + +Prepare Termination Notes +1) Automate generation of termination notes in pdf format + + +Approval Workflow +1) Approval work flow work same as we are doing during onboarding, below are the level where we need to manage the approval/rejection flow. + - Zonal Business Head (ZBH). + - Dealer Development Lead (DD Lead). + - Dealer Development Lead (NBH). + - Chief Commercial Officer (CCO). + - Chief Executive Officer (CEO). + +2) If request rejected at any level , the request will go back to its previous level automatically and there will be a mail notification for the same to the responsible person. + + +Issue Termination Notice +1) Automate show cause notice generation with legal concurrence. + + + +2) Notify dealers with 15-day response deadlines + + +Upload Signed Termination Letter +1) Allow DD Lead to upload signed termination documents to the portal +9 +Notifications and Reminders +Automated Email Reminders +1) Configure reminders for pending tasks (KT evaluations, approvals, Termination request pending, resignation request pending). +2) Mail need to be configured for the same. +3) Cron jobs need to be configured +# +Dashboard +Dashboard for Process Monitoring +1) Real-time dashboard showing the status of enquiries, approvals, and onboarding +2) Displays a high-level overview of all ongoing processes and key metrics such as total inquiries, pending approvals, and current statuses +# +User Login Module +Develop Login Interface +1) Design a secure login page, which allow user to redirect to AD, System user login thorugh AD +# +System user management/registration +Develop Registration Interface +1) Design a user-friendly registration form + + + +2) Collect user details: + - Name. + - Email. + - Contact number. + - Role (dropdown: Admin, Dealer Development, Regional Manager, etc.). +Password (with complexity rules) +3) Basic validation will be there. +# +Role Management Module + +1) Role creation form along with the permission + + + +2) Role Active/Inactive and listing with the filters +# +User Profile Management +Design user profile page +1) Need to create page for user profile , where user can see the information associated with him +# +Super admin access managment +Master management and configurations +1) Dealership vacancy management, Link expire configuration, All access by default, User listing, Role listing with filters. + + +Multilevel actions +1) Super admin can see all the activities and take any action of any role at any stage +2) Masters management + + +Approval flow configuration +1) Provision to configure the approval flow for the below three activities + - Onboarding approval flow + - Resignation approval flow + - Termination approval flow + +Ex. in case of termination, process usually start with ZBH than DD Lead than NBH and so on, but it can be change later, RE can introduce new role in future or shuffle the approval flow and that can be configurable from the system only. + +2) System will have an option to add stakeholders or roles for the F&F process from the system only and that can be configurable. +# +Reports +Report listing with filters and download option +1) We will provide below 4 report with filters + + - Dealer wise report + + -MIS report + + -Pending request report dealer wise + + - F&F tracking report stakeholder wise. + + +2) Provide download option in excel. +# +F&F +Notification of Resignation/Termination and start the F&F process +1) Design mail template and circulate resignation/termination notification to all the stakeholders along with last working day of the dealer. +2) Need to create cron job for the same +3) DD team circulate the email to all the respective stakeholders for getting the F&F process concluded as per the defined TAT + +Auto email notification for the same through system + + +F&F request tracking +1) Need to implement web page for the tracking the F&F process + + + +2) need to manage stakeholder along with their task + + + +3) set reminder mails if someone not doing their job in defined TAT + + + +4) Provide an option for each role to update the status of their task +5) When the respective stakeholder logs into the system, they can see their pending request. These requests will be segregated based on respective roles. +6) Each role have their own forms and field which they will update from the system. Ex. finance team will see settlement related form, legal team will see clearance related forms etc. +Note: couple of points are open ended + + +Block dealer from the system +1) Provide option to block the dealer from the system (This action will taken place after all the stakeholder status) + + + +2) Email notification to all the stakeholders + +Project 2: Field Visit Report & Action Plan +Feature Listing +Application Module +Description +FJC Planning +- Document preparation + +- Review and approval flow + +- Dealer coordination +Visit Execution +- Field visit as per plan + +- Re-plan if changes occur + +- Dealer discussion +Discussion Management +- Capture actionable insights + +- Record feedback and performance metrics +MOM Creation +- Structured documentation + +- Action item tracking and delegation +Closure & Sharing +- Document submission and archiving + +- Stakeholder communication +Approval Workflow +- Manage approval workflow as per managed hierarchy + + + + + +Project 3: Dealer Claim settlement: +Feature Listing +Process Step +Scope Details +1. Request Initiation +Requestor (Marketing / Service / CNR) submits an activity request with: +Activity type, dealer info, date/location, details, and period +2. Proposal Submission +Dealer submits a proposal with: +Cost breakup +Timeline for closure +Supporting documents +3. Request Evaluation +Requestor reviews the proposal, adds comments, and either: +Requests clarification or +Confirms to proceed +4. Dept. Lead Approval +Department lead reviews the confirmed request and either: +Approves it or +Requests clarification +5. Budgeting +Upon approval, budget is blocked under respective IO (Internal Order) +6. Activity Creation +System creates the activity and sends auto-confirmation email to requestor, dealer, and lead +7. Activity Execution +Dealer executes the activity and submits required documents +8. Claim Approval +Requestor reviews documents and either + Approves the claim (fully or partially) +Requests more info +9. E-Invoicing +Upon approval: +E-invoice is generated +Credit note is issued + +Roles involved managed and maintained in the masters +Role & Persona: +Requestors: Raise activity request, evaluate proposals, approve claims +Dealers: Submit proposal and post-activity documents +Dept. Lead: Approve activity requests +Automation Handle system-level triggers (e.g., activity creation, Email Notofication) +Out of scope: +* Integrating with third-party systems or APIs to exchange data or functionality. +* Dealer Offboarding process +* Data collection form external system for old existing dealer +* Any functionality which is not a part of shared PPT document can be consider as a new requirement or change request and not a part of current proposal and commercials. +* Interface Layer (MSD/SAP) Interface with external systems for budgeting, invoicing, and credit note +* Dealer Persona + +Note: we considered the scope based on the shared BRD document attached (PPT)and the detailed discussion. +Project Assumptions +1. Royal Enfield will align and limit its requirements to adopt the Out of Box practice processes and features as delivered by the solution. No changes are expected to be made to the existing or dependent product. +2. Royal Enfield will provide a team of business experts who will work with the Softude team and will respond to the queries, conduct the reviews, and give necessary signoffs within agreed timelines. +3. Royal Enfield will take the responsibility of business readiness to achieve the proposed go-live milestone for the modules in scope of this statement of work. +4. Royal Enfield will ensure availability of its project documentation, Subject Matter Experts (SMEs) and Process Owners for workshops, discussions, and clarifications for the Softude project team as per calendar (inclusive of any local holidays) published by Softude at project start. +5. Project plan will be reviewed after the end of finalized Design (Modelling) phase with due consideration of any scope changes/ deviations. Any change that might have an impact on the scope, timeline, resources plan and any changes in the assumptions will be handled through a scope change management process (Change Order process). +6. Change Management is a shared responsibility as per the Roles and Responsibility section and the success of this track will depend on both the parties delivering as per expectations. +7. All interfaces for the new product have been identified in the scope. If any additional interfaces apart from identified needs to be developed, then additional effort would be considered and will be handled through a scope change management process (Change Order process). +8. Any timeline delays not directly attributable to Softude (such as product procurement, any business constraints, delay from source or target systems providing required details, connectivity issues, firewall issues) potentially could have an impact on the overall schedule resulting in Change Order process. +9. Any third-party access & authorizations will be made available to the Softude team within the first two weeks of project start. +10. Any scope changes are assumed to follow the defined Change Order processes including approvals. +11. The solution outlined in this document is based on current features or details shared by client in their scope document. Configuration of future enhancements, or enhancements released during the duration of the project, are not included. Any features which are going to be part of any new releases during the life cycle of the project will not be considered for implementation unless agreed upon as direction from product vendor/roadmap. +12. Negotiations and Procuring the Software Licenses for any third party (if required), and any other applicable Systems and third-party Tools is the responsibility of Royal Enfield. +Security Measures +Most secure app infrastructure in the market where security extends from the mobile app to the API's. +1. All APIs are secured with a wildcard SSL certificate. +2. As a Best Practices we should use of JWT and JWE for securing all API's. +3. Rate limit API and controller access to minimize the harm from automated attack tooling. +4. App secured from any DB injection. +5. App protected from clickjacking protection, XSS, MIME-Sniffing, HSTS, HPKP or set the CORS settings. +6. Security headers are enabled. +7. Code is not deployed with default credentials, particularly for admin users and even for mobile users. +8. As a best practices, uses a server-side, secure, built-in session manager that generates a new random session ID with high entropy after login. Session IDs should not be in the URL. Ids should also be securely stored and invalidated after logout, idle, and absolute timeouts. +9. As a best practices, JWT tokens are invalidated on the server after logout. +Testing +We put everything we make through rigorous user, compatibility, and functional testing to ensure it's bug-free on Day 1 and will continue to perform for you into the future. +As standard, we implement the following tests in a controlled environment before the web application is launched: +* Functionality Testing +* Usability testing +* Compatibility testing +* Interface Testing +* Performance Testing (Basic) +* Security testing (Basic) +* UAT Support +We also continue testing and monitoring the application over the 2 weeks to ensure it's working as promised. +Communication Plan +Regular Update +οΏ½ Softude will provide the regular update to the client bi-weekly as well as on the completion of the milestone, which will be mapped with the milestone plan. +οΏ½ Softude will test the system before the delivery of every milestone delivery and then would provide the update to the client. +Regular Meeting +οΏ½ Softude would be available for the regular meeting to provide the demo at the completion of every milestone and to give a walkthrough. +οΏ½ If needed, we can also plan a regular meeting as and when required. +οΏ½ If required, the client can also visit our Indore (India) based headquarter for a personal meeting with the team. +Communication Medium +οΏ½ Updates will be provided via email. +οΏ½ Meetings can be done using MS Teams/Zoom/Hangout or any of the preferred medium. +οΏ½ Softude will use Zoho as a project management tool, if needed we also add the client to our system where they can also track regular progress. +Technology stake and version +Technology Usage +Technology +Licensed / Open Source +User Experience (UX Design) +Adobe XD +Licensed +User Interface (UI) +React, View JS +MIT License + +HTML5/CSS/JS +Standard + + + +API Gateway +Node Js +Open Source +Databases (RDBMS & NoSQL) +MYSQL / postgresql +VM setup +Containers / App Servers +Webserver +Apache License 2.0 +Project Management / Collaboration Tool +ZOHO PMS +Licensed + +Microsoft Teams +Licensed +Code Repo +Gitlab +Code Repository and Version Control + +Assumptions +* Customer will provide SAP APIs for integration. +* Inputs provided from the customer in any terms will be assumed to be accurate. +* Necessary approvals and timely review of submissions. +* Customer will complete testing & UAT before handover. +* Softude's timely and adequate performance of the services and provision of the deliverables shall depend upon full access to appropriate customer personal and to customer information and documentation. +* Softude is not responsible for inaccurate or incomplete information that is obtained from customer. +* Customer would provide needed documentation and information that would be crucial for execution of the task provided as applicable from time to time. +* All the organizational or technical changes which may affect any services will be communicated in writing to Softude at least 1 week prior to changes. +* Support of services that are outside scope, all such activities would be identified and discussed with Customer and will be owned with invoking required changed/configuration orders. +* We assume for business-critical applications necessary HA architecture in place to meet the requirements. +Out of Scope +We include those items which are not considered in the budget that is defined in this proposal. Items like purchasing of third-party APIs, hosting, domain name, etc. Also, the list of items may vary depending on the communication you have with the client. Below are some references which you can use. +1. Implementation of any module other than the modules mentioned in scope section. +2. Implementation of any third party other than mentioned in the scope section. +3. Any configuration and development work in existing on-premises systems or any interface development from On premise to On premise/third party vendors are not considered in scope +4. Data cleansing, Data Quality related validation activities +5. Purchase of any 3rd party controls/software licenses, if required during development +6. Data creation is not in the scope. +7. Data migration to the proposed application +8. Any requirement which is not mentioned in the scope of work spreadsheet. +Client Responsibilities +We believe that successful partnerships are built on mutual trust and collaboration. As such, we would like to outline the responsibilities that we expect from our clients to ensure that we can deliver the best possible service. By fulfilling these responsibilities, our clients can help us to achieve our shared goals and ensure a successful outcome for all parties involved. +Below are the client's responsibilities: +1. Designate a project coordinator(s) at your end. This person should be helping us to understand the exact requirement in detail so that we can draft specifications and later on coordinating points for application support. (It may be one or multiple persons based on expertise in their function) +2. Logic and business rules for all functionality +3. Timely responses/feedback (within 3 days from submission) for +a. Queries +b. Document (like SRS/Screen design etc.) +c. Demo +d. UAT +e. Implementation +4. Change Control approval (within 7 days from submission) +5. Provide hosting server (Deployment server) +6. Licenses software, external components, or any tool. (If any) +7. Make the server available with the required environment. +8. Support required for coordination with third parties such as payment gateway, or other application developers involved for getting APIs. +Proposed Methodology +Waterfall Development Approach +The Waterfall methodology-also known as the Waterfall model-is a sequential development process that flows like a waterfall through all phases of a project (analysis, design, development, and testing, for example), with each phase completely wrapping up before the next phase begins. +The project is broken down into a sequence of tasks, with the highest level grouping referred to as phases. A true waterfall approach requires phases that are completed in sequence and have formal exit criteria, typically a sign-off by the project stakeholders. A typical list of waterfall tasks would include: +* Scope and plan project +* Gather and document requirements. +* Design application +* Develop application and perform unit tests. +* Conduct system testing. +* Perform UAT +* Fix application as appropriate +* Deploy application. + + +Requirement +The Waterfall methodology depends on the belief that all project requirements can be gathered and understood upfront. The Business Analyst does their best to get a detailed understanding of the project sponsor's requirements. Written requirements, usually contained in a single document, are used to describe each stage of the project, including the costs, assumptions, risks, dependencies, success metrics, and timelines for completion. +Design +Here, software developers design a technical solution to the problems set out by the product requirements, including scenarios, layouts, and data models. First, a higher-level or logical design is created that describes the purpose and scope of the project, the general traffic flow of each component, and the integration points. Once this is complete, it is transformed into a physical design using specific hardware and software technologies. +Implementation +Once the design is complete, technical implementation starts. This might be the shortest phase of the Waterfall process, because painstaking research and design have already been done. In this phase, programmers code applications based on project requirements and specifications, with some testing and implementation taking place as well. If significant changes are required during this stage, this may mean going back to the design phase. +Verification or testing +Before a product can be released to customers, testing needs to be done to ensure the product has no errors and all of the requirements have been completed, ensuring a good user experience with the software. The testing team will turn to the design documents, personas, and user case scenarios supplied by the product manager to create their test cases. + + +Deployment and maintenance +Once the software has been deployed in the market or released to customers, the maintenance phase begins. As defects are found and change requests come in from users, a team will be assigned to take care of updates and release new versions of the software. +Governance Setup +Sr. +Name +Description +Attendees +Duration(mins) +1. +Daily Scrum Call + +10 minutes call where we discuss what we did in the previous day and what is today's plan and challenges (if any). +Development Team, Team Heads, Project Manager + +10 +2. +Weekly Review Meeting +A 30 minute meeting to share the current project status vis-a-viz as per the defined project plan and discuss dependencies, hurdles and resolutions. +Team Heads, Project Manager, Client's coordinator +30 +3. +Monthly Governance Meeting +A 60 minute meeting to share the progress as per the define milestone. Any anticipated hurdles in the future deliverables, challenges faced in the previous month and ensuing these are not repeated in the future.? +Project Manager, Client's coordinator, Project Owner, Solution Consultant, Client IT and Business SPOC +60 + + +Part 3: Agreement for Support and Maintenance Services +Annual Maintenance and Support Services +Support during AMS would be offsite services. This will be decided mutually depending on the nature of the issue reported by ROYAL ENFIELD +Maintenance and support will be provided on working weekdays between 10:00 A.M. and 6:00 P.M. IST, excluding Public Holidays. For support requests received beyond the stipulated hours above, SOFTUDE INFOTECH PVT LTD will make reasonable efforts to ensure that these requests are attended to, promptly. ROYAL ENFIELD can contact SOFTUDE INFOTECH PVT LTD for maintenance and support at the phone number(s) and email addresses provided to them. +Annual Maintenance and Support includes: + +Type of support +Support Description +#1 +Bug Fixing +* Any error, flaw, fault occurred in a developed software, an incorrect or unexpected result, or behave in unintended ways. should be considered in bug fixing. This process does not include any logical or process change in system (Code change). +* Softude is not responsible in mal function of platform (Zoho Creator) or any error on the platform. +* SOFTUDE is not responsible for any Third-Party API Issue, backend API issue, and efforts related to that we will not consider in support (Log hours billed as per actual). +* If issue arises due to application and it is creating issue in backend, then it will fall under bugs/errors. +* If the issue is related to third party platform and impacting the application/backend or vice versa than the solution efforts do not consider in support. +#2 +Support Request or Query +Any query or request shared by ROYAL ENFIELD business or IT that may not require any development efforts but may require devoting time such as any request for review and validation of the current functionality or any requirement analysis and Investigation will be considered as Support Request or Query. +#3 +CR Request in existing system under Support contract +Any change or upgrade in the software, that is required by the business or process to improve the quality or capabilities beyond original specifications will be considered as change request. +* In case of any new module or new functionality development request where it requires major change or entirely new development then it is considered as change request. +#4 +MIS Data from backend +At any point of time if business or IT function need any information updates or data sheet from the backend system, which can be created by the developer and directly generated from the simple SQL query is considered in MIS data or simple query report request. + + + + diff --git a/User guide Steps to Create a Custom Workflow.docx b/User guide Steps to Create a Custom Workflow.docx new file mode 100644 index 0000000..57d5816 Binary files /dev/null and b/User guide Steps to Create a Custom Workflow.docx differ diff --git a/Workflow Document - Templatized_ Non Templatized.txt b/Workflow Document - Templatized_ Non Templatized.txt new file mode 100644 index 0000000..7cb9c87 --- /dev/null +++ b/Workflow Document - Templatized_ Non Templatized.txt @@ -0,0 +1,90 @@ +Workflow Management Requirements + + +1. Templatized Workflow + +Objective: +To standardize and streamline recurring business processes, enhancing efficiency, consistency, compliance, and traceability. + +Key Requirements: + +- Workflow Templates: + Ability to define reusable templates for routine processes (e.g., vendor code creation, dealer onboarding, PR/PO creation in SAP). + +- Roles & Responsibilities: + Clearly defined owners for each workflow step, ensuring accountability and smooth handovers. + +- Automation Triggers: + Support for event-based initiation of workflows (e.g., status change, form submission). + +- SLAs & Timelines: + Configurable turnaround times for each step to enforce timely execution and escalation. + +- Integration Points: + Seamless data exchange with external systems (e.g., DMS ? SAP), with standard API options available while defining workflows (e.g., for vendor/dealer code or PO creation). + +- Exception Handling: + Defined escalation matrix or alternate flows for handling deviations or process failures. + +- Role-Based Template Visibility: +Templates should be visible only to relevant user roles to ensure access control, reduce clutter, and improve process efficiency. + +- Document Upload & Digital Signatures: + Users should be able to upload supporting documents with an option for digital signing within the workflow. + +- OCR Integration: + Optical Character Recognition (OCR) capability to auto-validate and extract key data from uploaded documents for verification. + +Trigger ? Template Selection ? Role Assignment ? Task Execution ? Integration/API Call ? Document Upload (with Digital Signature + OCR) ? SLA Tracking ? Completion/Closure + +Steps: +1. Trigger Event (e.g., status change, user action) +2. Select Workflow Template (based on user role) +3. Auto-assign Roles & Tasks +4. Execute Steps as per SLA +5. API Call to External System (e.g., SAP for PR/PO, vendor creation) +6. Document Upload with Digital Signature +7. OCR validation (auto-read documents for key info) +8. Exception Handling if any deviation +9. Workflow Closure after final approval + + + + +2. Non-Templatized Workflow + +Objective: +To support flexible, ad-hoc processes that do not conform to predefined workflows, enabling users to handle exceptions, one-off requests, or case-specific scenarios. + +Key Requirements: + +- Flexible Workflow Initiation: + Allow users to create workflows from scratch without relying on templates. + +- Dynamic Role Assignment: + Ability to assign roles/tasks dynamically based on the situation. + +- Ad-hoc Approvals: + Support for custom approval flows that can be configured during workflow initiation. + +- Manual Task Handling: + Users can add or skip steps manually as needed, without automation constraints. + +- Case-by-Case Logic: + Workflows can follow unique paths based on individual judgment or specific business context. + +- Integration Points: +Enable data exchange between systems (e.g., DMS ? SAP), with access to standard API options for actions like vendor/dealer code creation or PR/PO processing. + +Trigger ? Manual Workflow Creation ? Dynamic Role Assignment ? Task Execution ? Integration/API Call ? Document Upload (if any) ? Approval ? Closure + +Steps: +1. User Initiates Ad-hoc Workflow +2. Define Custom Steps & Tasks +3. Manually Assign Approvers/Stakeholders +4. Execute Steps Manually +5. Optional API Call to External Systems (SAP, etc.) +6. Optional Document Upload +7. Ad-hoc Approvals +8. Workflow Completion + diff --git a/complete_workflow_diagram.mermaid b/complete_workflow_diagram.mermaid new file mode 100644 index 0000000..9807d90 --- /dev/null +++ b/complete_workflow_diagram.mermaid @@ -0,0 +1,371 @@ +graph TD + %% START - User Access + Start([User Access Portal]) --> Login[Login via RE Bridge Centralised SSO] + Login --> AuthCheck{Authentication Success?} + AuthCheck -->|No| LoginError[Authentication Failed] + AuthCheck -->|Yes| Dashboard[User Dashboard] + + %% DASHBOARD ROUTING + Dashboard --> UserType{User Role} + UserType -->|Dealer| DealerPortal[Dealer Portal] + UserType -->|Internal Staff| StaffPortal[Staff Portal] + UserType -->|Admin| AdminAuthCheck{Admin Permission Level} + + %% ADMIN ROLE HIERARCHY + AdminAuthCheck -->|Super Admin| AdminPortal[Full Admin Portal] + AdminAuthCheck -->|System Admin| SystemAdminView[System Admin View] + AdminAuthCheck -->|Workflow Admin| WorkflowAdminView[Workflow Admin View] + AdminAuthCheck -->|Reports Admin| ReportsAdminView[Reports Admin View] + AdminAuthCheck -->|Regional Admin| RegionalAdminView[Regional Admin View] + + %% ROUTE TO ADMIN ACTIONS + SystemAdminView --> AdminActions{Admin Actions} + WorkflowAdminView --> AdminActions + ReportsAdminView --> AdminActions + RegionalAdminView --> AdminActions + + %% DEALER PORTAL - BECOME A DEALER FLOW + DealerPortal --> DealerAction{Dealer Action} + DealerAction -->|New Application| NewApp[Submit 'Become a Dealer' Form] + DealerAction -->|Existing Application| TrackApp[Track Application Status] + DealerAction -->|Claims| ClaimProcess[Submit Claim Request] + + %% NEW DEALER APPLICATION FLOW + NewApp --> CaptureForm[Frontend: Capture Form Data] + CaptureForm --> ValidateForm[Frontend: Form Validation] + ValidateForm --> SubmitForm[Frontend: Submit to Backend API] + SubmitForm --> StoreData[Backend: Store in Database] + StoreData --> CheckLocation{Backend: Location Has Vacancy?} + + CheckLocation -->|No| RejectEmail[Backend: Send Non-Opportunity Email] + CheckLocation -->|Yes| AckEmail[Backend: Send Acknowledgement Email] + + AckEmail --> SendQuestionnaire[Backend: Send Questionnaire Link] + SendQuestionnaire --> WaitResponse{Backend: Response Received?} + + WaitResponse -->|No - D+2| Reminder1[Backend: Send Reminder Email] + Reminder1 --> WaitResponse2{Backend: Response Received?} + WaitResponse2 -->|No - D+5| Reminder2[Backend: Send Final Reminder] + Reminder2 --> WaitResponse3{Backend: Response Received?} + WaitResponse3 -->|No - D+20| ExpireLink[Backend: Close Questionnaire] + + WaitResponse -->|Yes| ProcessResponse[Backend: Calculate Weighted Rank] + WaitResponse2 -->|Yes| ProcessResponse + WaitResponse3 -->|Yes| ProcessResponse + + ProcessResponse --> DDShortlist[Staff Portal: DD Team Reviews & Shortlists Top 10] + DDShortlist --> AssignZM[Backend: Assign to Zonal Manager DD] + + AssignZM --> ZMEval{Staff Portal: ZM-DD KT Evaluation} + ZMEval -->|Rejected| ZMReject[Backend: Store Rejection Reason] + ZMEval -->|Shortlisted| AssignRBM[Backend: Auto-Assign to RBM] + + AssignRBM --> RBMEval{Staff Portal: RBM Evaluation} + RBMEval -->|Rejected| RBMReject[Backend: Store Rejection Reason] + RBMEval -->|Approved| AssignDDL[Backend: Auto-Assign to DDL Team] + + AssignDDL --> FDD[Backend: Send OTP-Protected Link for FDD] + FDD --> UploadFDD[External Agency: Upload FDD Report L1/L2] + UploadFDD --> SubmitNBH[Staff Portal: DD Team Submits to NBH] + + SubmitNBH --> NBHApproval{Staff Portal: NBH Approval} + NBHApproval -->|Rejected| NBHReject[Backend: Store Rejection & Notify] + NBHApproval -->|Approved| IssueLOI[Backend: Generate & Send LOI] + + IssueLOI --> UploadLOI[Staff Portal: Upload LOI to System] + UploadLOI --> IssueLOA[Backend: Generate & Send LOA] + IssueLOA --> UploadLOA[Staff Portal: Upload LOA to System] + + UploadLOA --> ScheduleEOR[Staff Portal: Regional DD Schedules EOR Audit] + ScheduleEOR --> UploadEOR[Staff Portal: Upload EOR Audit Report] + UploadEOR --> EORApproval{Staff Portal: NBH EOR Approval} + + EORApproval -->|Rejected| EORReject[Backend: Store Rejection & Notify] + EORApproval -->|Approved| UpdateDealer[Backend: Update Dealer Info] + + UpdateDealer --> ActiveDealer([Active Dealer Created]) + + %% DEALER CLAIM PROCESS + ClaimProcess --> ClaimForm[Frontend: Claim Request Form] + ClaimForm --> ValidateClaim[Frontend: Form Validation] + ValidateClaim --> SubmitClaim[Frontend: Submit to Backend API] + SubmitClaim --> RI[Backend: Request Initiation] + + RI --> RI1[Backend: Store Request Details] + RI1 --> PS[Backend: Proposal Submission] + PS --> PS1[Frontend: Dealer Submits Proposal] + PS1 --> PS2[Frontend: Cost Breakup] + PS1 --> PS3[Frontend: Timeline for Closure] + PS1 --> PS4[Frontend: Supporting Documents] + + PS2 --> RE[Backend: Request Evaluation] + PS3 --> RE + PS4 --> RE + + RE --> RE1{Staff Portal: Requestor Reviews} + RE1 -->|Needs Clarification| RE2[Backend: Request More Info] + RE2 --> PS1 + RE1 -->|Approved| RE3[Backend: Confirm to Proceed] + + RE3 --> DLA[Staff Portal: Dept. Lead Approval] + DLA --> DLA1{Staff Portal: Lead Reviews Request} + DLA1 -->|Needs Clarification| DLA2[Backend: Request Clarification] + DLA2 --> RE + DLA1 -->|Approved| DLA3[Backend: Approve Request] + + DLA3 --> BUD[Backend: Budgeting] + BUD --> BUD1[Backend: Block Budget] + BUD1 --> BUD2[Backend: Assign to IO] + + BUD2 --> AC[Backend: Activity Creation] + AC --> AC1[Backend: System Creates Activity] + AC1 --> AC2[Backend: Auto-Email Confirmation] + AC2 --> AC3[Backend: Notify Requestor] + AC2 --> AC4[Backend: Notify Dealer] + AC2 --> AC5[Backend: Notify Lead] + + AC3 --> AE[Frontend: Activity Execution Interface] + AC4 --> AE + AC5 --> AE + + AE --> AE1[Frontend: Dealer Executes Activity] + AE1 --> AE2[Frontend: Submit Required Documents] + + AE2 --> CA[Backend: Claim Approval] + CA --> CA1{Staff Portal: Requestor Reviews Documents} + CA1 -->|More Info Needed| CA2[Backend: Request Additional Info] + CA2 --> AE2 + CA1 -->|Approved| CA3{Staff Portal: Approval Type} + + CA3 -->|Full Approval| EI[Backend: E-Invoicing] + CA3 -->|Partial Approval| EI + EI --> EI1[Backend: Generate E-Invoice] + EI1 --> EI2[Backend: Issue Credit Note] + EI2 --> ClaimSettled([Claim Settled]) + + %% DEALER OFFBOARDING - RESIGNATION + ActiveDealer --> DealerOps{Staff Portal: Dealer Operations} + DealerOps -->|Resignation Request| ResignStart[Frontend: Dealer Sends Email to ZBH] + ResignStart --> ResignRecord[Staff Portal: ZBH Records in System] + ResignRecord --> ResignZBH{Staff Portal: ZBH Approval} + + ResignZBH -->|Rejected| ResignRejectZBH[Backend: Return to Previous Level & Notify] + ResignZBH -->|Approved| ResignDDL{Staff Portal: DD Lead Approval} + + ResignDDL -->|Rejected| ResignRejectDDL[Backend: Return to ZBH & Notify] + ResignDDL -->|Approved| ResignNBH{Staff Portal: NBH Approval} + + ResignNBH -->|Rejected| ResignRejectNBH[Backend: Return to DD Lead & Notify] + ResignNBH -->|Approved| GenResignLetter[Backend: Generate Resignation Acceptance Letter] + GenResignLetter --> SendResignLetter[Staff Portal: NBH Approves & Shares Letter] + SendResignLetter --> StartFF1[Backend: Start F&F Process] + + %% DEALER OFFBOARDING - TERMINATION + DealerOps -->|Termination Initiated| TermStart[Staff Portal: Identify Termination Reason] + TermStart --> TermType{Staff Portal: Termination Type} + TermType -->|Immediate| TermDocs1[Staff Portal: ASM Collects Documentation] + TermType -->|By Convenience| TermDocs2[Staff Portal: ASM Collects Documentation] + + TermDocs1 --> PrepNotes[Backend: Generate Termination Notes PDF] + TermDocs2 --> PrepNotes + + PrepNotes --> TermZBH{Staff Portal: ZBH Approval} + TermZBH -->|Rejected| TermRejectZBH[Backend: Return & Notify] + TermZBH -->|Approved| TermDDL{Staff Portal: DD Lead Approval} + + TermDDL -->|Rejected| TermRejectDDL[Backend: Return to ZBH & Notify] + TermDDL -->|Approved| TermNBH{Staff Portal: NBH Approval} + + TermNBH -->|Rejected| TermRejectNBH[Backend: Return to DD Lead & Notify] + TermNBH -->|Approved| TermCCO{Staff Portal: CCO Approval} + + TermCCO -->|Rejected| TermRejectCCO[Backend: Return to NBH & Notify] + TermCCO -->|Approved| TermCEO{Staff Portal: CEO Approval} + + TermCEO -->|Rejected| TermRejectCEO[Backend: Return to CCO & Notify] + TermCEO -->|Approved| IssueNotice[Backend: Generate Show Cause Notice] + + IssueNotice --> Send15Day[Backend: Send Notice with 15-Day Deadline] + Send15Day --> WaitDealer{Frontend: Dealer Response?} + + WaitDealer -->|Response Received| ReviewResponse[Staff Portal: Review Response] + WaitDealer -->|No Response| UploadTermLetter[Staff Portal: DD Lead Uploads Signed Termination Letter] + ReviewResponse --> FinalDecision{Staff Portal: Final Decision} + + FinalDecision -->|Proceed| UploadTermLetter + FinalDecision -->|Withdraw| TermWithdraw[Backend: Termination Withdrawn] + + UploadTermLetter --> StartFF2[Backend: Start F&F Process] + + %% FULL & FINAL SETTLEMENT PROCESS + StartFF1 --> FFNotify[Backend: Send F&F Notification to All Stakeholders] + StartFF2 --> FFNotify + + FFNotify --> FFTrack[Frontend: F&F Tracking System Activated] + FFTrack --> FFStakeholders[Backend: Each Stakeholder Receives Task] + + FFStakeholders --> FFFinance[Frontend: Finance - Settlement Forms] + FFStakeholders --> FFLegal[Frontend: Legal - Clearance Forms] + FFStakeholders --> FFOthers[Frontend: Other Stakeholders - Respective Forms] + + FFFinance --> FFUpdate1[Frontend: Update Status in System] + FFLegal --> FFUpdate2[Frontend: Update Status in System] + FFOthers --> FFUpdate3[Frontend: Update Status in System] + + FFUpdate1 --> FFCheck{Backend: All Tasks Complete?} + FFUpdate2 --> FFCheck + FFUpdate3 --> FFCheck + + FFCheck -->|No| FFReminder[Backend: Send Reminder if TAT Exceeded] + FFReminder --> FFCheck + + FFCheck -->|Yes| BlockDealer[Backend: Block Dealer from System] + BlockDealer --> FFComplete[Backend: Send Completion Email to All Stakeholders] + + FFComplete --> End([Process Complete]) + + %% FIELD VISIT REPORT MODULE + StaffPortal --> FieldVisit[Field Visit Report Module] + FieldVisit --> FJC[Frontend: FJC Planning Interface] + FJC --> FJC1[Frontend: Document Preparation] + FJC --> FJC2[Frontend: Review & Approval Flow] + FJC --> FJC3[Frontend: Dealer Coordination] + + FJC1 --> VE[Frontend: Visit Execution Module] + FJC2 --> VE + FJC3 --> VE + + VE --> VE1{Staff Portal: Field Visit As Per Plan?} + VE1 -->|Yes| VE2[Frontend: Execute Visit] + VE1 -->|No| VE3[Frontend: Re-plan Changes] + VE3 --> VE2 + VE2 --> VE4[Frontend: Dealer Discussion] + + VE4 --> DM[Frontend: Discussion Management Module] + DM --> DM1[Frontend: Capture Actionable Insights] + DM --> DM2[Frontend: Record Feedback] + DM --> DM3[Frontend: Performance Metrics] + + DM1 --> MOM[Frontend: MOM Creation Module] + DM2 --> MOM + DM3 --> MOM + + MOM --> MOM1[Frontend: Structured Documentation] + MOM --> MOM2[Frontend: Action Item Tracking] + MOM --> MOM3[Frontend: Task Delegation] + + MOM1 --> CS[Backend: Closure & Sharing Module] + MOM2 --> CS + MOM3 --> CS + + CS --> CS1[Backend: Document Submission] + CS1 --> CS2[Backend: Archiving] + CS2 --> CS3[Backend: Stakeholder Communication] + + CS3 --> AW[Backend: Approval Workflow] + AW --> AW1{Staff Portal: Hierarchy-Based Approval} + AW1 -->|Approved| FieldVisitComplete([Field Visit Completed & Archived]) + AW1 -->|Rejected| Feedback[Backend: Feedback to Team] + Feedback --> FJC + + %% ADMIN PORTAL FEATURES WITH PERMISSION CHECKS + AdminPortal --> AdminActions{Admin Actions} + AdminActions -->|User Management| CheckUserMgmt{Backend: Has Permission?} + AdminActions -->|Master Data| CheckMasterData{Backend: Has Permission?} + AdminActions -->|Workflow Engine| CheckWorkflow{Backend: Has Permission?} + AdminActions -->|Reports| CheckReports{Backend: Has Permission?} + + %% USER MANAGEMENT PERMISSIONS + CheckUserMgmt -->|Yes - Super Admin/System Admin| UserMgmt[Frontend: User Management Interface] + CheckUserMgmt -->|No| AccessDenied1[Frontend: Access Denied - Insufficient Permissions] + + UserMgmt --> RoleMgmt[Frontend: Role Management] + UserMgmt --> PermissionMgmt[Frontend: Permission Matrix] + UserMgmt --> RegionalScoping[Frontend: Regional Scoping] + + %% MASTER DATA PERMISSIONS + CheckMasterData -->|Yes - Super Admin/System Admin/Regional Admin| MasterData[Frontend: Master Data Management] + CheckMasterData -->|No| AccessDenied2[Frontend: Access Denied - Insufficient Permissions] + + MasterData --> CheckRegionalScope{Backend: Is Regional Admin?} + CheckRegionalScope -->|Yes| RegionalMasterData[Frontend: Regional Scoped Data Only] + CheckRegionalScope -->|No| FullMasterData[Frontend: Full Master Data Access] + + RegionalMasterData --> TownMgmtRegional[Frontend: Town Management - Regional] + RegionalMasterData --> DealerCodeMgmtRegional[Frontend: Dealer Code Management - Regional] + + FullMasterData --> TownMgmt[Frontend: Town Management] + FullMasterData --> DealerCodeMgmt[Frontend: Dealer Code Management] + FullMasterData --> EvaluationCriteria[Frontend: Evaluation Criteria Management] + + %% WORKFLOW ENGINE PERMISSIONS + CheckWorkflow -->|Yes - Super Admin/Workflow Admin| WorkflowEngine[Frontend: Custom Workflow Engine] + CheckWorkflow -->|No| AccessDenied3[Frontend: Access Denied - Insufficient Permissions] + + WorkflowEngine --> TemplateBuilder[Frontend: Template Builder] + WorkflowEngine --> DynamicWorkflow[Frontend: Dynamic Workflow Creation] + WorkflowEngine --> WorkflowMonitoring[Frontend: Workflow Monitoring] + + %% REPORTS PERMISSIONS + CheckReports -->|Yes - All Admin Roles| Reports[Frontend: Reports & Analytics] + CheckReports -->|No| AccessDenied4[Frontend: Access Denied - Insufficient Permissions] + + Reports --> CheckReportScope{Backend: Determine Report Scope} + CheckReportScope -->|Regional Admin| RegionalReports[Frontend: Regional Reports Only] + CheckReportScope -->|Other Admins| AllReports[Frontend: All Reports] + + RegionalReports --> DealerWiseReportRegional[Frontend: Dealer-wise Report - Regional] + RegionalReports --> PendingRequestReportRegional[Frontend: Pending Request Report - Regional] + + AllReports --> DealerWiseReport[Frontend: Dealer-wise Report] + AllReports --> MISReport[Frontend: MIS Report] + AllReports --> PendingRequestReport[Frontend: Pending Request Report] + AllReports --> FFTrackingReport[Frontend: F&F Tracking Report] + AllReports --> ApplicationSummaryReport[Frontend: Application Summary Report] + + %% ACCESS DENIED ENDPOINTS + AccessDenied1 --> AdminActions + AccessDenied2 --> AdminActions + AccessDenied3 --> AdminActions + AccessDenied4 --> AdminActions + + %% END POINTS + RejectEmail --> End + ExpireLink --> End + ZMReject --> End + RBMReject --> End + NBHReject --> End + EORReject --> End + TermWithdraw --> End + LoginError --> Login + + %% STYLING + style Start fill:#90EE90 + style End fill:#FFB6C1 + style ActiveDealer fill:#87CEEB + style ClaimSettled fill:#87CEEB + style FieldVisitComplete fill:#87CEEB + style NBHApproval fill:#FFD700 + style EORApproval fill:#FFD700 + style ResignNBH fill:#FFD700 + style TermCEO fill:#FFD700 + style BlockDealer fill:#FF6B6B + style Dashboard fill:#E6E6FA + style StaffPortal fill:#F0F8FF + style DealerPortal fill:#F5F5DC + style AdminPortal fill:#FFE4E1 + style AdminAuthCheck fill:#DDA0DD + style SystemAdminView fill:#F0E68C + style WorkflowAdminView fill:#F0E68C + style ReportsAdminView fill:#F0E68C + style RegionalAdminView fill:#F0E68C + style AccessDenied1 fill:#FFA07A + style AccessDenied2 fill:#FFA07A + style AccessDenied3 fill:#FFA07A + style AccessDenied4 fill:#FFA07A + style CheckUserMgmt fill:#ADD8E6 + style CheckMasterData fill:#ADD8E6 + style CheckWorkflow fill:#ADD8E6 + style CheckReports fill:#ADD8E6 + style CheckRegionalScope fill:#ADD8E6 + style CheckReportScope fill:#ADD8E6 diff --git a/dealer_mgmt_flow.mermaid b/dealer_mgmt_flow.mermaid new file mode 100644 index 0000000..1059db2 --- /dev/null +++ b/dealer_mgmt_flow.mermaid @@ -0,0 +1,147 @@ +graph TB + Start([Dealer Inquiry Received]) --> CaptureForm[Capture 'Become a Dealer' Form] + CaptureForm --> StoreData[Store in Database & Show Listing] + StoreData --> CheckLocation{Location Has Vacancy?} + + CheckLocation -->|No| RejectEmail[Send Non-Opportunity Email] + CheckLocation -->|Yes| AckEmail[Send Acknowledgement Email] + + AckEmail --> SendQuestionnaire[Send Opportunity Email with Questionnaire Link] + SendQuestionnaire --> WaitResponse{Response Received?} + + WaitResponse -->|No - D+2| Reminder1[Send Reminder Email] + Reminder1 --> WaitResponse2{Response Received?} + WaitResponse2 -->|No - D+5| Reminder2[Send Final Reminder] + Reminder2 --> WaitResponse3{Response Received?} + WaitResponse3 -->|No - D+20| ExpireLink[Close Questionnaire - Expired] + + WaitResponse -->|Yes| ProcessResponse[Calculate Weighted Rank] + WaitResponse2 -->|Yes| ProcessResponse + WaitResponse3 -->|Yes| ProcessResponse + + ProcessResponse --> DDShortlist[DD Team Reviews & Shortlists Top 10] + DDShortlist --> AssignZM[Assign to Zonal Manager DD] + + AssignZM --> ZMEval{ZM-DD KT Evaluation} + ZMEval -->|Rejected| ZMReject[Store Rejection Reason] + ZMEval -->|Shortlisted| AssignRBM[Auto-Assign to RBM] + + AssignRBM --> RBMEval{RBM Evaluation} + RBMEval -->|Rejected| RBMReject[Store Rejection Reason] + RBMEval -->|Approved| AssignDDL[Auto-Assign to DDL Team] + + AssignDDL --> FDD[Send OTP-Protected Link for Financial Due Diligence] + FDD --> UploadFDD[External Agency Uploads FDD Report L1/L2] + UploadFDD --> SubmitNBH[DD Team Submits to NBH] + + SubmitNBH --> NBHApproval{NBH Approval} + NBHApproval -->|Rejected| NBHReject[Store Rejection & Notify] + NBHApproval -->|Approved| IssueLOI[Generate & Send LOI] + + IssueLOI --> UploadLOI[Upload LOI to System] + UploadLOI --> IssueLOA[Generate & Send LOA] + IssueLOA --> UploadLOA[Upload LOA to System] + + UploadLOA --> ScheduleEOR[Regional DD Schedules EOR Audit] + ScheduleEOR --> UploadEOR[Upload EOR Audit Report] + UploadEOR --> EORApproval{NBH EOR Approval} + + EORApproval -->|Rejected| EORReject[Store Rejection & Notify] + EORApproval -->|Approved| UpdateDealer[Update Dealer Info: Inauguration Date, Codes] + + UpdateDealer --> ActiveDealer([Active Dealer]) + + ActiveDealer --> DealerOps{Dealer Operations} + + DealerOps -->|Resignation Request| ResignStart[Dealer Sends Email to ZBH] + ResignStart --> ResignRecord[ZBH Records in System] + ResignRecord --> ResignZBH{ZBH Approval} + + ResignZBH -->|Rejected| ResignRejectZBH[Return to Previous Level & Notify] + ResignZBH -->|Approved| ResignDDL{DD Lead Approval} + + ResignDDL -->|Rejected| ResignRejectDDL[Return to ZBH & Notify] + ResignDDL -->|Approved| ResignNBH{NBH Approval} + + ResignNBH -->|Rejected| ResignRejectNBH[Return to DD Lead & Notify] + ResignNBH -->|Approved| GenResignLetter[Generate Resignation Acceptance Letter] + GenResignLetter --> SendResignLetter[NBH Approves & Shares Letter] + SendResignLetter --> StartFF1[Start F&F Process] + + DealerOps -->|Termination Initiated| TermStart[Identify Termination Reason] + TermStart --> TermType{Termination Type} + TermType -->|Immediate| TermDocs1[ASM Collects Documentation] + TermType -->|By Convenience| TermDocs2[ASM Collects Documentation] + + TermDocs1 --> PrepNotes[Generate Termination Notes PDF] + TermDocs2 --> PrepNotes + + PrepNotes --> TermZBH{ZBH Approval} + TermZBH -->|Rejected| TermRejectZBH[Return & Notify] + TermZBH -->|Approved| TermDDL{DD Lead Approval} + + TermDDL -->|Rejected| TermRejectDDL[Return to ZBH & Notify] + TermDDL -->|Approved| TermNBH{NBH Approval} + + TermNBH -->|Rejected| TermRejectNBH[Return to DD Lead & Notify] + TermNBH -->|Approved| TermCCO{CCO Approval} + + TermCCO -->|Rejected| TermRejectCCO[Return to NBH & Notify] + TermCCO -->|Approved| TermCEO{CEO Approval} + + TermCEO -->|Rejected| TermRejectCEO[Return to CCO & Notify] + TermCEO -->|Approved| IssueNotice[Generate Show Cause Notice] + + IssueNotice --> Send15Day[Send Notice with 15-Day Deadline] + Send15Day --> WaitDealer{Dealer Response?} + + WaitDealer -->|Response Received| ReviewResponse[Review Response] + WaitDealer -->|No Response| UploadTermLetter[DD Lead Uploads Signed Termination Letter] + ReviewResponse --> FinalDecision{Final Decision} + + FinalDecision -->|Proceed| UploadTermLetter + FinalDecision -->|Withdraw| TermWithdraw[Termination Withdrawn] + + UploadTermLetter --> StartFF2[Start F&F Process] + + StartFF1 --> FFNotify[Send F&F Notification to All Stakeholders] + StartFF2 --> FFNotify + + FFNotify --> FFTrack[F&F Tracking System Activated] + FFTrack --> FFStakeholders[Each Stakeholder Receives Task] + + FFStakeholders --> FFFinance[Finance: Settlement Forms] + FFStakeholders --> FFLegal[Legal: Clearance Forms] + FFStakeholders --> FFOthers[Other Stakeholders: Respective Forms] + + FFFinance --> FFUpdate1[Update Status in System] + FFLegal --> FFUpdate2[Update Status in System] + FFOthers --> FFUpdate3[Update Status in System] + + FFUpdate1 --> FFCheck{All Tasks Complete?} + FFUpdate2 --> FFCheck + FFUpdate3 --> FFCheck + + FFCheck -->|No| FFReminder[Send Reminder if TAT Exceeded] + FFReminder --> FFCheck + + FFCheck -->|Yes| BlockDealer[Block Dealer from System] + BlockDealer --> FFComplete[Send Completion Email to All Stakeholders] + + FFComplete --> End([Process Complete]) + RejectEmail --> End + ExpireLink --> End + ZMReject --> End + RBMReject --> End + NBHReject --> End + EORReject --> End + TermWithdraw --> End + + style Start fill:#90EE90 + style End fill:#FFB6C1 + style ActiveDealer fill:#87CEEB + style NBHApproval fill:#FFD700 + style EORApproval fill:#FFD700 + style ResignNBH fill:#FFD700 + style TermCEO fill:#FFD700 + style BlockDealer fill:#FF6B6B \ No newline at end of file diff --git a/field_visit_mermaid.mermaid b/field_visit_mermaid.mermaid new file mode 100644 index 0000000..afcba93 --- /dev/null +++ b/field_visit_mermaid.mermaid @@ -0,0 +1,54 @@ +graph TD + Start([Start: Field Visit Planning]) --> FJC[FJC Planning Module] + + FJC --> FJC1[Document Preparation] + FJC --> FJC2[Review & Approval Flow] + FJC --> FJC3[Dealer Coordination] + + FJC1 --> VE[Visit Execution Module] + FJC2 --> VE + FJC3 --> VE + + VE --> VE1{Field Visit
As Per Plan?} + VE1 -->|Yes| VE2[Execute Visit] + VE1 -->|No| VE3[Re-plan Changes] + VE3 --> VE2 + VE2 --> VE4[Dealer Discussion] + + VE4 --> DM[Discussion Management Module] + + DM --> DM1[Capture Actionable Insights] + DM --> DM2[Record Feedback] + DM --> DM3[Performance Metrics] + + DM1 --> MOM[MOM Creation Module] + DM2 --> MOM + DM3 --> MOM + + MOM --> MOM1[Structured Documentation] + MOM --> MOM2[Action Item Tracking] + MOM --> MOM3[Task Delegation] + + MOM1 --> CS[Closure & Sharing Module] + MOM2 --> CS + MOM3 --> CS + + CS --> CS1[Document Submission] + CS1 --> CS2[Archiving] + CS2 --> CS3[Stakeholder Communication] + + CS3 --> AW[Approval Workflow] + + AW --> AW1{Hierarchy-Based
Approval} + AW1 -->|Approved| End1([Completed & Archived]) + AW1 -->|Rejected| Feedback[Feedback to Team] + Feedback --> FJC + + style FJC fill:#e1f5ff + style VE fill:#fff4e1 + style DM fill:#f0e1ff + style MOM fill:#e1ffe1 + style CS fill:#ffe1f5 + style AW fill:#ffe1e1 + style Start fill:#90EE90 + style End1 fill:#90EE90 \ No newline at end of file diff --git a/settlment_diagram.mermaid b/settlment_diagram.mermaid new file mode 100644 index 0000000..714b3ac --- /dev/null +++ b/settlment_diagram.mermaid @@ -0,0 +1,80 @@ +graph TD + Start([Start: Dealer Claim Process]) --> RI[1.Request Initiation] + + RI --> RI1[Requestor Submits Request] + RI1 --> RI2[Activity Type] + RI1 --> RI3[Dealer Info] + RI1 --> RI4[Date/Location] + RI1 --> RI5[Activity Details & Period] + + RI2 --> PS[2.Proposal Submission] + RI3 --> PS + RI4 --> PS + RI5 --> PS + + PS --> PS1[Dealer Submits Proposal] + PS1 --> PS2[Cost Breakup] + PS1 --> PS3[Timeline for Closure] + PS1 --> PS4[Supporting Documents] + + PS2 --> RE[3.Request Evaluation] + PS3 --> RE + PS4 --> RE + + RE --> RE1{Requestor Reviews} + RE1 -->|Needs Clarification| RE2[Request More Info] + RE2 --> PS1 + RE1 -->|Approved| RE3[Confirm to Proceed] + + RE3 --> DLA[4.Dept.Lead Approval] + + DLA --> DLA1{Lead Reviews Request} + DLA1 -->|Needs Clarification| DLA2[Request Clarification] + DLA2 --> RE + DLA1 -->|Approved| DLA3[Approve Request] + + DLA3 --> BUD[5.Budgeting] + + BUD --> BUD1[Block Budget] + BUD1 --> BUD2[Assign to IO
Internal Order] + + BUD2 --> AC[6.Activity Creation] + + AC --> AC1[System Creates Activity] + AC1 --> AC2[Auto-Email Confirmation] + AC2 --> AC3[Notify Requestor] + AC2 --> AC4[Notify Dealer] + AC2 --> AC5[Notify Lead] + + AC3 --> AE[7.Activity Execution] + AC4 --> AE + AC5 --> AE + + AE --> AE1[Dealer Executes Activity] + AE1 --> AE2[Submit Required Documents] + + AE2 --> CA[8.Claim Approval] + + CA --> CA1{Requestor Reviews
Documents} + CA1 -->|More Info Needed| CA2[Request Additional Info] + CA2 --> AE2 + CA1 -->|Approved| CA3{Approval Type} + + CA3 -->|Full Approval| EI[9.E-Invoicing] + CA3 -->|Partial Approval| EI + + EI --> EI1[Generate E-Invoice] + EI1 --> EI2[Issue Credit Note] + EI2 --> End([Claim Settled]) + + style RI fill:#e3f2fd + style PS fill:#f3e5f5 + style RE fill:#fff3e0 + style DLA fill:#ffebee + style BUD fill:#e8f5e9 + style AC fill:#fce4ec + style AE fill:#e0f2f1 + style CA fill:#fff9c4 + style EI fill:#e1bee7 + style Start fill:#90EE90 + style End fill:#90EE90 \ No newline at end of file