Product Architecture

How CompRapid finds the strongest comps in seconds

A look under the hood: the data pipeline, comparable selection engine, and rules layer that power instant branded reports.

Core flow
Search
Address, city, ZIP
Match
Indexed Postgres
Score
Comp engine
Rank
Top 3 selected
Report
Branded PDF
Comparable scoring rules
score = 100
  - abs(subject.sqft - comp.sqft) / 50
  - abs(subject.beds - comp.beds) * 8
  - abs(subject.baths - comp.baths) * 6
  - distance(subject, comp) * 4     // miles
  - max(0, age_gap - 10) * 0.5      // years
  + bonus.sameSchoolDistrict (+5)
  + bonus.soldLast90Days  (+3)

require: sameCity AND sameType
clamp: [60, 98]
select top 3
Data layers
MLS feeds
Hourly sync, 187 sources
County records
Daily refresh, 3,100 counties
Tax assessor
Weekly refresh
School ratings
GreatSchools API
Geocoding
Mapbox tiles & geocoder
System diagram
┌────────────┐    ┌──────────────┐    ┌─────────────────┐
│  Web App   │───▶│  API Gateway │───▶│ Auth (JWT/OAuth)│
└────────────┘    └──────┬───────┘    └─────────────────┘
                         │
       ┌─────────────────┼──────────────────┐
       ▼                 ▼                  ▼
┌───────────┐    ┌──────────────┐    ┌────────────┐
│  Search   │    │ Comp Engine  │    │  Billing   │
│  (Meili)  │    │  (Node/Rust) │    │  (Stripe)  │
└─────┬─────┘    └──────┬───────┘    └─────┬──────┘
      │                 │                  │
      └────────┬────────┘                  │
               ▼                           ▼
        ┌──────────────┐           ┌──────────────┐
        │  PostgreSQL  │           │  Webhooks    │
        │  (Supabase)  │           │  (Queue)     │
        └──────┬───────┘           └──────────────┘
               │
               ▼
        ┌──────────────┐
        │ PDF Renderer │
        │  (Puppeteer) │
        └──────────────┘

Inside the comp engine

Candidate retrieval

Within-city + type narrows to ~200 candidates in <40ms using a covering index.

Feature scoring

Each candidate scored on 9 dimensions: size, beds, baths, age, lot, school, recency, distance, price/ft².

Adjustment & ranking

Top candidates adjusted for time-on-market drift and ranked. Top 3 selected with confidence band.

Security & compliance
SOC 2 Type II
Annual audit
GDPR + CCPA
Data export & delete
Row-level security
Per-tenant isolation
Encryption
AES-256 at rest, TLS 1.3
Sign in to explore →