Skip to main content
Home / Portfolio / AI-Integrated CRM
Business Automation

AI-Integrated CRM

Personal CRM with AI-assisted workflows

Built by Rogue AI · AI-augmented personal CRM · Self-hosted, not publicly accessible

Started January 2026 as a Notion-replacement weekend project. RBAC + multi-table schema landed in Q1; the AI-drafter rewrite came after I gave up on Claude defaults sounding like me. Sixty-plus commits across schema, RBAC, drafting, and outbound deliverability.

AI-Integrated CRM — Personal CRM with AI-assisted workflows

The problem

Salesforce is overkill for a solo consultant. Notion loses structure as the pipeline grows. HubSpot's free tier is a marketing trap. None of them link events attended to prospects met to deals closed in a single graph, and none have AI that actually drafts outbound in the owner's voice.

What I built

A full-stack personal CRM with AI-assisted lead enrichment, automatic email drafting, event-linked prospecting, role-based access control, and pipeline analytics. Runs entirely on self-hosted infrastructure — no third-party CRM dependency.

Architecture

Frontend
Next.js App Router, Server Components, Tailwind 4, TypeScript
Database
PostgreSQL 16 with 58+ tables covering prospects, companies, events, deals, changes, firewalls, API keys, RBAC, audit log
ORM
Prisma 7 with PrismaPg adapter
Auth
NextAuth v5 with role-based guards, API key issuance, separation-of-duties enforcement
Queue
Redis 7 with per-queue workers for enrichment and email drafting
AI workers
Ollama for local inference, Claude API for high-quality drafting; prompt templates versioned alongside code
Outbound
SMTP via dedicated transactional provider, with threading, bounce tracking, reply detection
Infra
Docker Compose, Caddy reverse proxy, isolated network, non-root containers, read-only filesystem, CSP-hardened

Tech stack

Next.js 16React 19Prisma 7PostgreSQL 16Redis 7NextAuth v5OllamaClaude API

What broke first

  • Schema bloat is a slow leak. Started with five tables, now at 58. The RBAC retrofit was the most expensive single refactor — should have planned for it on day one.

  • Default Claude voice writes like a HubSpot template. Had to build a 600-token voice-fingerprint prompt with a banned-phrase list (no 'leverage', no 'unlock', no 'reach out') before drafts started sounding like me.

  • Email deliverability is its own discipline. SPF/DKIM was the easy part — list washing and bounce-handling logic added a week of tuning I hadn't budgeted.

Outcome

One operator running full pipeline management — prospecting, enrichment, outreach, contract tracking, invoicing — on a single self-hosted stack. Query latency under 100 ms for pipeline views across thousands of records.

Honest limits

Single-tenant by design — multi-tenanting would mean a row-level-security retrofit I haven't priced. No mobile app; SMS bridge is on the roadmap, not built. Reply-thread detection misses ~5% of cases, mostly long quoted-history threads where the new content sits at the bottom.

Related reading

← Back to portfolio