🏠 Master β€ΊFlow & Architecture
βš™οΈ Admin 🏑 Client 🏒 Franchise βš–οΈ Compare πŸ“‘ Content πŸ’Ό Funnel πŸ“Š Intel πŸ‡¦πŸ‡² AM πŸ‡§πŸ‡ͺ BE πŸ‡ΊπŸ‡Έ US

Client Journey & Provider Flow

Two provider types, one marketplace. πŸ”΅ Blue Team = Individual Provider β€” bids and gets paid directly. 🟒 Green Team = Team Provider β€” belongs to a B2B company, dispatched through their admin. Both visible in the same bid pool. Client always tracks a real person.

PRICING TIERS (separate from provider types): Plan A β€” $1,500/mo flat Plan B β€” 15% per completed job These are B2B subscription pricing plans β€” NOT provider categories

πŸ“˜ Provider Model β€” Two Types, One Marketplace

πŸ”΅
Blue Team β€” Individual Provider
Solo operator. Independent contractor. No company above them. Bids directly on marketplace jobs. Gets paid directly via their own Stripe Connect account. Client tracks them immediately after bid is accepted.

DB: providers.provider_type = 'individual'
🟒
Green Team β€” Team Provider
Employee or member of a B2B company account. Their company may bid on their behalf (admin dispatches), or they can bid directly under the company umbrella. Payment goes to company Stripe Connect. Client tracks the person, not the company.

DB: providers.provider_type = 'team' + account_providers link

Plan A ($1,500/mo) and Plan B (15%/job) are pricing tiers for B2B accounts β€” they are NOT provider types. A Green Team company can be on Plan A or Plan B. Blue Team individuals always pay 15%/job (no flat rate option at launch).

End-to-End Flow β€” Master Overview
πŸ‘€
Client Logs In
Searches available services in their city/ZIP
πŸ“‹
Submits Service Request
Category, location, description β€” open bid
πŸ–₯️
Master Admin Panel Receives Request
Routing engine: trade + ZIP + account_providers lookup
πŸ“£
Open Bid Broadcast
All B2B companies + their employees in this trade/ZIP receive the job
🟒 Green Team β€” Via Company
🏒
B2B Company Admin Bids
Reviews request, submits company bid
βœ…
Client Accepts Company Bid
Job assigned to company account
πŸ‘₯
Company Dispatches Employee
Admin assigns specific employee from their roster
πŸ“
Client Tracks Employee
GPS + status β€” the worker, not the company brand
🏁
Job Complete
Sign-off β†’ payout release β†’ review
πŸ”΅ Blue Team β€” Direct Individual
πŸ§‘β€πŸ”§
Employee Bids Directly
Individual provider (company employee) bids under company umbrella
βœ…
Client Accepts Employee Bid
Provider profile shown to client immediately
πŸ“
Client Tracks Employee
Same GPS tracking β€” direct from accepted bid
🏁
Job Complete
Sign-off β†’ payout release β†’ review

⚑ Key Architecture Point for Grigori

In both bid routes, the client always tracks the individual worker β€” not a company brand. Whether a company dispatches the employee (Company Bid Route) or the employee wins the bid directly (Employee Direct Bid), the tracking object is the same: a provider record with GPS, trust score, and job status. The only difference is whether the dispatch decision was made by the company admin or by the employee themselves.

Every provider in the US B2B build is linked to a B2B account via the account_providers join table. There are no unaffiliated standalone freelancers in this model.

Client Journey β€” Step by Step

⚠️ Grigori β€” Bid Presentation Note

Whether the bid comes from a company admin or an employee directly, the client-facing bid card must look identical β€” a named, rated person with a trust score. The internal routing difference is transparent to the client. This keeps the UX clean and consistent regardless of which bid route wins.

Admin Routing Engine β€” How Jobs Are Broadcast

πŸ“Œ Routing Principle

The routing engine does not prioritize individual providers over companies (or vice versa). All providers affiliated with B2B accounts in the matching trade/ZIP are notified simultaneously. The open bid model lets the market decide who wins β€” fastest/best bid from any eligible source.

⚠️ Company Dispatch SLA

