🚀 Vibe Coding Kit

Build a Production-Ready HubSpot-Like CRM in 6 Weeks

1️⃣ Tech Stack Recommendation

A modern, scalable, and cost-effective stack for building enterprise-grade CRM software.

⚙️ Framework

Next.js 14 with App Router for production-ready fullstack development, excellent TypeScript support, and built-in optimizations.

🗄️ Database

PostgreSQL + Prisma for robust relational data, type-safe queries, and seamless migrations.

🔐 Authentication

Clerk for passwordless auth, social login, and managed user sessions without DIY complexity.

📧 Email

Resend for reliable transactional email with excellent deliverability and React email templates.

🎨 UI Framework

shadcn/ui + Tailwind CSS for beautiful, accessible components with complete customization.

🌐 Hosting

Vercel + Supabase for serverless frontend deployment and managed PostgreSQL backend.

2️⃣ Copy-Paste Prompt for Cursor/Claude

Paste this prompt directly into Cursor AI or Claude to get started building immediately.

You are building a HubSpot-like CRM application using Next.js 14, PostgreSQL, Prisma, Clerk, and shadcn/ui. Follow these specifications precisely: ## Core Requirements ### 1. Data Models (Prisma Schema) - **Contact**: firstName, lastName, email, phone, company (foreign key), createdAt, updatedAt - **Company**: name, website, industry, revenue, size, address, createdAt, updatedAt - **Deal**: title, value (decimal), stage (enum: Prospecting, Qualification, Proposal, Negotiation, Closed), company (FK), contact (FK), expectedCloseDate, createdAt, updatedAt - **Activity**: type (enum: Email, Call, Meeting, Note), description, contactId (FK), dealId (FK), relatedTo, createdAt, completedAt - **EmailLog**: subject, body, recipientEmail, status (enum: Sent, Bounced, Opened, Clicked), contactId (FK), sentAt, openedAt - **Meeting**: title, startTime, endTime, attendees (JSON), contactId (FK), dealId (FK), description, location, createdAt ### 2. Authentication & Authorization - Use Clerk for user authentication with role-based access control (Admin, Manager, User) - Implement user-level data isolation - Create middleware to protect all API routes and dashboard pages - Support team/organization management for multi-user teams ### 3. Core Features - **Contact Management**: Full CRUD with advanced search, filtering by company/stage, bulk actions - **Company Management**: Company profiles with associated contacts and deals - **Pipeline Management**: Kanban-style deal pipeline with drag-and-drop between stages - **Activity Tracking**: Log calls, emails, meetings, and notes against contacts/deals - **Email Integration**: Send emails via Resend, track opens/clicks, log delivery status - **Meeting Scheduler**: Calendar integration, send meeting invites, auto-add to activity log ### 4. Dashboard & Analytics - Sales metrics: Total deals, won vs lost, revenue forecast by stage - Activity summary: Recent activities, upcoming meetings, overdue tasks - Charts: Revenue by stage (bar), pipeline health (funnel), activity trends (line) - Use Recharts for all visualizations ### 5. Tech Stack Details - Framework: Next.js 14 with App Router - Database: PostgreSQL (Supabase) - ORM: Prisma with migrations - Authentication: Clerk - Email: Resend SDK - UI: shadcn/ui (Button, Card, Table, Modal, Form, Input, Select, Tabs, Dialog, Dropdown) - CSS: Tailwind CSS - State: React hooks (use client components where needed) - Validation: Zod for API routes and forms ### 6. Project Structure - /app: Next.js routes (auth, dashboard, contacts, companies, deals, activities, analytics) - /components: Reusable UI components (Navbar, Sidebar, KanbanBoard, ContactCard, etc.) - /lib: Database client, utilities, constants - /prisma: Schema and migrations - /public: Static assets ### 7. API Routes All API routes should be in /app/api with proper error handling and authentication: - POST /api/contacts (create), GET /api/contacts (list with pagination), GET /api/contacts/[id], PUT/DELETE - POST /api/companies, GET /api/companies, etc. - POST /api/deals, GET /api/deals, PATCH /api/deals/[id]/stage (for drag-drop) - POST /api/activities, GET /api/activities - POST /api/emails/send (via Resend), POST /api/emails/webhook (for open/click tracking) - POST /api/meetings, GET /api/meetings ### 8. Performance & Best Practices - Server components by default, use 'use client' sparingly - Implement proper error boundaries - Add loading skeletons for async data - Use Prisma select to avoid over-fetching - Implement pagination for lists (20 items per page) - Cache frequently accessed data - Add proper TypeScript types throughout ### 9. Styling & UX - Use Tailwind CSS with a cohesive color scheme (suggestion: purple/indigo for primary) - Implement consistent spacing, typography, and component patterns - Add subtle hover effects and transitions - Dark mode support (optional but recommended) - Mobile-responsive design ### 10. Deployment - Deploy frontend on Vercel - Host database on Supabase - Configure environment variables for Clerk, Resend API keys - Set up proper CORS policies When building, prioritize: Auth → Data models → CRUD APIs → Dashboard UI → Advanced features. Use this prompt as your system context for all coding decisions.

