Overview

Harmonia CRM — The Complete Business Platform

A full-featured CRM that combines the best of GoHighLevel and HubSpot into a single, multi-tenant platform. 26 integrated modules covering every aspect of customer lifecycle management.

26
Platform Modules
800+
Contacts (LI Solutions)
6
Build Agents
Multi
Tenant Architecture

What Harmonia Does

Harmonia is a unified platform that replaces the need for separate tools for CRM, email marketing, SMS, phone, calendars, funnels, payments, reputation management, and more. Every module shares the same database, authentication, and design language.

Live at: atlas-harmonia-crm.vercel.app

Built For

Primary client: LI Solutions (Legacy Insurance) with 800+ contacts imported from HubSpot.

Design philosophy: Multi-tenant from day one. Every table has org_id. White-label ready. Agency-grade.

Org ID: da13ce77-090c-485b-bfd8-932fd55f6b6d

Technology Stack

Next.js 15 Supabase Drizzle ORM shadcn/ui Tailwind CSS Vercel TypeScript
💡
Multi-agent build architecture: Harmonia was built using 6 specialist AI agents working in parallel — each responsible for a different workstream (CRM, Conversations, Calendars, Workflows, Payments, AI). This enabled rapid development of 26 modules.
Platform

26-Module Platform Map

Every module Harmonia offers, organized by category. Active modules are live. Pending modules are architected and queued for build.

Core CRM & Sales

👥
CRM / ContactsContact management, fields, tags
📈
PipelinesVisual deal tracking, stages
🎯
OpportunitiesDeal values, win probability
🔔
Tasks & ActivitiesFollow-ups, reminders

Communication

📧
EmailSend, receive, templates
💬
SMS / MMSText messaging, media
📞
Phone / VoIPCalls, recording, IVR
🗨
ConversationsUnified inbox, threads

Marketing & Growth

🚀
CampaignsMulti-channel sequences
🏳
FunnelsLanding pages, opt-ins
🌐
Website BuilderDrag-and-drop pages
ReputationReview management
📝
Blogging Pending

Automation & Intelligence

WorkflowsVisual automation builder
🤖
AI AssistantGPT-powered actions
📅
CalendarsBooking, scheduling

Revenue & Operations

💳
PaymentsInvoices, Stripe
👥
Affiliate Manager Pending
📄
Documents Pending

Platform & Admin

🔒
Auth / SSOSupabase Auth, RLS
🎨
White-LabelCustom branding
🔌
API / WebhooksREST endpoints
🛒
MarketplaceApp integrations
⚠️
3 modules pending: Affiliate Manager, Documents & Contracts, and Blogging are architected but not yet built. All others are active or in final testing.
Core CRM

CRM & Pipelines

Contact management, deal pipelines, and opportunity tracking. The foundation everything else builds on.

Contact Management

Contact Record Fields
IdentityFirst name, last name, email, phone, company, job title, avatarCore
Custom FieldsUnlimited custom fields per org. Text, number, date, dropdown, multi-select, URLFlexible
TagsColor-coded tags for segmentation. Auto-applied via workflows.Organize
Activity TimelineEvery interaction: emails, calls, meetings, notes, deals. Chronological history.Auto
Lead ScoringConfigurable scoring rules. Points for engagement, demographics, behavior.Smart
Lifecycle StageLead → MQL → SQL → Opportunity → Customer → EvangelistStage

Pipeline System

New LeadIncoming
QualifiedCriteria met
ProposalSent quote
NegotiationIn discussion
Won ✓Closed

Fully customizable stages, colors, and win probabilities per pipeline

Pipeline Features

  • Multiple pipelines per org (Sales, Onboarding, Renewals)
  • Drag-and-drop Kanban board view
  • Deal values with currency and probability
  • Stage automation — trigger workflows on stage change
  • Weighted pipeline — forecast revenue by win probability
  • Stale deal alerts — flag deals sitting too long in a stage

Data Patterns

Key architectural patterns used across the CRM:

  • mapRow<T>() — snake_case → camelCase for single records
  • mapRows<T>() — same transform for arrays
  • createAdminClient() from @/lib/supabase/admin
  • Every table has org_id for multi-tenancy
  • RLS policies enforce org-level isolation
  • Drizzle ORM for type-safe queries
HubSpot import complete: 800+ contacts from LI Solutions (Legacy Insurance) have been imported with full field mapping. Contact records include all HubSpot custom properties, deal history, and engagement data.
Communication

Conversations — Email, SMS & Phone

A unified inbox for all customer communication. Every channel flows into one conversation thread per contact, giving your team complete context.

Unified Inbox Architecture

EmailSMTP / IMAP
Unified InboxSingle conversation view
SMS / MMSTwilio
Phone / VoIPTwilio Voice

