AI-Powered Federal Contract Intelligence & Opportunity Discovery System
The SAM.gov Intelligence Hub is an enterprise-grade intelligence platform that transforms federal contract data into actionable business insights. By combining real-time data aggregation, advanced AI analysis, and automated opportunity discovery, this system helps businesses identify and win federal contracts.
- Real-time SAM.gov contract opportunity monitoring
- Multi-source data collection (contracts, awards, solicitations)
- Smart filtering and deduplication
- Historical data tracking and trending
- Natural language processing for opportunity qualification
- Competitive landscape analysis
- Win probability scoring
- Automated requirements extraction
- Industry trend prediction
- Daily opportunity digests
- Priority scoring and ranking
- Team notifications via Slack/Email
- Deadline tracking and reminders
- Automated proposal tracking
- Notion database for opportunity management
- CRM integration ready
- Google Sheets export capability
- REST API for custom integrations
- Slack bot interface
โโโโโโโโโโโโโโโโโโโ
โ SAM.gov API โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Data Scrapers โ โโโ Scheduled Tasks
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ AI Processing โ โโโ LLM Analysis
โ & Scoring โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Database โ
โ (SQLite) โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Integrations โ
โ โโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Notion โ โ Slack/Email โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.9+
- SAM.gov API Key (Register here)
- Composio account (for integrations)
- OpenAI API Key (for AI features)
-
Clone the repository
git clone https://github.com/haroldeustaquio/samgov-intelligence-hub.git cd samgov-intelligence-hub -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp config/config.example.json config/config.json # Edit config.json with your API keys and settings -
Initialize database
python src/database/init_db.py
Edit config/config.json:
{
"sam_gov": {
"api_key": "YOUR_SAM_GOV_API_KEY",
"base_url": "https://api.sam.gov/opportunities/v2/search"
},
"openai": {
"api_key": "YOUR_OPENAI_API_KEY",
"model": "gpt-4"
},
"composio": {
"api_key": "YOUR_COMPOSIO_API_KEY"
},
"filters": {
"naics_codes": ["541512", "541519", "541611"],
"set_aside_codes": ["SBA", "8A", "SDVOSB"],
"min_value": 50000,
"max_value": 5000000
},
"scheduling": {
"scrape_interval_hours": 6,
"digest_time": "09:00"
}
}python src/scrapers/sam_scraper.pypython src/ai/analyzer.py --batch-size 50python src/api/server.pyAccess at: http://localhost:8000/docs
python src/scheduler.pypython src/utils/digest_generator.py --email --slackGET /api/opportunities- List all opportunitiesGET /api/opportunities/{id}- Get specific opportunityPOST /api/opportunities/search- Search with filtersGET /api/opportunities/high-priority- Get high-priority opportunities
GET /api/analytics/trends- Market trend analysisGET /api/analytics/competitors- Competitive intelligenceGET /api/analytics/win-probability/{id}- Win probability for opportunity
POST /api/sync/notion- Sync to NotionPOST /api/sync/slack- Send Slack notification
The AI analyzer evaluates opportunities based on:
- Technical Fit (0-100): Match with your capabilities
- Competitive Landscape (0-100): Number and strength of competitors
- Win Probability (0-100): Overall likelihood of success
- Strategic Value (0-100): Long-term business value
- Requirement complexity assessment
- Key decision maker identification
- Similar past wins analysis
- Recommended team composition
- Risk factor identification
- Runs every morning at 9 AM
- Summarizes new high-priority opportunities
- Highlights urgent deadlines
- Sends via email and Slack
- Checks SAM.gov every 6 hours
- Immediately flags critical opportunities
- Auto-scores and prioritizes
- Pushes to Notion database
- 7-day warning for upcoming deadlines
- 48-hour critical alerts
- Automatic calendar invites
Automatically syncs opportunities to Notion with:
- ๐ Opportunity Details (title, description, value)
- ๐ฏ AI Scores (technical fit, win probability)
- ๐ Key Dates (posted, deadline, award date)
- ๐ข Agency Information (department, office, contact)
- ๐ Links (SAM.gov URL, documents)
- ๐ Status Tracking (new, reviewing, bidding, submitted)
# Run all tests
pytest tests/
# Run specific test suite
pytest tests/test_scrapers.py
# Run with coverage
pytest --cov=src tests/Once deployed, use these Slack commands:
/samgov today - Today's high-priority opportunities
/samgov search [query] - Search opportunities
/samgov deadline - Upcoming deadlines
/samgov stats - Weekly statistics
samgov-intelligence-hub/
โโโ src/
โ โโโ api/ # FastAPI server
โ โโโ scrapers/ # SAM.gov data collection
โ โโโ ai/ # LLM analysis & scoring
โ โโโ database/ # SQLite models & queries
โ โโโ utils/ # Helper functions
โโโ config/ # Configuration files
โโโ tests/ # Test suites
โโโ data/ # Local data storage
โโโ .github/workflows/ # CI/CD pipelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Never commit API keys or secrets
- Use environment variables or
config/secrets.json(gitignored) - Rotate API keys regularly
- Enable 2FA on all integrated services
MIT License - See LICENSE file
- Documentation: Full Docs
- Issues: GitHub Issues
- Email: [email protected]
- Advanced ML models for win prediction
- Automated proposal generation
- Competitor tracking dashboard
- Integration with proposal management tools
- Mobile app for opportunity alerts
- Multi-agency support (state/local contracts)
Built with โค๏ธ using Composio, SAM.gov API, and OpenAI
Transforming federal contract intelligence into competitive advantage