Estimating system sync
Creates bids in The EDGE Estimator from HubSpot deals and brings scenario pricing and estimating milestones back every 15 minutes.
Data paths and guards
- HubSpot: Deals, the deal card and the building record.
- Bid sync service: 17 routes and 18 modules in Node.js on Vercel: bid creation, the 15-minute sync and settings.
- EDGE Estimator: Where estimators build bids and their pricing scenarios.
- State store: Linked bids, sync logs and settings, in Supabase Postgres.
- From HubSpot to Bid sync service: Create Bid, from the card. The deal, its contact and owner, and the building’s address. Create Bid, clicked on the deal card.
- From Bid sync service to EDGE Estimator: New bid. A bid built from the deal, held to the vendor’s field limits. A Create Bid request that passes its checks.
- From EDGE Estimator to Bid sync service: Pricing and milestones. Scenario pricing and estimating milestones for every linked bid. A cron every 15 minutes.
- From Bid sync service to HubSpot: Deal fields and stages. Pricing written to the deal, and stage moves that only go forward. Each sync run.
- From Bid sync service to State store: Links and sync logs. Each deal-to-bid link, and a log row for every sync. Every create and every sync.
- On Create Bid, from the card: Signed requests only. Routes accept only requests that HubSpot signed, and settings need an admin.
- On New bid: Licensed estimators only. A bid names an estimator only after checking that the person is a licensed user of the estimating system.
- On Links and sync logs: Record the bid first. A new bid is recorded before anything else, because a bid in the estimating system cannot be deleted.
- On Pricing and milestones: Failing links paused. A link that keeps failing with a known error is paused and shown on the deal card with a way to reconnect.
- Built by me
- Platforms I connect to
- Guards
- In production
| Create Bid, from the card The deal, its contact and owner, and the building’s address |
|---|
| New bid A bid built from the deal, held to the vendor’s field limits |
| Pricing and milestones Scenario pricing and estimating milestones for every linked bid |
| Deal fields and stages Pricing written to the deal, and stage moves that only go forward |
| Links and sync logs Each deal-to-bid link, and a log row for every sync |
-
Systems
Sales works in HubSpot and estimators work in The EDGE Estimator. Between them runs a Node.js service on Vercel functions, with linked bids and sync logs kept in Supabase Postgres.
-
Data paths
Create Bid on the deal card sends the deal, its contact, owner and building address, and the service creates the bid. Every 15 minutes it reads scenario pricing and estimating milestones back onto the deal and logs each run.
- a Create Bid, from the card
- b New bid
- c Pricing and milestones
- d Deal fields and stages
- e Links and sync logs
-
Guards
Only signed HubSpot requests get in. A bid names only a licensed estimator. A new bid is recorded before anything else, because it cannot be deleted, and a link that keeps failing is paused on the card.
- Signed requests only on a
- Licensed estimators only on b
- Record the bid first on e
- Failing links paused on c
-
Result
In production 2 days after the first commit. 20 bids are linked to their deals, and one scheduled run covered 18 bids with 0 errors.
What I built
- 17 routes and 18 library modules on Vercel: a deal card that creates the bid, a settings page and a sync every 15 minutes.
- Bids built from the deal, its contact and owner, with the job address read from the building record.
- A payload builder that learns field limits the vendor never documented, from the vendor’s own error text.
- Signed HubSpot requests and admin authorization, covered by 253 test call sites in 15 test files.
- A Supabase state store for linked bids, sync logs and settings, built over 6 migrations.
What the guards protect against
| The risk | The guard |
|---|---|
| An unsigned request creates a bid or changes the settings. | Signed requests only Routes accept only requests that HubSpot signed, and settings need an admin. |
| A bid fails because the named estimator is not a licensed user. | Licensed estimators only A bid names an estimator only after checking that the person is a licensed user of the estimating system. |
| A bid that cannot be deleted is left with nothing tracking it. | Record the bid first A new bid is recorded before anything else, because a bid in the estimating system cannot be deleted. |
| A broken link fails quietly on every run. | Failing links paused A link that keeps failing with a known error is paused and shown on the deal card with a way to reconnect. |
Results
- In production 2 days after the first commit.
- 20 linked bids in use; one scheduled run covered 18 bids with 0 errors.
Facts
- A sync writes HubSpot before it advances the link, so an interrupted run repeats instead of skipping a deal
- The estimating system’s times carry no zone; the service converts each to the epoch time HubSpot expects
- HubSpot signatures are checked against the raw request bytes, so multi-byte text verifies too
Related builds
-
QuickBooks job costing
Date: Aug 2026
Fact: On day one of a 3-day hackathon, an invoice posted through the approval gate
Client: For contractors on HubSpot (a hackathon build)
Systems: QuickBooks Online, Stripe and Claude
Status: Active
-
Per-trade deal budgets
Date: Feb 2026
Fact: Revenue, material and labor budgets across 11 trades
Client: For a residential roofing and exteriors contractor
Systems: SumoQuote and Zuper
Status: In production
-
Desktop accounting connector
Date: Jun 2026
Fact: Sales recognition reconciled to the cent across 3,709 deals
Client: For a residential roofing and solar contractor
Systems: QuickBooks Desktop
Status: In production