Spaces:
Running
Running
Setup Guide
Complete step-by-step guide to get the system running.
Prerequisites
- Node.js 18+ (recommended: 20 LTS)
- Python 3.11+
- npm 9+
- Git
Step 1: API Keys
Create accounts and get keys from these services (all FREE):
1.1 NVIDIA NIM (LLM β MiniMax + LLaMA)
- Go to https://build.nvidia.com
- Sign up / login
- Click any model β "Get API Key"
- Copy key (starts with
nvapi-) - Free: 1000+ requests/day
1.2 Serper.dev (Google Search)
- Go to https://serper.dev
- Sign up with Google
- Dashboard β copy API key
- Free: 2,500 searches/month
1.3 Hunter.io (Email Finding)
- Go to https://hunter.io
- Sign up β Dashboard β API
- Copy API key
- Free: 25 searches/month
1.4 Reoon (Email Verification)
- Go to https://emailverifier.reoon.com
- Sign up β Dashboard β API
- Copy API key
- Free: 20 verifications/day
- NOTE: System optimizes usage (SMTP probe first, Reoon fallback)
1.5 Supabase (Database)
- Go to https://supabase.com
- Create project
- Project Settings β API
- Copy Project URL and service_role key (not anon key!)
- Free: 500MB database
1.6 Slack Bot
- Go to https://api.slack.com/apps β Create New App
- Name: "Lead Finder"
- OAuth & Permissions β Add scopes:
chat:write,commands,channels:read - Install to Workspace β copy Bot Token (
xoxb-...) - Basic Information β copy Signing Secret
- Create 2 channels:
#leadsand#review - Get channel IDs: right-click channel β View details β copy ID
1.7 Trigger.dev (Job Orchestration)
- Go to https://trigger.dev β Sign up
- Create project
- Dashboard β API Keys β copy
- Project ID from URL:
trigger.dev/orgs/.../projects/[PROJECT_ID] - Free: 50,000 runs/month
Step 2: Environment Setup
cp .env.example .env
Edit .env and fill in all keys from Step 1.
Step 3: Database Migration
Option A β Supabase Dashboard:
- Open Supabase β SQL Editor
- Paste contents of
supabase/migrations/001_initial_schema.sqlβ Run - Paste contents of
supabase/migrations/002_phase1_enhancements.sqlβ Run
Option B β Supabase CLI:
npx supabase migration up
Step 4: Install & Run
# Install Node.js dependencies
npm install
# Install Python dependencies
cd src/profiling/python-service
pip install -r requirements.txt
cd ../../..
# Terminal 1: Start Trigger.dev
npm run trigger:dev
# Terminal 2: Start Python AI service
cd src/profiling/python-service
python main.py
Step 5: Verify
The system runs automatically at 9 AM PKT daily. To test manually:
- Use Slack
/discovercommand - Or trigger from Trigger.dev dashboard
Troubleshooting
| Issue | Solution |
|---|---|
NVIDIA_API_KEY error |
Check key starts with nvapi- |
| MiniMax 429 rate limit | System auto-retries after wait |
| Hunter returns empty | Free tier: 25/month limit reached |
| SMTP verification fails | Some mail servers block port 25 |
| Supabase connection error | Check SUPABASE_URL has https:// |