After a company bid is accepted, the company admin must assign an employee within the SLA window (recommend 15 min). If they don't, the job should auto-escalate. Build a countdown timer in the company admin view.

βœ… Trust Score in Routing

When presenting bids to the client, sort by: (1) trust score, (2) ETA, (3) price. High trust score providers surface first β€” this is the platform's quality signal and moat.

🟒 Green Team β€” B2B Company Bids, Then Dispatches Their Provider
Green Team Provider belongs to a B2B company. Company admin receives the job, submits the bid, then assigns the specific team member. provider_type = 'team'

πŸ—οΈ DB Objects Involved

b2b_accounts (company entity) β†’ account_providers (join: which employees belong to this company) β†’ providers (the employee record: GPS, trust_score, trade, zip_codes) β†’ jobs (b2b_account_id + provider_id + client_id + payment_status)

⚠️ Important β€” Commission Rules

Jobs dispatched through the marketplace (client submitted β†’ company bid β†’ won) are subject to Varpet commission per the B2B account's pricing plan: Plan A accounts pay $1,500/mo flat (no per-job fee). Plan B accounts pay 15% deducted from each completed paid job through the Stripe Connect payment flow. The job source field determines this: jobs.job_source = 'marketplace'.

πŸ”΅ Blue Team β€” Individual Provider Bids Directly
Blue Team Solo operator. No company above them. Bids directly, gets paid directly. provider_type = 'individual'

πŸ“Œ How Blue Team Differs from Green Team

A Blue Team provider is a solo operator β€” a single person running their own trade business. They have no company admin dispatching them. They see the open bid, submit their own bid with their own price and ETA, and if accepted, the client tracks them directly. Their Stripe Connect account receives payment minus Varpet's 15%. No middleman, no dispatch step, no company layer. Simple and fast.

βœ… Client Experience β€” Identical

From the client's perspective, an employee direct bid looks exactly the same as a company bid that was dispatched to a worker. They always see a named, rated, GPS-trackable individual. The route taken is invisible.

⚠️ Grigori β€” Company Awareness

When an employee bids directly, should the company admin see this in their dashboard? Recommend yes β€” the company admin should have a log of all bids submitted by their employees, even if they didn't initiate the dispatch. Visibility without blocking.

B2B Own-Customer Panel β€” Zero Commission Track
Own Customer B2B company adds their existing customers to the platform and manages jobs internally. No Varpet commission applies.

πŸ“Œ Purpose β€” Why This Exists

Many local service companies already have an existing customer base they service directly. Forcing them to run these jobs through the Varpet marketplace (and pay commission) would be a deal-breaker. The Own-Customer Panel lets them use Varpet's dispatch, tracking, and payment tools for their existing relationships β€” at no extra cost. This is a value add that drives stickiness, not a revenue source. It also naturally expands the platform's job volume and trust score data.

Flow β€” Own-Customer Job

βœ… Benefits to the Company

Full dispatch and tracking tools at no extra cost. All jobs β€” marketplace AND own-customer β€” visible in one dashboard. Trust score data accrues across both job types, strengthening the employee's profile over time.

⚠️ DB Flag Required

The jobs.job_source field is critical. It must be enforced at the DB level to prevent billing logic from applying commission to own-customer jobs. Recommend: ENUM('marketplace', 'own_customer', 'manual'). Commission triggers only on 'marketplace'.