📧 Email

  • SMTP/IMAP integration
  • Custom sending domains
  • Email templates with variables
  • Open/click tracking
  • Signature management
  • Bulk email with throttling
  • Reply detection and threading

💬 SMS / MMS

  • Twilio integration
  • Two-way messaging
  • MMS (images, files)
  • SMS templates
  • Auto-reply keywords
  • Opt-out management
  • Delivery receipts

📞 Phone / VoIP

  • Twilio Voice integration
  • Click-to-call from CRM
  • Call recording
  • IVR menu builder
  • Voicemail transcription
  • Call logging to timeline
  • Power dialer mode

Conversation Features

Unified Inbox Capabilities
Thread MergingEmail, SMS, and phone interactions with the same contact merge into a single chronological thread
Assignee RoutingRound-robin, skills-based, or manual assignment. Each conversation has an owner.
Internal NotesTeam members can leave private notes on any conversation (not visible to contacts)
Canned ResponsesPre-built reply templates with variable substitution ({{first_name}}, {{company}}, etc.)
Status TrackingOpen → Pending → Resolved. SLA timers for response time monitoring.
AI SuggestionsAI Assistant suggests replies based on conversation context and contact history
💡
Every communication is logged. Whether your team sends an email, text, or makes a call — it appears on the contact's activity timeline. No more "Did anyone call this lead?"
Engagement

Calendars & Campaigns

Scheduling that books meetings while you sleep, and multi-channel campaigns that nurture leads automatically.

📅 Calendar System

  • Booking pages — Public scheduling links (like Calendly)
  • Availability rules — Business hours, buffer time, date overrides
  • Round-robin booking — Distribute meetings across team
  • Google Calendar sync — Two-way sync prevents double-booking
  • Confirmation + reminders — Auto email/SMS before meetings
  • Reschedule/cancel — Self-service links in confirmation emails
  • Custom intake forms — Collect info before the meeting
  • Timezone detection — Shows slots in booker's local time

🚀 Campaign System

  • Multi-channel sequences — Email + SMS + wait + condition
  • Visual builder — Drag-and-drop campaign steps
  • Enrollment triggers — Tag added, form submitted, stage changed
  • Goal-based exit — Remove from campaign when goal is met
  • A/B testing — Split test subject lines and content
  • Send time optimization — AI picks the best delivery window
  • Engagement tracking — Opens, clicks, replies per step
  • Compliance — CAN-SPAM, opt-out handling, suppression lists

Campaign Flow Example

TriggerTag = "New Lead"
Email 1Welcome
Wait 2 daysTimer
SMSCheck-in
Wait 3 daysTimer
Email 2Case study

Contact exits campaign if they reply, book a call, or unsubscribe

Calendar + Campaign synergy: When a lead books a meeting via your calendar link, they can automatically be enrolled in a pre-meeting nurture campaign (agenda email, reminder SMS, preparation materials).
Automation

Workflows & Automation

The automation engine that powers everything. Visual workflow builder with triggers, conditions, actions, and branching logic. If something should happen automatically, it goes here.

Workflow Components

Building Blocks
Triggers What starts the workflow: form submission, tag added/removed, deal stage changed, date-based, webhook received, contact created, email opened, link clicked Start
Conditions If/else branching: field value, tag present, email opened, time-based, contact property, deal value, custom field match Branch
Actions What to do: send email/SMS, add/remove tag, update field, create deal, assign owner, add to campaign, create task, webhook call, wait, notify team Execute
Wait Steps Delay execution: fixed duration (hours/days), until a specific date, until a condition is met Delay
Goals Exit conditions: when a contact achieves the workflow's goal, they're removed regardless of where they are in the sequence Exit

Common Automation Patterns

  1. Lead Scoring Automation Trigger: contact engages (email open, page visit, form submit). Action: increment lead score, notify sales rep when threshold met, move to pipeline stage.
  2. Onboarding Sequence Trigger: deal stage = "Won". Action: send welcome email, create onboarding tasks, assign CSM, start Day 1/7/14/30 check-in campaign.
  3. Stale Deal Alert Trigger: deal has been in same stage > 14 days. Action: send internal notification, create follow-up task, optionally send re-engagement email to contact.
  4. Review Request Trigger: 30 days after deal close. Condition: satisfaction score > 8. Action: send review request via email + SMS. Follow up in 3 days if no response.
  5. Re-engagement Trigger: no activity from contact in 90 days. Action: add "At Risk" tag, send win-back email series, notify account owner.
⚠️
Workflow execution is async. Workflows run in the background. Real-time actions (email sends, tag updates) happen within seconds, but wait steps and conditions are evaluated on a polling schedule. Complex workflows with many wait steps should be tested thoroughly.
Intelligence

