Welcome to Agrolead - A production-ready Python application for discovering and scoring European agricultural importers and wholesalers.
Start here based on what you need:
-
QUICKSTART.md - 5-minute setup guide
- Installation steps
- First crawl example
- Common tasks
-
README.md - Complete feature guide
- Feature overview
- Installation options
- Usage examples
- Configuration reference
-
IMPLEMENTATION.md - Architecture guide
- Component overview
- Adding custom adapters
- Performance tuning
- Testing guidelines
-
CONTRIBUTING.md - Developer guide
- Code style guidelines
- Pull request process
- Testing requirements
- Example: Adding a new adapter
- DEPLOYMENT.md - Production guide
- Docker Compose setup
- Linux manual installation
- Systemd service configuration
- Database optimization
- Monitoring and backups
- Scaling strategies
- FAQ.md - Frequently asked questions
- Installation issues
- Configuration help
- Usage questions
- Performance optimization
- Error troubleshooting
-
CHANGELOG.md - Version history
- What's new in v1.0.0
- Planned features
- Breaking changes
-
PROJECT_SUMMARY.md - Project overview
- Statistics and metrics
- File structure
- Technology stack
✅ 9 Python modules
✅ Pydantic data models
✅ SQLAlchemy ORM layer
✅ Async crawler infrastructure
✅ Website enrichment system
✅ Lead scoring engine
✅ Export functionality
✅ CLI interface
✅ Configuration system
✅ 24+ unit tests
✅ Type hints throughout
✅ Pre-commit hooks
✅ Black formatting
✅ flake8 linting
✅ mypy type checking
✅ Docker containerization
✅ Docker Compose stack
✅ Makefile with 30+ commands
✅ GitHub Actions CI/CD
✅ Systemd service templates
✅ Backup scripts
✅ 50+ pages of guides
✅ Inline code documentation
✅ Example configurations
✅ Troubleshooting guide
✅ Deployment guide
✅ Contributing guide
→ QUICKSTART.md (5 minutes)
→ FAQ.md
agrolead/
├── 📖 QUICKSTART.md ← Start here!
├── 📖 README.md ← Feature guide
├── 📖 IMPLEMENTATION.md ← Architecture
├── 📖 DEPLOYMENT.md ← Production setup
├── 📖 CONTRIBUTING.md ← Developer guide
├── 📖 FAQ.md ← Troubleshooting
├── 📖 CHANGELOG.md ← Version history
├── 📖 PROJECT_SUMMARY.md ← Overview
│
├── 🐍 agrolead/ ← Main package
│ ├── models/
│ │ └── company.py ← Pydantic models
│ ├── config/
│ │ └── settings.py ← Configuration
│ ├── crawler/
│ │ ├── base_adapter.py ← Base classes
│ │ └── sources/
│ │ └── adapters.py ← Directory adapters
│ ├── database/
│ │ └── models.py ← Database layer
│ ├── enrichment/
│ │ └── enricher.py ← Enrichment system
│ ├── scoring/
│ │ └── scorer.py ← Scoring engine
│ ├── export/
│ │ └── exporter.py ← Export formats
│ ├── cli/
│ │ └── main.py ← CLI interface
│ ├── app/
│ │ └── orchestrator.py ← Main orchestrator
│ └── utils/
│ └── helpers.py ← Utilities
│
├── 🧪 tests/ ← Unit tests
│ ├── test_models.py
│ └── test_enrichment.py
│
├── 📦 Requirements & Config
│ ├── requirements.txt ← Dependencies
│ ├── setup.py ← Installation config
│ ├── pyproject.toml ← Modern Python config
│ ├── .env.example ← Config template
│ ├── .pre-commit-config.yaml ← Pre-commit hooks
│ └── Makefile ← Development tasks
│
├── 🐳 Docker & Deployment
│ ├── Dockerfile ← Container image
│ ├── docker-compose.yml ← Local & prod setup
│ └── .github/workflows/
│ └── ci-cd.yml ← GitHub Actions
│
├── 📄 License & Legal
│ ├── LICENSE ← MIT License
│ ├── .gitignore ← Git rules
│ └── DELIVERY_MANIFEST.md ← What's included
cd agrolead
pip install -r requirements.txt
playwright install chromium
cp .env.example .env
python -m agrolead.cli.main init
python -m agrolead.cli.main search "tomato importer" --country FRTime: 5-10 minutes
docker-compose up -d
docker-compose exec agrolead python -m agrolead.cli.main init
docker-compose exec agrolead python -m agrolead.cli.main search "tomato"Time: 5 minutes (includes PostgreSQL)
make install
make init
make search QUERY="tomato importer"
make crawl
make score
make exportTime: 5 minutes
All settings in .env file:
# Database choice
DB_TYPE=sqlite # or postgresql
# Crawling speed
CRAWLER_MAX_CONCURRENT_TASKS=5 # 5-10 for faster
CRAWLER_RATE_LIMIT_DELAY=1.0 # Seconds between requests
# Data quality
SCORING_MINIMUM_SCORE=20 # Min score to include
ENRICHMENT_ENABLED=true # Extract website data
# Export options
EXPORT_FORMATS=csv,excel,json # What to export- Beginner: Run through QUICKSTART.md examples
- Intermediate: Explore README.md features and configuration
- Advanced: Read IMPLEMENTATION.md for architecture
- Expert: Study source code and extend with custom adapters
✅ Search B2B directories (Europages, Kompass) ✅ Extract emails, phones, social media ✅ Score leads 0-100 scale ✅ Export to CSV, Excel, JSON ✅ Store in SQLite or PostgreSQL ✅ Schedule automatic crawling ✅ Add custom directory sources ✅ Customize scoring weights ✅ Deploy to production
- Multiple B2B directories
- JavaScript site support
- Concurrent crawling (10+ sites at once)
- Automatic retries
- URL caching
- Email extraction & validation
- Phone normalization (E.164)
- Language detection
- Social media discovery
- Certification detection
- Multi-factor scoring (0-100)
- Keyword matching
- Configurable weights
- Quality thresholds
- CRM-ready CSV
- Formatted Excel
- Structured JSON
- SQLite database
- Language: Python 3.12+
- Web: Playwright, httpx, BeautifulSoup4
- Data: Pydantic, SQLAlchemy, Pandas
- CLI: Typer, Rich
- Database: SQLite, PostgreSQL
- DevOps: Docker, Docker Compose
- CI/CD: GitHub Actions
- Speed: 10+ concurrent crawl tasks
- Throughput: 100-1000 companies/day
- Scalability: Handles 100k+ companies
- Rate Limiting: Respectful crawling (configurable)
- Caching: Smart URL cache prevents duplicates
✅ Respects robots.txt ✅ Configurable rate limiting ✅ No LinkedIn scraping ✅ No authentication bypass ✅ Input validation ✅ Type-safe code ✅ Environment variables for secrets
| Need Help? | Read This |
|---|---|
| Installation | QUICKSTART.md |
| Configuration | README.md |
| Architecture | IMPLEMENTATION.md |
| Deployment | DEPLOYMENT.md |
| Troubleshooting | FAQ.md |
| Contributing | CONTRIBUTING.md |
| Errors | FAQ.md Troubleshooting section |
- Read: QUICKSTART.md (5 min)
- Install: Follow setup instructions (5 min)
- Try: Run first search/crawl (5 min)
- Configure: Customize .env for your needs
- Deploy: Follow DEPLOYMENT.md for production
- Extend: Add custom adapters via IMPLEMENTATION.md
- Total Files: 40+
- Lines of Code: 3,166 (Python)
- Documentation: 50+ pages
- Test Coverage: 24+ test cases
- Modules: 9 core + utilities
- Deployment Options: Docker, systemd, manual
- Supported Directories: 3 (extensible)
✅ Production-ready application
✅ Complete source code
✅ Comprehensive documentation
✅ Docker containerization
✅ CI/CD pipeline
✅ Unit tests
✅ Configuration templates
✅ Deployment guides
✅ Troubleshooting help
✅ Extension examples
MIT License - Free for commercial use, modification, and distribution. See LICENSE file.
Agricultural businesses discovering European suppliers:
- Fresh produce importers
- Food distributors
- Wholesale companies
- Foodservice suppliers
- Retail sourcing teams
- Food manufacturers
→ Go to QUICKSTART.md for 5-minute setup
Or jump to specific guide:
- 📖 Feature Guide: README.md
- 🏗️ Architecture: IMPLEMENTATION.md
- 🚢 Production: DEPLOYMENT.md
- ❓ Questions: FAQ.md
🌱 Happy lead hunting!
For agricultural businesses discovering European suppliers. Made with ❤️ and Python 3.12+ by m223rx