Skip to content

Bilal-03/crm-pro

Repository files navigation

🎯 CRM Pro - AI-Powered Sales Management System

A modern, feature-rich CRM application built with React, Supabase, and AI-powered lead scoring. Streamline your sales pipeline with intelligent automation, beautiful analytics, and professional quote generation.

CRM Pro React Supabase License

✨ Features

🎯 Core CRM Functionality

  • Lead Management - Track and organize leads with AI-powered priority scoring
  • Pipeline Visualization - Drag-and-drop Kanban board + table view
  • Client Management - Manage closed-won clients with full contact history
  • Meeting Scheduler - Schedule, edit, and track client meetings
  • Activity Tracking - Automatic activity logging for all actions
  • Notes & Reminders - Add detailed notes and set follow-up reminders

πŸ€– AI-Powered Features

  • Smart Lead Scoring - Automatic priority scoring (Hot/Warm/Cold) based on:
    • Contact information completeness
    • Lead source quality
    • Engagement level (notes, interactions)
    • Pipeline stage
  • Visual Score Indicators - Color-coded badges with πŸ”₯ Hot, β˜€οΈ Warm, ❄️ Cold icons

πŸ“Š Analytics & Reporting

  • Real-time Dashboard with:
    • Pipeline distribution bar chart
    • Lead source pie chart
    • 7-day growth trend area chart
    • Key performance metrics
  • Export to CSV - Download leads data for external analysis
  • Visual Insights - Recharts-powered interactive charts

πŸ“„ Professional Quote Builder

  • In-App Quote Generator - Build itemized quotes with line items
  • PDF Export - Generate professional PDF quotes with:
    • Company branding
    • Itemized pricing table
    • Terms & conditions
    • Automatic quote numbering
  • Real-time Quote Preview - See totals as you build

πŸ”— Smart Integrations

  • One-Click Email - Pre-filled professional email templates
  • Google Calendar Integration - Add meetings to calendar with one click
  • Automated Reminders - Never miss a follow-up with overdue alerts

🎨 Beautiful UI/UX

  • Light Theme - Professional, clean interface
  • Responsive Design - Works on desktop, tablet, and mobile
  • Smooth Animations - Framer Motion powered transitions
  • Drag & Drop - Intuitive pipeline management

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm
  • Supabase account (free tier works!)

Installation

  1. Clone the repository
git clone https://github.com/yourusername/crm-pro.git
cd crm-pro
  1. Install dependencies
npm install
  1. Set up Supabase
  • Create a new project at supabase.com
  • Get your Project URL and Anon Key from Project Settings β†’ API
  • Update crm-system.jsx lines 66-67 with your credentials:
const supabase = createClient(
  'YOUR_SUPABASE_URL',      // Replace with your Project URL
  'YOUR_SUPABASE_ANON_KEY'  // Replace with your Anon Key
);
  1. Create database tables

Run these SQL commands in your Supabase SQL Editor:

