A modern, full-stack lead management application built with Next.js, TypeScript, Express, and MongoDB. Streamline your sales process with comprehensive lead tracking, filtering, and analytics.
- Lead Management: Create, view, update, and delete leads
- Advanced Filtering: Search by name/email, filter by status
- Smart Sorting: Sort by name, email, or creation date
- Pagination: Efficient data loading with customizable page sizes
- Real-time Search: Debounced search with instant feedback
- Dashboard Overview: Key metrics and conversion rates
- Status Distribution: Visual breakdown of lead pipeline
- Recent Activity: Latest lead updates and changes
- Performance Tracking: Monitor your sales funnel
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Modern UI: Clean, professional interface with Tailwind CSS
- Sticky Navigation: Always-accessible header and breadcrumbs
- Loading States: Smooth loading indicators and skeleton screens
- Error Handling: Graceful error messages and retry options
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Shadcn/ui - Modern component library
- Lucide React - Beautiful icons
- Node.js - JavaScript runtime
- Express.js - Web application framework
- TypeScript - Type-safe backend development
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Node.js 18+ installed
- MongoDB Atlas account (or local MongoDB)
- Git
git clone https://github.com/fedhako7/lead-management.git
cd lead-management# Move to lead-management/frontend
cd frontend
# Install dependencies
npm install
# Create environment file
cp .env
# Add your environment variables
NEXT_PUBLIC_API_URL=http://localhost:5000/api# Move to lead-management/backend
cd backend
# Install dependencies
npm install
# Create environment file
cp .env
# Add your MongoDB connection string
MONGODB_URI=your_mongodb_connection_string
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000Terminal 1 - Backend:
# Move to lead-management/backend
cd backend
npm run devTerminal 2 - Frontend:
# Move to lead-management/frontend
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Health Check: http://localhost:5000/health
lead-management/
βββ app/ # Next.js app directory
β βββ leads/ # Lead management pages
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
βββ components/ # Reusable components
β βββ ui/ # Shadcn/ui components
β βββ header.tsx # Navigation header
β βββ footer.tsx # Site footer
β βββ breadcrumb.tsx # Breadcrumb navigation
βββ lib/ # Utility libraries
β βββ api.ts # API client
β βββ utils.ts # Helper functions
βββ types/ # TypeScript type definitions
βββ backend/ # Express.js backend
β βββ src/
β β βββ controllers/ # Route controllers
β β βββ models/ # Mongoose models
β β βββ routes/ # API routes
β β βββ middleware/ # Custom middleware
β β βββ types/ # Backend types
β β βββ db/ # Database connection
β βββ package.json
β βββ tsconfig.json
βββ README.md
NEXT_PUBLIC_API_URL=http://localhost:5000/apiMONGODB_URI=mongodb+srv://username:[email protected]/database
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000POST /api/leads- Create new leadGET /api/leads- Get all leads (with pagination, search, filter)
GET /api/leads?page=1&limit=10&search=john&status=New&sortBy=createdAt&sortOrder=desc
- Dashboard - Overview with stats and recent activity
- Lead List - Paginated table with filtering and search
- Add Lead - Form to create new leads
- Header - Sticky navigation with active states
- Footer - Links and social media
- Breadcrumbs - Navigation trail
- Search Bar - Debounced search input
- Status Badges - Color-coded lead status
- Pagination - Navigate through lead pages
- Create cluster
- Setup database user
- Configure network access
- Get connection string
Fedesa Yelmachew
- GitHub: @fedhako7
- LinkedIn: linkfedhako7
- Twitter: @nuyi_fi_siyi
- LeetCode: fedhasayel