Vendor Portals & Operations
Relevant source files
The following files were used as context for generating this wiki page:
The Vendor Portals & Operations system is a comprehensive suite of tools designed to facilitate the lifecycle of service provider engagement within the platform. It provides vendors with a dedicated interface to discover project opportunities, submit competitive bids via Request for Quotations (RFQs), manage assigned projects, and track financial performance.
The system is built on a role-based access control architecture, ensuring that only authenticated users with the vendor role can access sensitive project data and financial tools. It integrates tightly with Supabase for real-time data persistence and utilizes complex data structures to manage multi-lot bidding, compliance documentation, and milestone tracking.
Core Portal Architecture
The vendor portal is primarily orchestrated through the EnhancedVendorSystem component and specialized dashboard pages. It distinguishes between discovery (Marketplace) and operational management (Dashboard).
Component Hierarchy and Access Control
Access to vendor operations is guarded by the OptimizedProtectedRoute component, which enforces the vendor role requirement. The system uses the useAuth context to determine subscription levels (basic, premium, enterprise), which in turn dictates feature availability, such as the ability to apply for projects or view restricted opportunities.
Sources: src/components/EnhancedVendorSystem.tsx:112-140, src/App.tsx:210-230
Vendor State Management
The operational state of a vendor is tracked through several specific tables in the database:
vendor_profiles: Stores verification status, specialties, and ratings.vendor_applications: Tracks the vendor's intent to participate in projects.vendor_bids: Records specific financial and technical proposals for RFQs.
Sources: src/integrations/supabase/types.ts:1530-1650
RFQ & Bidding Operations
The Request for Quotation (RFQ) system is the primary mechanism for project acquisition. It supports complex bidding structures, including multi-lot bidding where a single project is broken down into individual items or service areas.
The Bidding Process
The bidding flow moves from discovery in the VendorMarketplace to detailed analysis in the VendorComprehensiveRFQDetail page.
Description: The logic flow for a vendor from finding an opportunity to contract award.
Multi-Lot Bidding Logic
Vendors do not simply submit a total price; they provide unit_price entries for specific rfq_lots via the bid_lines table. This allows administrators to compare bids at a granular level.
| Field | Type | Description |
|---|---|---|
rfq_lot_id | UUID | Foreign key to the specific item being bid on. |
unit_price | Numeric | The vendor's price per unit for that specific lot. |
vendor_id | UUID | The unique identifier of the submitting vendor. |
notes | Text | Technical specifications or caveats for the specific lot. |
Sources: src/integrations/supabase/types.ts:240-270, src/pages/vendor/ComprehensiveRFQDetail.tsx:40-60
Project & Milestone Management
Once a bid is accepted and a project is assigned, the portal shifts to an operational management view. This is handled by the VendorProjectDetails component.
Operational Lifecycle
Projects progress through states defined in the status field: assigned, in_progress, completed, and on_hold.
Milestone Tracking
Projects are decomposed into project_milestones. Each milestone includes:
amount: The financial value associated with completion.due_date: The deadline for the specific phase.status: Tracking whether the phase ispending,in_progress, orcompleted.
Sources: src/pages/VendorProjectDetails.tsx:80-110, src/integrations/supabase/types.ts:1140-1175
Description: The interaction sequence for milestone completion and deliverable approval.
Financial Reporting & Analytics
The system provides vendors with real-time insights into their operational efficiency and financial health through the useVendorReportsData hook.
Key Performance Indicators (KPIs)
The reporting engine calculates several critical metrics:
- RFQ Win Rate: The ratio of
awardedbids to total bids submitted. - On-Time Rate: The percentage of milestones completed on or before their
due_date. - Monthly Financials: Aggregated totals from the
invoicesandvendor_payoutstables.
Sources: src/hooks/useVendorReportsData.ts:40-100
Financial Data Structures
The financial status is derived from two primary sources:
vendor_payments: Tracks money owed by the platform/tenant to the vendor.vendor_payouts: Tracks the actual disbursement of funds to the vendor's linked bank account.
| Table | Status Values | Usage |
|---|---|---|
vendor_payments | pending, paid, refunded | Operational billing. |
vendor_payouts | processing, completed, failed | Fund disbursement. |
Sources: src/integrations/supabase/types.ts:1450-1530
Conclusion
The Vendor Portals & Operations module serves as the functional bridge between property management requirements and service provider execution. By centralizing RFQ discovery, granular bid submission, milestone-based project tracking, and automated financial reporting, the system ensures transparency and efficiency in vendor relations. The underlying architecture utilizes a robust set of relational tables and real-time hooks to maintain data integrity across the various stages of the vendor lifecycle.