Product Overview

How BarterBay works

A behind-the-scenes look at the trade engine, AI services and rules pipeline powering the marketplace.

Core user flow

Discover

AI Match

Negotiate

Trade

Review

Membership

System layers
┌──────────────────────────────────────────────┐
│  Web App  (React · TanStack · Tailwind)      │
├──────────────────────────────────────────────┤
│  AI Services                                 │
│  ├─ Smart Search (vector + intent)           │
│  ├─ Trade Matching (preference graph)        │
│  └─ Support Bot  (RAG + handoff)             │
├──────────────────────────────────────────────┤
│  Rules Engine                                │
│  ├─ Listing validation & fair-value scoring  │
│  ├─ Anti-fraud heuristics                    │
│  └─ Membership entitlements                  │
├──────────────────────────────────────────────┤
│  Domain Services                             │
│  Listings · Trades · Messaging · Reviews     │
├──────────────────────────────────────────────┤
│  Data · PostgreSQL · Object Store · Cache    │
└──────────────────────────────────────────────┘
Trade lifecycle
  1. 1

    Proposal

    Trader A offers Listing X for Listing Y.

  2. 2

    Validation

    Rules engine checks fair-value within +/-25% tolerance.

  3. 3

    Match score

    AI computes compatibility 0-100 from history + tags.

  4. 4

    Negotiation

    Both parties chat & may add cash top-up.

  5. 5

    Acceptance

    Trade locked, listings move to 'pending'.

  6. 6

    Fulfillment

    In-person meet at venue or shipping confirmation.

  7. 7

    Review

    Mutual rating; platform updates trust score.

Rules engine

Fair value

Trade values must be within +/-25% or include a cash delta.

Member tier

Free: 3 active listings; Pro: 25; Elite: unlimited + featured slots.

Trust score

Computed from rating, response time and dispute rate.

Geo radius

Default 25 mi from San Diego county; configurable per user.

Moderation

Auto-flags listings with prohibited categories.

Featured slot

Max 8 featured listings homepage; rotated every 6 hours.

AI Bot pipeline

1. Intent - classify question type.

2. RAG - retrieve from knowledge base.

3. Answer - stream response w/ citations.

4. Handoff - escalate to agent if confidence < 0.6.

Data model

users → listings (1:n)

listings → trades (n:n via TradeOffer)

trades → reviews (1:2)

users → memberships (1:1)

events → rsvps (n:n)

Trust & safety

Identity verification via SMS.

In-app meet-up at Bayfront Venue.

Dispute resolution within 48 hours.

Refund window for failed pickups.