Skip to content

Uday1772002/Lead-Management-Module

Repository files navigation

LeadCRM - Lead Management System

A comprehensive lead management and CRM system for tracking and converting prospects. This project consists of two separate applications:

  • Frontend: React application with TypeScript and Tailwind CSS
  • Backend: Node.js API with Express and MongoDB

Note: The frontend and backend are completely separate projects that can be developed, deployed, and maintained independently.

Features

  • Lead Management: Add, edit, delete, and track leads
  • Advanced Filtering: Search by name, email, phone, and filter by status
  • Responsive Design: Works on desktop and mobile devices
  • Real-time Updates: Instant feedback with toast notifications
  • RESTful API: Clean backend architecture with MongoDB
  • Form Validation: Client-side validation with user-friendly error messages

Tech Stack

Frontend (This Project)

  • React 18 with TypeScript
  • Tailwind CSS for styling
  • shadcn/ui components
  • React Router for navigation
  • React Query for data fetching

Backend (Separate Project)

  • Node.js with Express
  • MongoDB with Mongoose
  • RESTful API design
  • Input validation and error handling
  • Rate limiting and security headers

See backend/README.md for complete backend documentation.

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • MongoDB (local or cloud instance)

Frontend Setup

  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:5173 in your browser

Backend Setup (Separate Project)

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Create a .env file:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/leadcrm
NODE_ENV=development
  1. Seed the database with sample data:
npm run seed
  1. Start the backend server:
npm run dev

The API will be available at http://localhost:5000

Development

Clone this repository and start developing locally with your preferred IDE.

# Clone the repository
git clone <YOUR_GIT_URL>

# Navigate to the project directory
cd canvashub-core

# Install frontend dependencies
npm install

# Backend is in separate directory
# To set up backend:
# cd backend && npm install && npm run seed && npm run dev

Project Structure

canvashub-core/             # Frontend project
├── src/                    # React source code
│   ├── components/         # React components
│   ├── pages/             # Page components
│   ├── services/          # API services
│   ├── hooks/             # Custom React hooks
│   └── lib/               # Utility functions
├── public/                 # Static assets
└── backend/                # Backend project (separate)
    ├── models/             # MongoDB models
    ├── routes/             # API routes
    ├── seed.js             # Database seeding script
    └── server.js           # Express server

Note: The backend is now completely separate from the frontend and can be developed, deployed, and maintained independently.

Sample Data

The application comes with 12 sample leads that include:

  • Various statuses (New, Follow-Up, Qualified, Converted)
  • Different qualifications (High School, Bachelors, Masters, PhD, Other)
  • Multiple interest fields (Web Development, Mobile Development, Data Science, Digital Marketing, UI/UX Design)
  • Various sources (Website, Social Media, Email Campaign, Cold Call)
  • Different job interests (Full-time, Part-time, Freelance, Internship)

To populate the database with sample data:

cd backend
npm run seed

API Endpoints

  • GET /api/leads - Get all leads with search and filtering
  • POST /api/leads - Create a new lead
  • PUT /api/leads/:id - Update a lead
  • DELETE /api/leads/:id - Delete a lead

Deployment

Frontend

Build the frontend for production:

npm run build

The built files will be in the dist directory and can be deployed to any static hosting service.

Backend

The backend can be deployed to any Node.js hosting platform:

  1. Set environment variables for production
  2. Run npm start to start the production server
  3. Ensure MongoDB connection is configured for production

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors