Online Demo
You can try it here demo.nextcrm.io, login via Google account or create new user and password.
What's New
๐ CRM Activities โ Full Activity Tracking (NEW)
All 5 CRM entity detail pages (Accounts, Contacts, Leads, Opportunities, Contracts) now have an Activities tab with a live paginated feed of interactions:
- Activity types โ Notes, Calls, Emails, Meetings, Tasks
- Create / edit / delete โ inline Sheet form on every CRM entity detail page
- Paginated feed โ compound cursor pagination with
createdAt + idfor stable ordering - Linked records โ activities attach to multiple entities via
crm_ActivityLinks(e.g. a call can reference both a Contact and an Opportunity) - Real-time revalidation โ server actions revalidate the correct path after every mutation
๐ต๏ธ Audit Log & History โ Full Change Trail (NEW)
Every CRM entity (Accounts, Contacts, Leads, Opportunities, Contracts) now tracks its full change history:
- History tab โ per-entity timeline of all field changes, shown on every detail page with
AuditTimeline+AuditEntrycomponents - Soft delete โ records are never hard-deleted;
deletedAtcolumn preserves data while hiding it from normal queries - Admin audit log โ
/admin/audit-logshows a global filterable table of every change across all entities, with restore support for soft-deleted records - Diff engine โ
diffObjectsutility computes before/after diffs and stores structured JSON in the audit record
๐ง AI Enrichment โ E2B Sandboxed Agent + Flexible API Key Management (NEW)
Target and Contact enrichment now runs inside an E2B cloud sandbox โ a full Linux environment with a real browser (Chrome) โ replacing the previous Firecrawl API path:
- Real-browser research โ the agent navigates JS-heavy sites, LinkedIn public profiles, and paginated results that a simple API call cannot reach
- LLM tool-use loop โ Claude Sonnet 4.6 drives the research with tools:
browser_open,browser_snapshot,browser_click,browser_extract,web_search - C-level contact discovery โ given only a company name, the agent finds all discoverable C-level contacts and creates
crm_Target_Contactrecords automatically - Context-aware strategy โ agent skips research it doesn't need (e.g. already has a website โ skips domain discovery)
- Confidence scoring โ fields below 0.6 confidence are discarded; only empty target fields are overwritten
- 5-minute timeout per target โ partial results are applied even if the agent times out
- Fan-out โ after company enrichment, each discovered contact is enriched independently via a separate Inngest job
API keys are managed through a 3-tier priority system so the app runs without any keys in .env:
ENV variable โ Admin system-wide โ User profile
(highest) (lowest)
- Admin panel (
/admin/llm-keys) โ set system-wide keys for OpenAI, Firecrawl, Anthropic, and Groq. Keys are encrypted at rest (AES-256-GCM). - Profile settings (
/profile?tab=llms) โ users configure their own keys as a fallback. - Graceful degradation โ enrichment buttons show an informative dialog when no key is available at any tier.
Migration note: The old
openAi_keystable is replaced by the newApiKeystable. Runpnpm prisma migrate deployto apply the migration.
๐ค MCP Server โ AI Agent Access to CRM Data (NEW)
NextCRM now ships with a built-in Model Context Protocol server, letting AI agents (Claude, Cursor, custom agents) read and write CRM data directly.
25 tools across 5 CRM modules โ Accounts, Contacts, Leads, Opportunities, Targets:
list_*โ paginated list scoped to the authenticated userget_*โ single record by IDsearch_*โ full-text substring searchcreate_*โ create new recordsupdate_*โ partial update by ID
Authentication: Generate Bearer tokens (nxtc__...) from your profile page. Tokens are SHA-256 hashed โ the raw value is shown only once and never stored.
Connect your MCP client:
{
"mcpServers": {
"nextcrm": {
"url": "https://your-nextcrm.com/api/mcp/sse",
"headers": { "Authorization": "Bearer nxtc__your_token_here" }
}
}
}
Both SSE (/api/mcp/sse) and HTTP (/api/mcp/http) transports are supported.
๐ Vector Search + Semantic Similarity (NEW)
CRM records (Accounts, Contacts, Leads, Opportunities) are automatically embedded using OpenAI text-embedding-3-small via Inngest background jobs.
- Unified search โ combines keyword (full-text) + semantic (pgvector cosine similarity) results in a single grouped UI
- Find Similar โ every CRM detail page has a "Find Similar" button that surfaces semantically related records across the same module
- Backfill โ Inngest function to embed all existing records on demand
- Auto-embed โ new and updated records are embedded automatically
Powered by pgvector (PostgreSQL extension) with HNSW indexes for fast approximate nearest-neighbor search.
๐ฏ CRM Targets (NEW)
New Targets module for managing sales targets and target lists โ full CRUD, detail view, list management, and MCP tools included.
๐ Unified Search (NEW)
Global search across all CRM entities from a single search bar โ grouped results by entity type, loading skeleton, collapsible sections, and combined keyword + semantic scoring.
Tech Stack + Features
Frameworks
- Next.js 16 โ React framework for building performant apps with the best developer experience (App Router)
- next-auth 4.x โ Handle user authentication with ease with providers like Google, GitHub, and Credentials
- Prisma 7.5 โ TypeScript-first ORM for PostgreSQL
- React Email 2.x โ Versatile email framework for efficient and flexible email development
Platforms
- PostgreSQL 17+ โ Powerful open-source relational database with pgvector extension for AI embeddings
- Resend โ A powerful email framework for streamlined email development together with react.email
- UploadThing + S3-compatible storage (DigitalOcean Spaces) โ for document file storage
- Inngest โ Background job queue for async embedding and AI workflows
AI & MCP
- OpenAI API โ
text-embedding-3-smallfor vector embeddings; GPT for project management assistant - Anthropic API โ Claude Sonnet 4.6 drives the E2B enrichment agent tool-use loop
- Vercel AI SDK 6.x โ Unified AI interface
- pgvector โ PostgreSQL vector extension for similarity search (HNSW indexes)
- E2B โ Cloud sandboxes with real Chrome browser for AI-driven web research and contact enrichment
- MCP Server โ 25 CRM tools via
@vercel/mcp-adapter, Bearer token auth, SSE + HTTP transports
Data fetching
- SWR โ React Hooks library for remote data fetching
- Axios โ Promise based HTTP client for the browser and node.js
- Server Actions โ for server side data fetching and mutations
- TanStack React Table โ for data tables and server/client side data fetching
UI
- Tailwind CSS v4 โ Utility-first CSS framework for rapid UI development
- shadcn/ui โ Re-usable components built using Radix UI and Tailwind CSS
- Tremor โ A platform for creating charts
- Lucide React โ Beautiful and consistent open-source icons
i18n
- next-intl โ Internationalization for Next.js โ English, Czech, German, Ukrainian

