← back to Sublease Agentabrams
README.md
50 lines
# sublease.agentabrams.com — Commercial Sublease Marketplace
A gated (admin + `Boomer`) marketplace for commercial subleases & flexible space,
backed by **CRUnifiedDB** — a unified CRE Postgres database populated by one
automated **crawler agent per sponsor firm** (the `dw_unified` + per-vendor-scraper
pattern, applied to commercial real estate).
## Run locally
```bash
npm install
npm run seed # create/refresh schema + seed the 9 sponsors (DB: crunified @ /tmp)
PORT=9714 npm start # http://localhost:9714 (admin:DW2024! · Boomer:Sublease2024!)
```
## CRUnifiedDB
Postgres `crunified` (local `/tmp` socket). Tables: `sponsors`, `listings`,
`agents`, `crawl_runs`. Schema in `scripts/schema.sql`, seed in `scripts/seed-sponsors.sql`.
## The 9 sponsors
**Brokers (crawlable inventory):** LoopNet, CoStar, CBRE, NAI Capital, Premier Workspaces
**Financing partners (no listings):** Fidelity Mortgage Lenders, Provident Bank, Mizrahi Tefahot (UMTB), Walker Realty Capital
## Per-firm crawler agents
Each firm has its own module in `crawl/firms/<slug>.js` exporting `crawl(ctx)`.
Run one, or all low/medium-ToS brokers:
```bash
node crawl/run.js premierworkspaces # ✓ live: real geocoded listings
node crawl/run.js all # every crawl-enabled, non-high-ToS broker
node crawl/run.js loopnet --force # high-ToS firms refuse without --force
node scripts/geocode-backfill.js # fill missing lat/lng (free OSM Nominatim)
```
### Agent status (calibration state)
| Firm | ToS | State |
|------|-----|-------|
| Premier Workspaces | low | ✅ live — WordPress location pages, Census/OSM geocode |
| NAI Capital | low | ⚙ scaffolded — search is Buildout/Catylist (JS-injected); needs embed URL |
| CBRE | medium | ⚙ scaffolded — public search returns 403; needs headless session or official feed |
| LoopNet | **high** | ⛔ ToS-gated — directory sponsor only; partner API/feed is the compliant path |
| CoStar | **high** | ⛔ ToS-gated — licensed/paywalled; official data license only, never scraped |
**Compliance:** crawlers are public-pages-only, robots-aware, rate-limited, and $0
(free Census/OSM geocoding). CoStar & LoopNet are never scraped at volume — they
are litigious about their data; they are treated as directory/data sponsors pending
an official partnership/feed.
## Deploy (Steve-gated)
Kamatera vhost must `listen 45.61.58.125:443` (agentabrams IP-bound pattern).
See `.deploy.conf`. Deploy + DNS are not run autonomously.