Skip to content

cve415/CVE-Internal-Application-One

Repository files navigation

CVE Sourcing Internal Tracker App One

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.

Features

  • 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

Technology Stack & Architecture Decisions

Frontend Technologies

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.

Backend Technologies

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.

Integration & AI Technologies

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.

Development & Deployment

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.

Architecture Benefits

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.

CRM Features & Implementation

Lead Management System

  • 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

AI-Powered Data Enrichment

  • 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

Activity Tracking & Audit Trail

  • 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

Data Integration & Migration

  • 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

User Experience Design

  • 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.

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • OpenAI API key (optional, for AI enrichment)
  • Google Sheets API credentials (optional, for sync)

Installation

  1. Clone the repository:
git clone <repository-url>
cd cve-sourcing-tracker
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your database URL and API keys
  1. Set up the database:
npm run db:push
  1. Generate sample data (optional):
node scripts/generate-sample-data.js
  1. Start the development server:
npm run dev

Project Structure

├── 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

Categories

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

Customer Types

  • Recruiting: Talent acquisition services
  • Consulting: Technical consulting services
  • Sponsor: Sponsorship opportunities

API Endpoints

  • GET /api/companies - Get all companies
  • POST /api/companies - Create a new company
  • PUT /api/companies/:id - Update a company
  • DELETE /api/companies/:id - Delete a company
  • POST /api/companies/:id/enrich - Enrich company data with AI
  • GET /api/activities - Get recent activities
  • GET /api/stats - Get dashboard statistics
  • POST /api/sync/sheets - Sync with Google Sheets

Environment Variables

DATABASE_URL=postgresql://user:password@localhost:5432/database
OPENAI_API_KEY=sk-...
GOOGLE_SHEETS_API_KEY=...
GOOGLE_SHEETS_ID=...

Development

Database Migrations

npm run db:push

Generate Sample Data

node scripts/generate-sample-data.js [count]

Build for Production

npm run build

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

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

Support

For support and questions, please open an issue in the GitHub repository.

About

Internal application for CVE Sourcing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published