Roadmap
- โ Docker version โ complete bundle to run NextCRM on-premise
- โ Upgrade to Next.js 16 โ running on Next.js 16 with React 19
- โ i18n / localization โ 4 languages (English, Czech, German, Ukrainian)
- โ Email client โ IMAP/SMTP email client built in
- โ PostgreSQL migration โ migrated from MongoDB to PostgreSQL 17+
- โ pgvector embeddings โ automatic semantic embeddings via Inngest + OpenAI
- โ Vector similarity search โ "Find Similar" on all CRM entity detail pages
- โ Unified search โ keyword + semantic search across all CRM modules
- โ CRM Targets module โ sales target and target list management
- โ MCP server โ 25 CRM tools for AI agent access via Bearer token auth
- โ AI enrichment โ E2B sandboxed agent (real browser + Claude Sonnet) for target/contact enrichment; C-level contact discovery; 3-tier API key management (ENV โ admin โ user)
- โ Audit log & history โ soft delete + full field-level change trail on all CRM entities; global admin audit log page
- โ CRM Activities โ notes, calls, emails, meetings, tasks linked to any CRM entity; paginated feed on all detail pages
- ๐ More AI powered features โ daily summary of tasks and projects
- ๐ Email campaigns management โ integration with MailChimp and Listmonk
- ๐ Testing expansion โ Jest + Playwright coverage (contributions welcome!)
- ๐ Fix all TypeScript
anytypes โ ongoing cleanup
Emails
We use resend.com + react.email as primary email sender and email templates.
Reports
We use Tremor charts as a tool for creating charts in NextCRM

Video (YouTube channel with functions showcase)
Youtube Channel </br> Invoice module (video)
Documentation
Available soon at: http://docs.nextcrm.io
Installation
<details><summary><b>Show instructions</b></summary>-
Clone the repository:
git clone https://github.com/pdovhomilja/nextcrm-app.git cd nextcrm-app -
Install the preset:
pnpm install -
Copy the environment variables to .env
cp .env.example .envcp .env.local.example .env.local.env
- You will need a PostgreSQL connection string for Prisma ORM
- Example:
DATABASE_URL="postgresql://user:pass@localhost:5432/nextcrm?schema=public" - Requires PostgreSQL 17+ with the pgvector extension enabled
.env.local
- NextAUTH - for auth
- uploadthings - for storing files
- openAI - for embeddings and project management assistant (optional โ can be set via admin panel instead)
- Firecrawl - for contact/target enrichment (optional โ can be set via admin panel instead)
- SMTP and IMAP for emails
- Inngest - for background embedding jobs
EMAIL_ENCRYPTION_KEY- required for encrypting API keys stored in the database
-
Init Prisma
pnpm prisma generate pnpm prisma migrate deploy -
Import initial data from initial-data folder
pnpm prisma db seed -
Run app on local
pnpm run dev
Docker installation
<details> <summary><b>Show instructions</b></summary>-
Make sure you have docker and docker-compose installed
-
Prepare .env and .env.local files
.env (for Prisma URI string) and .env.local (all others ENVs) file inside docker folder -
build docker image
docker build -t nextcrm . -
Run docker container
docker run -p 3000:3000 nextcrm
Contact
www.dovhomilja.cz </br> <img alt="X (formerly Twitter) URL" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Ftwitter.com%2Fdovhomilja">
Contributing
We are open to the NextCRM community contributions. Every contribution is welcome.
Issues
- Open an issue if you find a bug or have a suggestion for improvements.
NextCRM Super heroes
<a href="https://github.com/pdovhomilja/nextcrm-app/graphs/contributors"> <img src="https://contrib.rocks/image?repo=pdovhomilja/nextcrm-app" /> </a>Made with contrib.rocks.
Repo Activity
Star History
License
Licensed under the MIT license.