Requirement Estimator & Quoting
Relevant source files
The following files were used as context for generating this wiki page:
- sunrise-angular/src/app/shared/components/requirement-estimator/requirement-estimator.component.ts
- sunrise-angular/src/app/shared/components/requirement-estimator/requirement-estimator.component.html
- sunrise-angular/src/app/shared/components/requirement-estimator/requirement-estimator.component.scss
- sunrise-angular/src/app/core/constants/site-data.ts
- implementation_plan.md
- task.md
The Requirement Estimator & Quoting module is an interactive conversion engine that allows users to configure technical parameters for security and telecommunication systems. It generates automated hardware recommendations, a Bill of Quantities (BOQ) estimate, and a pre-filled WhatsApp quote to facilitate lead generation for Sunrise Communication.
The module operates as a standalone Angular component, integrating quantitative logic for CCTV storage, NVR channel selection, and Intercom capacity sizing based on premise type. It serves as a core element of the project's Search Experience Optimization (SXO) and Mobile Engineering Optimization (MEO) strategy.
Sources: task.md:46-52, implementation_plan.md:329-335, requirement-estimator.component.ts:1-15
Component Architecture and State Management
The RequirementEstimatorComponent uses Angular Signals for reactive state management. The component tracks user progress through a four-step wizard and maintains configuration signals for premise types, selected services, and quantitative hardware parameters.
State Transitions
The component uses the currentStep signal to control the UI view. Users navigate between steps to define their property type, required modules (CCTV, Intercom, Biometrics, Networking), and specific quantities (e.g., camera count or flat count).
Component State Signals
The following signals manage the internal data state of the estimator:
| Signal Name | Type | Description |
|---|---|---|
currentStep | WritableSignal<number> | Tracks the active step in the wizard (1-4). |
selectedPremise | WritableSignal<PremiseType> | Stores the type of property (Society, Office, Warehouse, Retail, Villa). |
needCctv | WritableSignal<boolean> | Toggles CCTV surveillance requirements. |
cameraCount | WritableSignal<number> | Numerical count of cameras (2 to 64). |
flatCount | WritableSignal<number> | Numerical count of flats for intercom sizing (10 to 300). |
storageDays | WritableSignal<number> | Desired retention days for video recording (15, 30, 45, 60). |
Sources: requirement-estimator.component.ts:18-40, requirement-estimator.component.html:150-165
Estimation Logic and Computed Recommendations
The component uses computed() signals to derive technical architectures based on user input. This logic eliminates manual calculation for the user by determining hardware specifications like NVR channels, HDD capacity, and PBX models automatically.
CCTV and Storage Calculation
The component calculates the required Surveillance Grade HDD capacity based on camera count and storage days. It uses a base formula to estimate Terabytes (TB) and matches it against standard industry sizes (2TB to 24TB).
recommendedHdd = computed(() => {
const cams = this.cameraCount();
const days = this.storageDays();
const estTb = Math.ceil((cams * 20 * days) / 1000);
const standardSizes = [2, 4, 6, 8, 12, 16, 24];
const match = standardSizes.find(s => s >= estTb) || standardSizes[standardSizes.length - 1];
return `${match} TB Surveillance Grade HDD (WD Purple / Seagate SkyHawk)`;
});
Sources: requirement-estimator.component.ts:51-58
Hardware Selection Logic
Hardware recommendations scale according to user-defined quantities:
- NVR Selection: Ranges from 4-Channel 4K NVRs for small setups to 64-Channel Enterprise NVRs for large installations.
- Intercom Selection: Selects between Compact Multi-Line systems, Matrix ETERNITY expandable units, or Hybrid IP-PBX systems with fiber backbones based on the
flatCountsignal. - Biometric Selection: Recommends AI Facial Recognition readers for setups with more than 2 doors or 100 employees, otherwise defaulting to fingerprint terminals.
Sources: requirement-estimator.component.ts:42-75
Quote Generation and Export
The final step of the module aggregates all selected services and computed hardware recommendations into a formatted Bill of Quantities (BOQ).
WhatsApp Integration
The component generates a dynamic WhatsApp URL that pre-fills a technical requirement summary. This allows the user to send their specific site requirements directly to Sunrise Communication's primary contact number.
Clipboard Export
Users can copy the full technical specification to their clipboard using the copyBoqToClipboard() method. This feature is specifically provided for Housing Society committee members to paste requirements into society WhatsApp groups. A copiedToast signal provides visual feedback for 3.5 seconds after a successful copy operation.
Sources: requirement-estimator.component.ts:113-120, requirement-estimator.component.html:322-326
UI and Styling Implementation
The module is housed in the requirement-estimator-card class, utilizing a responsive layout that adapts to mobile and desktop screens.
- Progress Indicators: A
steps-progress-barprovides visual navigation between planning phases. - Interactive Cards: Premise and Service selection use interactive cards (
premise-card,service-checkbox-card) that change state (border colors and shadows) when selected. - Animations: The component utilizes
animate-fade-intransitions to smooth the navigation between step contents. - Styling Themes: The UI incorporates a specific
amc-highlightstyle for Annual Maintenance Contracts, featuring dashed borders and linear gradients to distinguish service protection from hardware products.
Sources: requirement-estimator.component.scss:1-60, requirement-estimator.component.scss:138-160, requirement-estimator.component.html:84-135
Conclusion
The Requirement Estimator & Quoting module serves as the primary interactive lead generation tool for the project. By automating complex hardware sizing logic—such as CCTV storage and PBX capacity—it provides users with immediate technical blueprints while streamlining the inquiry process through structured WhatsApp and clipboard exports.
Sources: task.md:46-52, requirement-estimator.component.ts:78-107