A modern, full-stack internal application built to manage leads and track business opportunities. This application replaces traditional spreadsheet-based workflows with a powerful, database-backed solution.
- Lead Management: Create, update, and track company leads with detailed information
- AI-Powered Enrichment: Automatically populate company details using OpenAI integration
- Advanced Filtering: Filter leads by category, location, customer type, and status
- Activity Tracking: Monitor all interactions and changes with comprehensive logging
- Database Storage: PostgreSQL-backed persistence for reliable data management
- Google Sheets Integration: Sync data with existing spreadsheet workflows
- Responsive Design: Modern UI built with React and Tailwind CSS
React 18 with TypeScript
- Why: React provides a robust component-based architecture perfect for building interactive UIs. TypeScript adds compile-time type safety, reducing runtime errors and improving developer experience for a business-critical CRM application.
Vite Build Tool
- Why: Vite offers lightning-fast hot module replacement and build times compared to traditional bundlers. Essential for rapid development cycles when iterating on CRM features.
Tailwind CSS
- Why: Utility-first CSS framework enables rapid UI development with consistent design tokens. Particularly valuable for building responsive tables, forms, and dashboards without writing custom CSS.
shadcn/ui Component Library
- Why: Provides accessible, well-designed components built on Radix UI primitives. Ensures professional appearance and accessibility compliance for business users.
TanStack Query (React Query)
- Why: Handles complex client-side state management for server data, including caching, background refetching, and optimistic updates. Critical for CRM applications where data freshness and performance matter.
Wouter Router
- Why: Lightweight routing solution (2KB) that provides essential navigation without the overhead of React Router. Perfect for focused CRM applications with straightforward routing needs.
Node.js with Express
- Why: JavaScript across the full stack reduces context switching and enables code sharing between frontend and backend. Express provides a mature, well-documented framework for building REST APIs.
TypeScript
- Why: Ensures type safety across the entire application, from database schemas to API responses. Particularly important for data integrity in CRM systems handling customer information.
PostgreSQL Database
- Why: Robust relational database with excellent support for complex queries, transactions, and data integrity constraints. Essential for CRM applications requiring reliable data storage and relationships.
Drizzle ORM
- Why: Type-safe database operations with excellent TypeScript integration. Provides compile-time query validation and auto-completion, reducing database-related bugs in production.
Neon Database Provider
- Why: Serverless PostgreSQL that scales automatically and provides built-in connection pooling. Ideal for CRM applications with varying load patterns without database administration overhead.
OpenAI API Integration
- Why: Automates data enrichment by intelligently categorizing companies and populating missing information. Reduces manual data entry and improves lead qualification efficiency.
Google Sheets API
- Why: Enables seamless migration from spreadsheet-based workflows. Many businesses rely on Google Sheets for data sharing and reporting, making this integration essential for adoption.
ESBuild & TypeScript Compiler
- Why: Fast compilation and bundling for both development and production. ESBuild's speed is crucial for maintaining developer productivity during rapid feature development.
Environment-based Configuration
- Why: Secure handling of API keys and database credentials across development, staging, and production environments. Essential for maintaining security in business applications.
Full-Stack TypeScript
- Eliminates type mismatches between frontend and backend
- Shared validation schemas reduce code duplication
- Improved refactoring capabilities across the entire application
Database-First Design
- Drizzle schema definitions serve as single source of truth
- Automatic type generation ensures frontend-backend consistency
- Migration-safe schema evolution
API-Centric Architecture
- Clean separation between frontend and backend logic
- Enables future mobile app development or third-party integrations
- Facilitates testing and maintenance
This technology stack was specifically chosen to create a professional, scalable CRM application that can grow with business needs while maintaining developer productivity and code quality.
- Custom Categories: Tailored for recruiting and consulting businesses with categories like "SF Companies," "Semiconductor," and "Conference Lead"
- Customer Type Tracking: Distinguishes between recruiting, consulting, and sponsorship opportunities
- Status Pipeline: Tracks leads from cold → warm → hot → active → prospect → closed
- Intelligent Categorization: Automatically categorizes companies based on location, industry, and business model
- Missing Data Population: Fills in company size, location, and industry information
- Contextual Prompts: Uses business-specific context to improve categorization accuracy
- Comprehensive Logging: Records all create, update, and delete operations with timestamps
- User Action History: Tracks who made changes and when for accountability
- Real-time Feed: Dashboard displays recent activities for team awareness
- Google Sheets Sync: Bi-directional synchronization for teams transitioning from spreadsheets
- CSV Import Support: Bulk import existing lead databases
- Export Capabilities: Export filtered data for reporting and analysis
- Responsive Dashboard: Works seamlessly on desktop and mobile devices
- Advanced Filtering: Multi-dimensional filtering by category, location, status, and customer type
- Search Functionality: Fast search across company names, websites, and notes
- Batch Operations: Efficient handling of multiple leads simultaneously
These features were specifically designed to address the pain points of manual lead management while providing the scalability needed for growing recruiting and consulting businesses.
- Node.js 18+
- PostgreSQL database
- OpenAI API key (optional, for AI enrichment)
- Google Sheets API credentials (optional, for sync)
- Clone the repository:
git clone <repository-url>
cd cve-sourcing-tracker
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env with your database URL and API keys
- Set up the database:
npm run db:push
- Generate sample data (optional):
node scripts/generate-sample-data.js
- Start the development server:
npm run dev
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom hooks
│ │ └── lib/ # Utilities and types
├── server/ # Express backend
│ ├── services/ # External service integrations
│ ├── routes.ts # API routes
│ ├── storage.ts # Database operations
│ └── db.ts # Database configuration
├── shared/ # Shared types and schemas
└── scripts/ # Utility scripts
The application supports the following lead categories:
- SF Companies: San Francisco Bay Area companies
- NYC Companies: New York City area companies
- Semiconductor: Semiconductor and chip companies
- Tech Start up: Early-stage technology companies
- Large Company: Established companies (500+ employees)
- Non-Profit: Non-profit organizations
- Conference Lead: Companies met at conferences
- Recruiting: Talent acquisition services
- Consulting: Technical consulting services
- Sponsor: Sponsorship opportunities
GET /api/companies
- Get all companiesPOST /api/companies
- Create a new companyPUT /api/companies/:id
- Update a companyDELETE /api/companies/:id
- Delete a companyPOST /api/companies/:id/enrich
- Enrich company data with AIGET /api/activities
- Get recent activitiesGET /api/stats
- Get dashboard statisticsPOST /api/sync/sheets
- Sync with Google Sheets
DATABASE_URL=postgresql://user:password@localhost:5432/database
OPENAI_API_KEY=sk-...
GOOGLE_SHEETS_API_KEY=...
GOOGLE_SHEETS_ID=...
npm run db:push
node scripts/generate-sample-data.js [count]
npm run build
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please open an issue in the GitHub repository.