Future: Own-Customer β†’ Marketplace Conversion
When an own-customer later searches Varpet for a service that the company doesn't offer, the platform can surface other B2B providers β€” naturally converting an own-customer into a marketplace transaction. This is a growth flywheel: companies bring their customers in, and Varpet earns commission when those customers go outside the company's service scope.
Three Provider Tracks β€” Side-by-Side Comparison
Dimension 🟒 Green Team (B2B Company) πŸ”΅ Blue Team (Individual) B2B Own-Customer Panel
Job origin Client submits via marketplace Client submits via marketplace Company admin creates directly
Who bids Company admin (on behalf of company) Individual employee (under company umbrella) No bid β€” direct assignment
Dispatch step after bid wins βœ“ Admin must assign employee βœ— Employee already confirmed βœ“ Admin assigns employee
Client tracking object Employee (after company assigns) Employee (immediately) Employee (after assignment)
Client sees company name Yes β€” company bid card shown Optional β€” employee shown primarily N/A β€” direct company relationship
Trust score used Company aggregate + employee after assign Employee personal trust score Employee personal trust score
Varpet commission Yes β€” per Plan A/B pricing Yes β€” per Plan A/B pricing βœ— Zero commission
Stripe payment + payout release Yes β€” required Yes β€” required Optional (company handles payment)
Review tied to Employee trust score profile Employee trust score profile Employee trust score profile
DB job_source value 'marketplace' 'marketplace' 'own_customer'
Open bid broadcast βœ“ Yes βœ“ Yes βœ— No β€” internal only
Who can initiate Company admin (b2b_admin role) Employee (provider role) Company admin (b2b_admin role)
Plan A/B pricing applies βœ“ Yes βœ“ Yes βœ— No
Pricing Plans β€” Plan A vs Plan B (for reference)
Plan A
$1,500/mo
Flat monthly subscription β€” best for accounts ready to scale
  • Managed Google Ads integration
  • CallRail tracking number per account
  • Website lead webhook to jobs table
  • Metricool social feed
  • Unlimited marketplace jobs β€” no per-job fee
  • Full dispatch + payment protection + trust score
  • B2B own-customer panel included
Plan B
15% per completed job
Zero upfront β€” 15% deducted from each completed paid job via Stripe Connect
  • No monthly commitment
  • Dispatch + payment protection + trust score included
  • B2B own-customer panel included
  • Natural upsell: once job volume makes $1,500/mo the cheaper option, upgrade to Plan A
  • 15% deducted automatically at job completion (Stripe Connect)

⚠️ Plan A/B = Pricing Only β€” Not Provider Types

Plan A and Plan B describe the B2B account's subscription pricing tier β€” not the type of provider or the routing path. Any B2B account on any pricing plan can use Company Bid, Employee Direct Bid, or the Own-Customer Panel. The plan determines how Varpet bills the account, nothing else.

Database Architecture β€” Key Tables & Relationships

πŸ“Œ Schema Source

Based on: VARPET Migration account_providers 2026 0505.sql and VARPET Lovable Prompt Provider Management 2026 0505.md. Supabase project: ocmfkyeziebaspxydbei.supabase.co. RLS enforced at Postgres level β€” not application code.

