3. System Architecture & Workflow
3.1 Email Intake & Classification Module
1
Email Monitor: Polls estimation@sabi.ae at configurable intervals (e.g., every 15 minutes) via Gmail API. New emails are ingested and stored in Supabase.
2
RFQ Detector: Gemini AI scans subject line, body, and sender domain for bid-intent signals. Returns a confidence score and matched keywords.
3
Classifier: AI assigns one of four priority tiers: Priority-Top, Priority-General, New, or To Be Ignored. Estimator can override classification in the dashboard.
4
To-Bid List: Qualified enquiries appear in the bid pipeline with sender, project name (if detected), received time, and classification badge.
3.2 Attachment Processing Module
5
Attachment Extractor: Downloads all email attachments. Detects and unzips .zip, .rar, .7z archives recursively.
6
Enclosure Builder: Creates a project-specific folder in cloud storage. Copies email body (as .txt) and all extracted files into the folder.
7
Drawing Catalogue: Lists all files by type — ACAD (.dwg) and PDF — with file name, sheet title (if readable), and page count. Presented to estimator for confirmation before proceeding.
8
Project Parameter Extraction: Gemini Vision parses PDF drawings and cover sheets to extract: number of floors (total, typical, parking), floor area (per floor and total), typical floor-to-floor height. Report displayed for estimator confirmation.
3.3 Thermal Load & Estimation Module (Air Conditioning)
9
Service Detection: AI identifies which MEP services are present from drawing index (AC, FAHU, Plumbing, Fire, Electrical, BMS, etc.).
10
Thermal Load Parser: Locates thermal load schedule drawings. Reads the bottom-of-column total KW. Separately identifies FAHU supply KW. Computes AC Unit KW = Total KW − FAHU KW.
11
System Type Detection: Identifies AC system type (VRF, Chilled Water, FCU, Split, etc.) from drawing notes and equipment schedules.
12
Tonnage Calculator: Converts AC Unit KW to Refrigeration Tonnes: RT = KW ÷ 3.517.
13
Formula Pricing Engine: Applies SABI's configured pricing rate (per RT, per KW, or per m²) for the identified system type to compute estimated bid price for each service.
3.4 Quotation & Dispatch Module
14
Bid Compilation: Aggregates all service estimates into a total bid amount with line-item breakdown.
15
Yardstick Comparison: Compares total bid per m² against SABI's benchmark values. Flags if variance exceeds ±15%.
16
Quotation Generator: Produces a branded, formatted quotation document (PDF) with scope, pricing, validity, and terms.
17
Consent & Dispatch: Estimator reviews and clicks Approve to Send. System sends quotation email to enquiry sender. Full send log recorded.