LOOM CRM: Multi-tenant CRM with Microsoft 365 Sync
Case Study: Wilson & Cole Developments / LOOM

LOOM CRM: Multi-tenant CRM with Microsoft 365 Sync

High-Level Impact

Rebuilt from scratch in about three months: a multi-tenant CRM with 76 pages, 91 API routes and 135 automated test files, live for the client and forked as LOOM's own pipeline, where a won deal automatically opens a delivery project.

Project Metadata

  • CategorySaaS Platform / Cloud
  • ClientWilson & Cole Developments / LOOM
  • My roleFounder & Lead Engineer
  • PeriodAug – Nov 2026
  • Livecrm.loombranddesigns.com

Key Facts

Pages / API routes
76 / 91
Automated test files
135
Integrations
Microsoft 365, Gemini, Xero, MCP
Deployments
Client workspace + LOOM agency fork

Core Components

Next.js 16 (App Router) + TypeScript
Firebase App Hosting + named Firestore database
Microsoft Graph (mail, calendar)
Cloud Scheduler jobs
Gemini 2.5 / 3 Flash
AES-256-GCM token encryption
Signed webhooks + MCP endpoint
Vitest (135 test files)
LOOM CRM overview · recorded on a fictional demo company, no client data

The Challenge

The client's sales team lived in Outlook. A CRM that needed manual logging would not be used, so mail and calendar sync had to be reliable per user, replies had to find the right record, and follow-ups had to stop when a customer answered.

Business Objectives

One record model for contacts, companies, deals and jobs, with fields and pipelines per workspace
Per-user Microsoft 365 mailbox and calendar sync through Microsoft Graph
Sequences that stop on reply, and automations with branching and waits
Hosted forms with spam scoring and duplicate detection
AI help that drafts, summarises and suggests the next step
Agency fork with website lead capture and a deal-to-project handover

Solution Design

"Give a UK construction developer a CRM that fits how they actually sell (enquiries, site visits, quotes, jobs), with every email and meeting landing on the right record, and then reuse the same codebase as LOOM's own agency CRM."

1. Each user connects their own Microsoft 365 account; tokens are encrypted at rest. 2. Inbound sync threads replies onto contacts, deals and jobs; tracked sends record opens and replies. 3. Sequences and automations run on scheduled jobs and stop when a reply arrives. 4. Website and hosted forms post leads server-side, with spam scoring and duplicate checks. 5. Gemini drafts emails, summarises records and proposes next steps; an MCP endpoint lets AI agents work the CRM with the user's permissions. 6. In the agency fork, moving a deal to 'won' opens a project with its own delivery pipeline.

Security & Scale

Multi-tenant from the first commit: every workspace has its own fields, pipelines and roles (owner, admin, member, viewer). The browser never talks to Firestore directly; all access goes through server routes behind an HttpOnly session cookie, with an audit log on changes.

Results

Live for the client and for LOOM. About 365 commits by me between August and November 2026, on a codebase of roughly 136,000 lines of TypeScript with 135 test files.

Project FAQs