πŸ“‹ providers β€” Global Pool (Blue + Green)
FieldTypeNotes
idUUIDPrimary key
provider_typeENUM'individual' (πŸ”΅ Blue β€” solo, no company) | 'team' (🟒 Green β€” belongs to a B2B account via account_providers)
nameTEXTFull name of the worker/provider
emailTEXTLogin / contact
phoneTEXTTwilio SMS target
tradeENUMhandyman, plumbing, electrical, hvac, auto_body, painting, cleaning, other
zip_codesTEXT[]Array of ZIPs this provider serves β€” used in routing query
trust_scoreNUMERIC(5,2)0–100 composite score (7-component). Default 70.0 for new providers.
verifiedBOOLEANIdentity verified
background_checkBOOLEANBackground check passed
insurance_verifiedBOOLEANProof of insurance on file
tierENUM'standard' | 'preferred' | 'elite' β€” NOT Plan A/B
stripe_idTEXTStripe Connect sub-account (if employee receives direct pay β€” TBD)
languageTEXTPrimary language (for future VOICEN integration)
activeBOOLEANSoft-disable without deleting the record
πŸ”— account_providers β€” Join Table (Provider ↔ B2B Account)
FieldTypeNotes
account_idUUIDFK β†’ b2b_accounts.id (CASCADE delete)
provider_idUUIDFK β†’ providers.id (CASCADE delete)
statusTEXT'active' | 'suspended' | 'removed'. Only 'active' providers receive bid notifications.
added_byUUIDuser_profiles.id of the admin who added this provider
added_atTIMESTAMPTZAuto-set NOW()
PRIMARY KEY (account_id, provider_id) β€” a provider can be linked to approved B2B accounts according to employment or contractor rules.
RLS Policies: founder_all_account_providers (full access) Β· b2b_own_account_providers (account-scoped) Β· provider_own_account_memberships (SELECT only, own provider_id)
🏒 b2b_accounts β€” Local Service Business Accounts
FieldTypeNotes
idUUIDPrimary key
company_nameTEXTe.g. "CaliforniaFix Auto Body"
contract_tierTEXT'plan_a' | 'plan_b' β€” B2B pricing plan selection
monthly_capNUMERICOptional job cap for Plan A accounts
contact_emailTEXTPrimary admin contact
stripe_connect_idTEXTCompany's Stripe Connect account β€” approved payouts release here
πŸ‘€ clients β€” End Customers
FieldTypeNotes
idUUIDPrimary key (= auth.uid() for marketplace clients)
nameTEXTFull name
b2b_account_idUUIDFK β†’ b2b_accounts. Set for own-customer records; NULL for marketplace clients.
typeENUM'marketplace' | 'own_customer'
kyc_levelINTFor future compliance requirements
stripe_customer_idTEXTStripe customer for payment method on file
RLS Policies: founder_all_clients Β· b2b_own_clients (b2b_account_id scoped) Β· client_own_record (id = auth.uid())
πŸ”§ jobs β€” Core Transaction Table
FieldTypeNotes
idUUIDPrimary key
tradeENUMMatches providers.trade
zipTEXTService location ZIP
statusENUMpending | assigned_to_account | dispatched | in_progress | complete | disputed
provider_idUUIDFK β†’ providers. The EMPLOYEE assigned, not the company account.
client_idUUIDFK β†’ clients
b2b_account_idUUIDFK β†’ b2b_accounts. Always set, even for direct employee bids.
job_sourceENUM'marketplace' (commission applies) | 'own_customer' (no commission) | 'manual'
bid_typeENUM'company_bid' | 'employee_direct_bid' β€” tracks which route was used
payment_statusENUMpending | collected | payout_released | refunded
payment_amountNUMERICCustomer payment amount processed through Stripe
photosTEXT[]Before/during/after URLs
scope_docTEXTJob description / scope
sign_offBOOLEANDigital sign-off by client. Triggers approved payout release.
created_atTIMESTAMPTZAuto NOW()
🌍 country_operations β€” Country Ownership / Licensing Layer (NEW)
FieldTypeNotes
idUUIDPrimary key
country_codeTEXT'AM' (Armenia), 'BE' (Belgium), 'US' (USA) β€” ISO 3166 code
country_nameTEXTe.g. 'Armenia', 'Belgium', 'USA'
operation_typeENUM'company_owned' | 'licensed_operator' | 'to_confirm'
operator_legal_nameTEXTVarpet entity or independent licensed territory operator
platform_royalty_pctNUMERIC7% proposed only for licensed_operator; NULL for company-owned markets
royalty_baseTEXTDefined local platform gross revenue; exclusions set by agreement
currencyTEXTLocal currency code: 'USD', 'EUR', 'AMD'
payment_providerTEXTLocal payment rail (Stripe, IDram, etc.)
statusTEXT'active' | 'pending' | 'suspended'. Active: AM, BE. Launching: US.
admin_user_idUUIDFK β†’ user_profiles. Independent country_admin for either operation model.
Country operations: πŸ‡¦πŸ‡² Armenia β€” ACTIVE, model to confirm Β· πŸ‡§πŸ‡ͺ Belgium β€” ACTIVE, model to confirm Β· πŸ‡ΊπŸ‡Έ USA β€” COMPANY-OWNED PILOT
πŸ‘₯ user_profiles β€” Roles (RLS Gate)
RoleWhoWhat they see
global_adminCaptain (Varpet Global)Permitted oversight across country operations, accounts, providers, jobs, and licensed-market royalty reports.
country_adminCountry Operation AdminTheir country only β€” whether Varpet-owned or licensed. Manages local B2B accounts, providers, jobs, and compliance.
b2b_adminCompany corporate adminTheir account's providers (via account_providers), their jobs, their marketing dashboard. Scoped by country.
b2b_userBusiness location userSame as b2b_admin but limited to one location. Read-only on provider verification.
providerπŸ”΅ Blue or 🟒 Green Team workerTheir assigned jobs only. No marketing data. Mobile-first job card view.

