CRM
A fast CRM for Brand Ambassadors that mirrors HubSpot instead of replacing it.
A lightweight CRM I built for the Brand Ambassadors at The Branding Club: companies, contacts and deals in one quick interface with instant search, saved views and bulk edits. HubSpot stays the source of truth; every edit goes there first and a local mirror keeps lists and search fast.
The problem
HubSpot held every company, contact and deal, but for daily work it was slow and noisy: lists took seconds to load, search across objects was clumsy, and moving one Brand Ambassador's accounts to a colleague meant clicking through hundreds of records. Replacing HubSpot was not an option, because marketing flows and integrations depend on it.
The approach
I built a shadow CRM on Cloudflare Workers. A cron-driven sync engine pulls companies, contacts, deals, associations, pipelines and owners into Cloudflare D1, with a watermark, a resumable cursor, a lock and backoff per object type. Writes go to HubSpot first and the mirror row is rebuilt from HubSpot's own response, so there is never a second truth. On top sits a framework-free front-end (ES modules, History API routing) with list state in the URL, saved views per user, bulk updates, duplicate checks when creating records, an activity timeline per record and a batched ownership transfer. Later I moved the mirror from Postgres to D1 behind one data interface, covered by node:test suites with fakes for HubSpot and the database.
Highlights
- checkHubSpot stays leading: write there first, then rebuild the mirror row from its answer
- checkIncremental sync with watermarks, resumable cursors, locks and backoff
- checkSaved views per user, with filters and sorting kept in the URL
- checkOwnership transfer that moves companies, contacts and open deals in batches
- checkDuplicate checks while creating companies, contacts and deals
- checkMirror moved from Postgres to Cloudflare D1 behind a single data layer