AI Assistant

An embedded AI that understands your CRM data and helps with drafting, analysis, recommendations, and automation. Powered by GPT-4o with full context of your contacts, deals, and communication history.

What the AI Assistant Can Do

Draft EmailsContext-aware, tone-matched
🔎
Summarize ContactsFull history digest
📈
Pipeline InsightsDeal recommendations
💡
Next Best ActionWhat to do next
📄
Generate ReportsNatural language queries
📚
Content CreationBlog, SMS, landing pages

Context Sources

The AI Assistant has access to:

  • Contact records — All fields, tags, custom properties
  • Communication history — Emails, SMS, call transcripts
  • Deal data — Pipeline stage, value, activities
  • Engagement metrics — Email opens, clicks, responses
  • Team context — Who owns what, recent activity
  • Industry knowledge — Insurance domain expertise (LI Solutions)

Example Prompts

  • "Draft a follow-up email to John Smith about his renewal"
    → Uses contact history + deal context to write a personalized email
  • "Which deals are at risk of closing this month?"
    → Analyzes pipeline, activity recency, and engagement patterns
  • "Summarize all interactions with Acme Corp"
    → Pulls full thread history, meetings, and deal progression
  • "Create a re-engagement campaign for inactive leads"
    → Generates multi-step email sequence with personalization tokens
💡
Privacy first: The AI Assistant only accesses data within your organization's scope. Multi-tenant isolation ensures no data leaks between orgs. All API calls are logged for audit.
System Design

Architecture

Multi-tenant, scalable, and built on modern infrastructure. Here's how all 26 modules work together under the hood.

System Overview

Next.js 15Frontend + SSR
SupabaseAuth + DB + RLS
PostgreSQLMulti-tenant DB
Drizzle ORMType-safe queries
VercelEdge hosting
OpenAIGPT-4o AI
TwilioSMS + Voice
StripePayments

Multi-Tenant Data Model

-- Every table follows this pattern:
CREATE TABLE contacts (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  org_id UUID NOT NULL REFERENCES organizations(id),
  first_name TEXT,
  last_name TEXT,
  email TEXT,
  ...
  created_at TIMESTAMPTZ DEFAULT now()
);

-- Row Level Security enforces isolation:
CREATE POLICY "org_isolation" ON contacts
  USING (org_id = auth.jwt() ->> 'org_id');

Key Patterns

  • mapRow<T>() / mapRows<T>() — Transform snake_case DB columns to camelCase TypeScript
  • createAdminClient() — Bypasses RLS for server-side operations
  • org_id on every table — No data exists outside an org context
  • JWT auth via Supabase — Token includes org_id claim
  • Server Components — Data fetching at the server layer
  • shadcn/ui — Consistent component library throughout

Database Migrations

  • 34 migration files (0001 through 0034)
  • 0001-0030: Applied and live
  • 0031-0034: Written, pending application
  • Run via Supabase SQL editor in order
  • Each migration is idempotent
  • Includes indexes, RLS policies, and triggers
⚠️
Migrations 0031-0034 are pending. Apply in order before next feature work.

6-Agent Build Architecture

Specialist Build Agents
Agent 1: CRMContacts, pipelines, deals, tasks, activities, lead scoringCore
Agent 2: CommsEmail, SMS, phone, conversations, unified inbox, templatesComms
Agent 3: CalendarBooking pages, availability, Google Calendar sync, remindersSchedule
Agent 4: WorkflowsAutomation engine, triggers, conditions, actions, campaignsAuto
Agent 5: RevenuePayments, invoicing, Stripe, subscriptions, reputationRevenue
Agent 6: AIAI Assistant, GPT integration, suggestions, content generationAI

Each agent worked in parallel on their domain, sharing the same database schema and authentication layer. This enabled building 26 modules at 6x speed.

Architecture Strengths

  • True multi-tenancy from day one
  • Type-safe end-to-end (TypeScript + Drizzle)
  • Edge-deployed (Vercel) for global performance
  • Supabase RLS = security at the database layer
  • Modular: each feature is independently deployable
  • White-label ready: branding per org

Known Constraints

  • Supabase DB URL needed in .env.local (currently empty)
  • 4 pending migrations must be applied in order
  • 3 modules still pending build (Affiliate, Docs, Blogging)
  • Supabase MCP not linked (only AutoAgency project connected)
  • Rate limiting not yet implemented on all endpoints
🎉
Walkthrough complete. You now understand Harmonia's 26-module architecture, the multi-tenant data model, communication stack, automation engine, and AI capabilities. The platform is live at atlas-harmonia-crm.vercel.app.