Vendor Management System
Relevant source files
The following files were used as context for generating this wiki page:
The Vendor Management System (VMS) is a core module of the Monarch Property Management platform designed to facilitate the end-to-end lifecycle of service providers. It encompasses vendor onboarding, verification, project discovery via a marketplace, and a bidding system integrated with Request for Quotations (RFQs).
The system serves two primary personas: Administrators/Property Managers, who oversee vendor compliance and assign work, and Vendors, who manage their professional profiles, upload required documentation, and submit competitive bids for property projects.
Sources: src/components/EnhancedVendorSystem.tsx:106-125, src/pages/VendorMarketplace.tsx:107-122
Data Architecture
The VMS relies on a robust relational schema centered around the vendor_profiles table, which extends the base profiles table to include professional metadata.
Core Entities and Relationships
The system manages the relationship between general user accounts and specialized vendor entities, ensuring that professional credentials and performance metrics are tracked separately from authentication data.
Sources: src/integrations/supabase/types.ts:1330-1420, src/integrations/supabase/types.ts:1421-1463
Principal Data Models
| Table | Description | Key Fields |
|---|---|---|
vendor_profiles | Professional profile data for service providers. | company_name, is_verified, specialties, rating, completed_jobs. |
vendor_documents | Compliance and legal documents (e.g., insurance). | document_type, file_path, is_verified, vendor_id. |
vendor_bids | Proposals submitted by vendors for specific projects. | bid_amount, proposal_details, status, vendor_id. |
vendor_reviews | Performance feedback from property managers. | overall_rating, review_text, is_verified_project. |
Sources: src/integrations/supabase/types.ts:1330-1420, src/pages/AdminVendorManagement.tsx:21-34
Vendor Verification Workflow
A critical component of the VMS is the multi-layered verification process. Vendors must pass several checks before achieving a "Fully Verified" status, which is often a prerequisite for high-budget projects.
Verification Statuses
The system tracks three distinct verification flags:
- General Verification (
is_verified): Basic approval by administrative staff. - Insurance Verification (
insurance_verified): Validation of active liability insurance. - Background Check (
background_check_verified): Confirmation of cleared security screenings.
Sources: src/pages/AdminVendorManagement.tsx:88-100, src/components/EnhancedVendorSystem.tsx:220-235
Verification Flow
Administrators utilize a management interface to toggle these flags after manually reviewing documents in the vendor-assets storage bucket.
Sources: src/pages/AdminVendorManagement.tsx:64-77, src/pages/VendorDocuments.tsx:89-106
Vendor Marketplace and Discovery
The Vendor Marketplace provides a directory for property managers to find qualified contractors based on location, specialty, and performance ratings.
Filtering and Search Logic
The discovery layer implements complex filtering across:
- Specialties: Filtering by categories such as Plumbing, Electrical, HVAC, etc.
- Location: Geospatial filtering via service areas.
- Ratings: Minimum star thresholds (4+, 4.5+).
- Subscription Tiers: Highlighting "Premium" or "Enterprise" vendors in search results.
Sources: src/pages/VendorMarketplace.tsx:50-80, src/pages/AdminVendorManagement.tsx:79-86
Bidding and RFQ Integration
Vendors interact with property projects through a bidding system. This process is integrated with the legacy projects table and the enhanced rfqs (Request for Quotations) system.
Bid Management Functions
Admins use the AdminRFQSystem to manage interactions:
fetchProjectBids(projectId): Retrieves all proposals for a specific listing.acceptBid(bidId, projectId, vendorId): Atomic operation that accepts a bid, assigns the vendor, updates project status toin_progress, and rejects competing bids.handleSendNotification(project): Dispatches in-app notifications to all available verified vendors when a new project is posted.
Sources: src/components/AdminRFQSystem.tsx:206-250, src/components/AdminRFQSystem.tsx:327-365
Vendor Document Management
Vendors are provided with a dedicated document vault to maintain compliance. The system handles various file formats and tracks storage utilization.
- Categorization: Documents are typed (e.g.,
business_document,certification). - Upload Handling: Files are stored in the
vendor-assetsbucket with metadata saved tovendor_documents. - Storage Tracking: The system calculates "Storage Used" (of a 100MB limit) to prevent abuse and ensure system health.
Sources: src/pages/VendorDocuments.tsx:30-55, src/pages/VendorDocuments.tsx:112-140
Conclusion
The Vendor Management System provides a standardized framework for interacting with third-party service providers. By centralizing verification, document compliance, and bidding within a single module, it reduces administrative overhead and ensures that property improvement projects are handled by qualified, insured, and verified professionals. Significant emphasis is placed on the "Verified" status, which serves as a trust anchor throughout the marketplace and project assignment workflows.