-- Leads table
CREATE TABLE leads (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID REFERENCES auth.users NOT NULL,
  name TEXT NOT NULL,
  company TEXT,
  email TEXT NOT NULL,
  phone TEXT,
  source TEXT,
  stage TEXT DEFAULT 'new',
  notes JSONB DEFAULT '[]',
  reminders JSONB DEFAULT '[]',
  quote_items JSONB DEFAULT '[]',
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Meetings table
CREATE TABLE meetings (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID REFERENCES auth.users NOT NULL,
  lead_id UUID REFERENCES leads(id) ON DELETE CASCADE,
  title TEXT NOT NULL,
  date_time TIMESTAMP WITH TIME ZONE NOT NULL,
  notes TEXT,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Activities table
CREATE TABLE activities (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID REFERENCES auth.users NOT NULL,
  lead_id UUID REFERENCES leads(id) ON DELETE SET NULL,
  type TEXT NOT NULL,
  message TEXT NOT NULL,
  timestamp TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

-- Enable Row Level Security
ALTER TABLE leads ENABLE ROW LEVEL SECURITY;
ALTER TABLE meetings ENABLE ROW LEVEL SECURITY;
ALTER TABLE activities ENABLE ROW LEVEL SECURITY;

-- Create policies
CREATE POLICY "Users can view their own leads" ON leads
  FOR SELECT USING (auth.uid() = user_id);
CREATE POLICY "Users can insert their own leads" ON leads
  FOR INSERT WITH CHECK (auth.uid() = user_id);
CREATE POLICY "Users can update their own leads" ON leads
  FOR UPDATE USING (auth.uid() = user_id);
CREATE POLICY "Users can delete their own leads" ON leads
  FOR DELETE USING (auth.uid() = user_id);

CREATE POLICY "Users can view their own meetings" ON meetings
  FOR SELECT USING (auth.uid() = user_id);
CREATE POLICY "Users can insert their own meetings" ON meetings
  FOR INSERT WITH CHECK (auth.uid() = user_id);
CREATE POLICY "Users can update their own meetings" ON meetings
  FOR UPDATE USING (auth.uid() = user_id);
CREATE POLICY "Users can delete their own meetings" ON meetings
  FOR DELETE USING (auth.uid() = user_id);

CREATE POLICY "Users can view their own activities" ON activities
  FOR SELECT USING (auth.uid() = user_id);
CREATE POLICY "Users can insert their own activities" ON activities
  FOR INSERT WITH CHECK (auth.uid() = user_id);
  1. Run the development server
npm run dev
  1. Open your browser Navigate to http://localhost:5173

πŸ“ Project Structure

crm-pro/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.jsx           # React entry point
β”‚   └── index.css          # Tailwind CSS imports
β”œβ”€β”€ crm-system.jsx         # Main application code
β”œβ”€β”€ index.html             # HTML entry point
β”œβ”€β”€ package.json           # Dependencies
β”œβ”€β”€ vite.config.js         # Vite configuration
β”œβ”€β”€ tailwind.config.js     # Tailwind CSS config
β”œβ”€β”€ postcss.config.js      # PostCSS config
β”œβ”€β”€ .gitignore            # Git ignore rules
└── README.md             # This file

πŸ› οΈ Tech Stack

Technology Purpose
React 18 UI framework
Vite Build tool & dev server
Supabase Backend (Auth + Database)
Tailwind CSS Styling
Framer Motion Animations
Recharts Data visualization
jsPDF & autoTable PDF generation
@hello-pangea/dnd Drag and drop
Lucide React Icons

🎯 Key Features Explained

AI Lead Scoring Algorithm

The CRM automatically scores each lead (0-100) based on:

  • βœ… Email provided: +10 points
  • βœ… Phone provided: +10 points
  • βœ… Company provided: +5 points
  • βœ… Premium source (Referral/LinkedIn/Partner): +15 points
  • βœ… Each note added: +5 points
  • βœ… Qualified stage: +10 points
  • βœ… Proposal stage: +20 points

Score Categories:

  • πŸ”₯ Hot (60-100): High priority, ready to close
  • β˜€οΈ Warm (30-59): Engaged, needs nurturing
  • ❄️ Cold (0-29): Low engagement, long-term prospect

Quote Builder Workflow

  1. Open any lead in edit mode
  2. Click "Quote Builder" tab
  3. Add line items (description, quantity, price)
  4. Save quote to lead
  5. Click PDF icon in leads table to generate professional quote
  6. PDF downloads automatically with branding and terms

Pipeline Stages

  • New Lead - Just added to system
  • Qualified - Meets buying criteria
  • Follow-up - Active conversation
  • Proposal - Quote sent
  • Closed Won - Deal closed! βœ…
  • Closed Lost - Opportunity lost

πŸ“Έ Screenshots

Dashboard

![Dashboard with analytics charts and activity feed]

Leads Page

![Sortable leads table with AI scoring and quick actions]

Pipeline View

![Drag-and-drop Kanban board]

Quote Builder

![In-app quote builder with PDF export]

πŸ” Security Features

  • βœ… Row Level Security (RLS) enabled on all tables
  • βœ… User data isolation (users only see their own data)
  • βœ… Secure authentication via Supabase Auth
  • βœ… Protected API routes
  • βœ… No sensitive data in frontend

🚧 Roadmap

  • Email campaign integration
  • WhatsApp/SMS notifications
  • Custom fields for leads
  • Team collaboration features
  • Mobile app (React Native)
  • Advanced reporting & forecasting
  • Multi-language support

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Your Name

πŸ™ Acknowledgments

πŸ’‘ Support

If you found this helpful, please consider giving it a ⭐!


Built with ❀️ for the sales community

Releases

No releases published

Packages

No packages published

Languages