How to Use This Prompt:

  • Open Cursor.sh or ChatGPT/Claude
  • Click the button above to copy the prompt
  • Paste it into the chat window
  • Add: "Start by scaffolding the Next.js 14 project with the tech stack above. Create the Prisma schema first."
  • Follow its instructions step-by-step

3️⃣ Week-by-Week Build Plan

A structured 6-week roadmap to ship a fully functional CRM.

📅 Week 1: Foundation & Auth (Mon-Sun)
  • Scaffold Next.js 14 project with TypeScript
  • Set up PostgreSQL database and Prisma ORM
  • Configure Clerk authentication
  • Create base layout with Navbar, Sidebar
  • Build initial Prisma schema (Contact, Company, Deal, Activity)
  • Write database migration scripts
  • Deploy to Vercel (staging)
  • Deliverable: Logged-in user can access dashboard
📅 Week 2: Contact & Company Management
  • Create Contact CRUD API endpoints (POST, GET, PUT, DELETE)
  • Build Contact list page with pagination & search
  • Create contact detail page with activity feed
  • Implement Company CRUD endpoints
  • Build company list and profile pages
  • Add form validation with Zod
  • Create modals for quick add/edit
  • Deliverable: Full contact & company management (CRUD)
📅 Week 3: Deal Pipeline & Kanban
  • Build Deal data API endpoints
  • Implement Kanban board view using React Beautiful DnD
  • Create drag-drop stage updates (API endpoint: PATCH /api/deals/[id]/stage)
  • Build deal detail modal with full information
  • Add deal creation flow
  • Create pipeline filters (company, owner, date range)
  • Display deal value and win probability
  • Deliverable: Functional Kanban board with drag-drop
📅 Week 4: Email & Activity Tracking
  • Integrate Resend API for email sending
  • Build email compose modal with template support
  • Create ActivityLog data model and API
  • Implement webhook for email open/click tracking
  • Build email history view on contact page
  • Create activity feed component (calls, emails, notes, meetings)
  • Add bulk email capability
  • Deliverable: Send & track emails, full activity log
📅 Week 5: Meeting Scheduler
  • Create Meeting data model
  • Build calendar component (month/week view)
  • Implement meeting creation with attendee selection
  • Add email invitation via Resend
  • Create meeting detail page
  • Implement upcoming meetings widget on dashboard
  • Add integration to activity logs
  • Deliverable: Fully functional meeting scheduler
📅 Week 6: Dashboard, Polish & Deploy
  • Build comprehensive analytics dashboard
  • Create sales metrics cards (total deals, revenue, win rate)
  • Add Recharts visualizations (pipeline funnel, revenue by stage, activity trends)
  • Implement date range filters for all charts
  • Polish UI/UX across all pages
  • Add dark mode support
  • Performance optimization and bug fixes
  • Final QA and deploy to production
  • Deliverable: Production-ready CRM 🚀

4️⃣ Open Source Starting Points

These projects can inspire architecture decisions or provide boilerplate code.

Twenty CRM

A modern, open-source CRM with a focus on developer experience. Built with React and PostgreSQL.

GitHub: twentyhq/twenty

View on GitHub →

Erxes

Enterprise-level CRM and business platform with extensive features and strong community support.

GitHub: erxes/erxes

View on GitHub →

SalesBlink

Lightweight sales CRM alternative. Good reference for essential features and clean architecture.

GitHub: Various sales CRM projects

Explore on GitHub →

Next.js Boilerplate

Production-ready Next.js starter with auth, database, and API setup. Great foundation.

GitHub: nextjs-boilerplate

Find Boilerplates →

shadcn/ui Templates

Admin templates built with shadcn/ui and Tailwind. Perfect for dashboard inspiration.

Browse ready-made components and templates

Visit shadcn/ui →

Prisma Examples

Official Prisma examples with database patterns, relationships, and best practices.

GitHub: prisma/examples

View Examples →

5️⃣ Cost Breakdown

Your all-in monthly cost vs. enterprise CRM alternatives.

Service Purpose Cost/Month Notes
Vercel Next.js Frontend Hosting $20 Pro plan with fast builds & analytics
Supabase PostgreSQL Database $25 Pro plan, ~1M rows, daily backups
Clerk Authentication $25 Pro plan, unlimited users
Resend Email Service $20 Pay-as-you-go, ~50k emails/month included
TOTAL MONTHLY COST ~$90 10x cheaper than HubSpot!
💡 HubSpot Comparison: HubSpot's starter plan costs $890/month. Your custom CRM costs ~$90/month. That's a 90% savings while keeping 100% ownership of your code and data.

🎯 Key Features At-a-Glance

Everything you're building in this kit:

👥 Contact Mgmt

Full CRUD, search, filters, bulk actions

🏢 Company Mgmt

Profiles, linked contacts & deals

📊 Pipeline View

Kanban board with drag-drop stages

📧 Email Tracking

Send, track opens, clicks & delivery

📅 Meetings

Calendar, invites, attendee tracking

📈 Analytics

Sales metrics, revenue forecasts, trends

📝 Activities

Call logs, notes, email history

🔐 Security

Role-based access, user isolation

Ready to Build?

You have everything you need: the tech stack, the prompt, the roadmap, and the budget-friendly architecture. Start today with Cursor AI or Claude.

Pro Tip: Start with Week 1. Deploy early. Iterate fast. Your CRM will be production-ready in 6 weeks.