A manufacturer had years of customer history split between HubSpot and a set of shared team mailboxes. Reps answered emails with no idea what the company beside them had already promised, and nobody could say which accounts had gone quiet.

The Problem
A manufacturer had years of customer history split between HubSpot and a set of shared team mailboxes. Reps answered emails with no idea what the company beside them had already promised, and nobody could say which accounts had gone quiet.
The Approach
We built them a custom CRM that ingests its own email. Microsoft Graph sync pulls monitored mailboxes into threaded conversations linked to companies and contacts, and engagement metrics surface last-reply times and unreplied counts per account. Matching emails to the right company is the hard part, so we used embeddings with vector similarity search plus an AI matching pass instead of brittle domain rules. A later phase rebuilt the UI as a React app driven by JSON schemas, hardened by contract tests that caught real production bugs.
Deep Dive
## What we built A CRM with companies, contacts, and orders at the core and email as a first-class citizen: synced conversations, engagement scoring, and AI-assisted matching of messages to accounts. The v18 generation moved to JSON-schema-driven data models and a React shell, with a documented test pyramid and CI coverage gates. ## Tech FastAPI and PostgreSQL with pgvector for similarity search, Microsoft Graph for mailbox ingestion, embedding plus LLM matching pipeline, Next.js and React frontend, Docker with cloud deploys, Playwright and contract tests in CI. ## Results Email history from monitored mailboxes threaded onto accounts automatically, unreplied-account visibility for the sales team, 70+ screens ported to React, and a contract-test layer that surfaced real production defects during the rebuild. ## What is next Forecasting runs as its own service and the schema-driven approach keeps new record types cheap to add.
The Outcome
Keep Exploring
Team mailbox sync via Microsoft Graph into threaded account conversations
AI entity matching backed by vector similarity search
engagement metrics including unreplied counts per account
70+ pages ported to a schema-driven React UI
contract-test suite that caught production bugs before users did
153 commits across two repos over 5 months