My Role
Full-Stack Architect (Backend, Frontend & AI Copilot)
Constraint
Problem
Sales teams lose context across fragmented deal notes and emails, while naive AI CRM assistants risk hallucinating pipeline metrics or sending unapproved customer emails.
Approach
Solution
Engineered a full-stack multi-tenant CRM pairing a Kanban deal pipeline and analytics dashboard in Next.js 16 with a NestJS backend featuring strict tenant scoping, 5-role RBAC, JWT refresh replay detection, and a grounded AI copilot that drafts communications strictly into DRAFT state for human approval.
Tech Stack
Description
VeloceCRM is a production-grade multi-tenant CRM built across backend, frontend, and AI workflow orchestration.
Every AI copilot run links claims back to persisted CRM activity IDs and holds outbound emails in an auditable DRAFT state until a human approves.
- NestJS 11 + Prisma 7 backend with 5-role RBAC (OWNER, ADMIN, MANAGER, REP, VIEWER) and JWT replay detection.
- Next.js 16 + React 19 + @dnd-kit/core interactive Kanban deal pipeline and Recharts forecasting.
- Citation-grounded Gemini copilot with template versioning and deterministic offline fallback.
- Pluggable Stripe billing and Resend outbound email integration adapters.
Responsibilities
- Architected NestJS 11 API modules, Prisma schema, and multi-tenant data isolation.
- Built the interactive Next.js 16 + React 19 + Tailwind CSS v4 pipeline board and revenue analytics UI.
- Designed versioned AI prompt workflows enforcing evidenceActivityIds citations and deterministic fallback drafts.
- Implemented 7/7 NestJS Jest integration tests and full Playwright end-to-end verification.
System Design
Architecture Notes
Monorepo split into a NestJS 11 REST API (Prisma 7 + PostgreSQL/PGlite) and a Next.js 16 App Router client. Security layer uses HttpOnly cookies with JWT refresh token family reuse revocation, plus pluggable Stripe and Resend sandbox adapters.
Engineering Tradeoffs
Challenges
- Preventing ungrounded claims in AI deal summaries and outreach drafts.
- Ensuring stale-while-safe concurrency and atomic stage transitions on drag-and-drop Kanban updates.
Delivery Impact
Verified Outcomes
- 7/7 backend Jest test suites and full Playwright E2E journey verified passing.
- Delivered zero-auto-send safety guardrails with traceable activity citations on every AI insight.
Split-Pane Inspector
Compare or peek another case study
Open a sliding side pane to compare architecture and outcomes alongside VeloceCRM: AI-Native Multi-Tenant CRM.