Case study
HeySales
HeySales keeps contacts, companies and deals on a visual sales pipeline, with tasks, quotes and a calendar alongside, and shows which companies have been visiting your website.
What it does
- Connects to Gmail and Google Calendar
- Website visit tracking that stays cookie-free until a visitor agrees
- Lead forms to embed on any site, feeding new leads into the pipeline
- An AI assistant on the Pro plan that can look up and update contacts and deals, and add tasks and notes
How it fits together
-
People
- Sales teams
- Visitors to customers' websites
-
App
- React app built with vinext, on Cloudflare Workers
- Visit tracker and embeddable lead forms
-
API
- tRPC
- Better Auth sign-in
- Drizzle
-
Data and services
- D1 database
- Gmail and Google Calendar
- OpenAI for the assistant and voice
- Cloudflare email sending
How it's built
- A React app on Cloudflare Workers, built with vinext, a Next.js-style framework on Vite.
- A tRPC API over Drizzle and a Cloudflare D1 database, with sign-in through Better Auth.
- Gmail, Google Calendar and Google Contacts are reached through Google's REST APIs with plain fetch calls, because Google's own Node client doesn't work on Workers.
- Without consent, visit tracking stores no IP address: visits are counted with a hash that changes every day.
- Notifications, password resets and invitations go out through Cloudflare's email sending.
Articles about HeySales
-
How HeySales counts visits from people who haven't accepted cookies
How the HeySales tracker counts visits with nothing stored on the device until a visitor agrees, recognises them for a day by hash, and flags bots.
-
Sending transactional email from Cloudflare Workers
How HeySales and HelloRestaurant send password resets, invitations and booking reminders with Cloudflare Email Sending and a send_email binding.
-
What changed when we moved two apps from Postgres to Cloudflare D1
The D1 and SQLite rules that broke our Postgres code when HeySales and HelloRestaurant moved to Cloudflare Workers, and how we handled each one.
-
Why we replaced googleapis with plain fetch on Cloudflare Workers
Google's Node client left gzipped replies undecoded in our Workers build, so HeySales now calls Google's REST APIs directly with fetch.
Tell us what you're building.
Email us about your project: what it needs to do, who it's for and when you'd like it live.