🌍 Two Separate Money Rules β€” Do Not Combine Them

15%
B2B Plan B charge for completed marketplace jobs inside a country
7%
Licensed country operator royalty to Varpet Global on defined local platform revenue
0%
Royalty between Varpet Global and a company-owned country such as the US pilot

Plan A/B pricing governs what a local B2B customer pays. Country licensing governs what an independent licensed territory operator owes Varpet Global. The 7% royalty is not a provider payout split and must be applied only when country_operations.operation_type = 'licensed_operator'.

🌍 VARPET GLOBAL ADMIN
Platform Overview β€” All Countries
global_admin ● No RLS Filter β€” Full Access
Countries
3
2 Active Β· 1 Launching
Providers
4,795
Verified platform-wide
Total Jobs
47,193
Completed all-time
Platform GMV
$1.41M
Cumulative all-time
Commission Rate
15%
Plan B Β· marketplace jobs
Country Operations β€” country_operations
Country Operator Status Currency Payment Rail Model Global Royalty Admin Role
πŸ‡¦πŸ‡²
Armenia
code: AM
Varpet Armenia ● ACTIVE AMD ֏ Stripe Β· IDram Confirm Per agreement country_admin (AM)
πŸ‡§πŸ‡ͺ
Belgium
code: BE
Varpet Belgium ● ACTIVE EUR € Stripe Β· Bancontact Confirm Per agreement country_admin (BE)
πŸ‡ΊπŸ‡Έ
USA
code: US
Varpet USA ◐ LAUNCHING USD $ Stripe Connect Company-owned N/A country_admin (US)
Country Intelligence Boards β€” Live Dashboards
πŸ‡¦πŸ‡²
Armenia
βœ… Real Data Β· Company-Owned
47K+
Completed Jobs
4,795
Verified Providers
β†’ Open Armenia Intel Board
πŸ‡§πŸ‡ͺ
Belgium
πŸ”‘ Licensed Β· Roof Care Β· 7% Royalty
11.6M
Population
162
Rain Days / Year
β†’ Open Belgium Intel Board
⭐ ACTIVE FRANCHISE PILOT
πŸ‡ΊπŸ‡Έ
USA β€” Company Owned
πŸš€ Launching 2026 Β· CaliforniaFix Pilot Β· LA First
Franchise β†’ B2B
Admin manages all accounts
$1,500/mo
Flat fee per B2B account
βš™οΈ Open Admin Portal β†’ USA Intel Board
Access Hierarchy β€” Who Sees What
🌍
βš“ Captain β€” global_admin
All countries Β· All accounts Β· All providers Β· All jobs Β· All revenue Β· No RLS filter
πŸ‡¦πŸ‡²
country_admin (AM)
Independent panel Β· Model to confirm
b2b_admin (AM)
Local company accounts
🟒 Green Team Β· πŸ”΅ Blue Team
4,795 providers
πŸ‡§πŸ‡ͺ
country_admin (BE)
Independent panel Β· Model to confirm
b2b_admin (BE)
Local company accounts
🟒 Green Team Β· πŸ”΅ Blue Team
Local providers
πŸ‡ΊπŸ‡Έ
country_admin (US)
COMPANY-OWNED PILOT Β· CaliforniaFix
βš™οΈ b2b_admin (US)
β†’ Open Admin Portal
🟒 Green Team Β· πŸ”΅ Blue Team
US service providers
Local Pricing vs Country Licensing
Local Marketplace Payment Flow
Client pays 100% β†’ payment collected through Stripe
Digital sign-off β†’ provider payout follows the local job agreement
Plan B β†’ 15% platform fee on completed marketplace jobs
Plan A β†’ $1,500/mo local B2B fee; no per-job platform fee
Plan B β€” Per Job
15%
Local platform fee
B2B
local pricing
+
Job
marketplace
Licensed Country Operator
7%
royalty to Varpet Global
Calculated on defined local platform gross revenue
Does not apply to company-owned US pilot
Do not combine fee layers: Plan A/B governs local B2B customer pricing. A country royalty exists only for an independent licensed operator and is stored in country_operations.platform_royalty_pct. Royalty base and exclusions must be written in the licensing agreement.
πŸ€– PHASE 2 β€” AI LAYER
3-Agent AI Architecture
Customer Agent Β· Provider Agent Β· Admin Orchestrator β€” each owns its lane, talks to each other
Claude Haiku 4.5
~$0.002 / interaction Β· Zero new vendors
"Three AI agents working in parallel β€” one handles your clients, one handles your workers, one manages everything in between. From first call to five-star review, fully automated."
πŸ§‘β€πŸ’Ό
Customer Agent
Talks to: End Client
What it handles
πŸ“ž Inbound lead β†’ qualify β†’ create job
πŸ“΅ Missed call β†’ auto SMS in 60s
πŸ“ "Marcus assigned. ETA 45 min."
πŸš— "Your provider is on the way."
βœ… "Job done. Sign off: [link]"
⭐ Rating collection + Google review
πŸ” +7 day rebooking SMS
Does NOT
Contact providers Β· Dispatch jobs Β· See other clients
customer-agent
Triggered by: Twilio Β· CallRail Β· Form POST Β· Supabase Realtime
πŸ”§
Provider Agent
Talks to: πŸ”΅ Blue + 🟒 Green Team
What it handles
πŸ“€ "New job: [trade] [ZIP]. Accept?"
βœ… Confirm: client details + address
⏰ 60-min arrival reminder
πŸ“· Photo upload prompts (before/after)
🏁 "Mark complete to release payment."
πŸ’° "$X released to your Stripe."
🎯 Trust score change notification
Does NOT
Contact clients directly Β· Dispatch jobs Β· See other providers
provider-agent
Triggered by: Twilio inbound Β· Supabase Realtime Β· Scheduled reminders
🧠
Admin Orchestrator
The Brain β€” coordinates both agents
What it handles
🎯 Dispatch: match provider by trade/ZIP/trust
πŸ”„ Status relay: Provider β†’ Customer Agent
⚠️ Escalate: no accept β†’ retry β†’ alert admin
πŸ’³ Stripe payout release after sign-off
πŸ“Š Local B2B pricing + licensed-market royalty reported separately
πŸ“ˆ Daily/weekly reports to admins
🚨 Low rating β†’ flag provider + alert
Does NOT
Talk to clients Β· Talk to providers Β· Skip escalation
admin-agent
Triggered by: Customer Agent events Β· Provider Agent events Β· Stripe webhooks Β· Cron
Inter-Agent Communication Flow
── LEAD PHASE ──
CLIENT contacts β†’ Customer Agent qualifies + creates job β†’ signals Admin Agent
↓
Admin Agent matches provider β†’ signals Provider Agent
↓
Provider Agent sends job offer β†’ provider accepts β†’ reports to Admin Agent
↓
Admin Agent sets jobs.status = 'assigned' β†’ Supabase Realtime fires
↓
Customer Agent picks up Realtime β†’ SMS client: "Marcus assigned. ETA 45 min."
── IN-JOB PHASE ──
Provider Agent (arrives/completes) β†’ Admin Agent β†’ Customer Agent (client update)
Customer Agent (sign-off received) β†’ Admin Agent (Stripe release) β†’ Provider Agent (payment notice)
Customer Agent (rating collected) β†’ Admin Agent (trust score update + escalate if <3β˜…)
Key rule: Provider Agent NEVER contacts client. Customer Agent NEVER contacts provider. Admin Agent is the only relay.
Build Sequence β€” Grigori
Phase 2A Β· 3 wks Β· FIRST
Admin Agent
Dispatch logic Β· Status relay Β· Escalation rules Β· Stripe release Β· Revenue split
Phase 2B Β· 3 wks
Provider Agent
Job offer SMS Β· Status updates Β· Photo prompts Β· Payment confirmation
Phase 2C Β· 3 wks
Customer Agent
Lead qualify Β· Status updates Β· Sign-off Β· Rating Β· Rebooking
Phase 2D Β· 2 wks
Dashboard
job_comms thread per job Β· Agent KPIs Β· Escalation inbox