A full-stack lead generation application that finds federal government contractors and enriches them with contact information.
- Advanced Search: Search for federal contractors using natural language, NAICS codes, PSC codes, or keywords
- Real-time Data: Integrates with USASpending.gov API for up-to-date federal contract information
- Contact Enrichment: Automatically enriches company data with contact information using Apify Apollo
- Professional UI: Clean, modern interface with three-column layout (sidebar, main content, detail panel)
- Export Capabilities: Export leads to CSV format
- Responsive Design: Built with Tailwind CSS and custom fed-green theme
- Framework: Next.js 14+ with App Router
- Language: TypeScript
- Styling: Tailwind CSS with custom theme
- Icons: Lucide React
- APIs:
- USASpending.gov API (free, no key required)
- Apify Apollo Actor (requires API key)
- Node.js 18+ and npm
- (Optional) Apify API key for contact enrichment
- Clone the repository:
git clone <repository-url>
cd rlplead- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envEdit .env and add your environment variables:
# Apify API Key (optional - uses mock data if not provided)
APIFY_API_KEY=your_apify_api_key_here
# Neon Database URL (required)
DATABASE_URL=your_neon_database_url_hereSecurity Note:
- ✅
.envis already in.gitignore- your API keys will NEVER be committed to Git - ✅ Always keep your API keys and database credentials private
- ✅ For production deployment, use Vercel's environment variables dashboard
Note: If you don't have an Apify API key, the application will use mock data for contact enrichment.
Start the development server:
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startDeploy FedLeads to Vercel with one click:
Or deploy manually:
- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables in Vercel dashboard:
DATABASE_URL- Your Neon PostgreSQL connection stringAPIFY_API_KEY- Your Apify API key (optional)
- Deploy!
📖 For detailed deployment instructions, security best practices, and troubleshooting, see DEPLOYMENT.md
/app
/api
/search-contractors/route.ts # Main API endpoint
/layout.tsx # Root layout with sidebar
/page.tsx # Main page component
/globals.css # Global styles
/components
/layout
/Sidebar.tsx # Left navigation sidebar
/MainContent.tsx # Main content wrapper
/DetailPanel.tsx # Right detail panel
/search
/SearchBar.tsx # AI search bar
/FilterRow.tsx # Filter dropdowns
/results
/ResultsTable.tsx # Results data table
/ui
/Button.tsx # Reusable button component
/Input.tsx # Input field component
/Dropdown.tsx # Dropdown select component
/Card.tsx # Card container component
/Badge.tsx # Badge/pill component
/Checkbox.tsx # Checkbox component
/Avatar.tsx # Avatar component
/lib
/types.ts # TypeScript interfaces
/usaspending.ts # USASpending API wrapper
/apify.ts # Apify Apollo wrapper
/utils.ts # Utility functions
-
Natural Language Search: Use the top search bar to describe your ideal contractor
- Example: "cybersecurity companies in Virginia"
-
Structured Filters:
- NAICS/Industry: Select industry classification codes
- Location: Filter by state or select "Worldwide"
- Agency Filter: Enter specific agencies (e.g., "DOD", "GSA")
- Keywords: Add specific search terms
-
Click "Find my leads" to execute the search
-
Results appear in a sortable table with columns:
- Company Name
- Contact Email
- Primary Contact
- Location
- Award Total
-
Click any row to view detailed information in the right panel
-
Use checkboxes to select multiple leads for bulk actions
- Click "Export CSV" button above the results table
- CSV includes all lead information and contact details
The right panel shows comprehensive information for the selected company:
- Primary contact information
- Company size and location
- Total federal awards
- Top contracting agencies
- NAICS and PSC codes
- Company description
The application queries the USASpending.gov API to find federal contractors:
// Example API call
POST https://api.usaspending.gov/api/v2/search/spending_by_award/
{
"filters": {
"time_period": [{"start_date": "2023-10-01", "end_date": "2024-09-30"}],
"naics_codes": ["541330"],
"place_of_performance_locations": [{"country": "USA", "state": "VA"}]
}
}Contact enrichment is handled through the Apify platform:
// Requires APIFY_API_KEY environment variable
POST https://api.apify.com/v2/acts/curious_coder/apollo-io-scraper/runs
{
"companyNames": ["Company Name"],
"maxContacts": 3
}The application uses a custom color palette defined in tailwind.config.js:
colors: {
'fed-green': {
50: '#f0f5f0',
100: '#d9e5d9',
200: '#b3cab3',
500: '#4a5d4a',
700: '#2d3d2d',
900: '#1a2e1a',
},
'cream': '#f8f7f4',
}APIFY_API_KEY: (Optional) Your Apify API key for contact enrichment- Get your key at https://apify.com
- Without this key, the app uses mock data for contacts
- PDF export functionality
- Email campaign integration
- Saved lead lists
- Advanced filtering options
- Bulk contact enrichment
- Authentication and user management
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - See LICENSE file for details
For issues and questions:
- Create an issue in the GitHub repository
- Contact: support@fedleads.com
- USASpending.gov for providing federal contracting data
- Apify platform for contact enrichment capabilities
- Next.js and Vercel for the excellent framework