A webhook relay system that enables local machines to receive GitHub webhook events through a cloud-hosted relay server.
New to this project? → See CONTRIBUTING.md for complete onboarding guide
GitHub Event → Cloud Relay Server → WebSocket → Local Client
- Server (
app.py): FastAPI-based relay that receives webhooks and broadcasts via WebSocket - Client (
client/): Local client that connects to relay and processes webhook events
Railway (Recommended):
railway login
railway init
railway up
railway domain # Get your deployment URLRender: Connect your GitHub repo via Render dashboard (uses render.yaml)
- Go to your repo → Settings → Webhooks → Add webhook
- Payload URL:
https://your-deployed-server.com/webhook - Content type:
application/json - Secret: Set a secret and add it to your server's
GITHUB_WEBHOOK_SECRETenv var - Events: Select events or "Send me everything"
- Click "Add webhook"
cd client
pip install -r requirements.txt
export RELAY_SERVER_URL="wss://your-app.railway.app/ws"
python client.pyNow when GitHub events occur, they'll appear instantly in your local terminal!
Integrate with AI assistants to capture insights from conversations:
# See examples/send_insight.py for full example
import requests
requests.post(
"https://your-app.railway.app/webhook",
headers={"X-API-Key": "your-api-key"},
json={
"type": "llm_conversation_insight",
"version": "1.0",
"timestamp": "2025-11-15T10:30:00Z",
"conversation": {"id": "conv_001", "context": "Planning new features"},
"insight": {
"type": "action_item",
"priority": "high",
"title": "Implement rate limiting",
"content": "Add rate limiting to webhook endpoint",
"tags": ["security"]
},
"metadata": {"llm_model": "claude", "confidence": 0.95}
}
)Review insights with the CLI tool:
python tools/insights_cli.py list --priority high
python tools/insights_cli.py statsSee docs/LLM_INTEGRATION.md for complete guide.
pip install -r requirements.txt
python app.pyServer runs on http://localhost:8000
cd client
pip install -r requirements.txt
export RELAY_SERVER_URL="ws://localhost:8000/ws"
python client.pycurl -X POST http://localhost:8000/webhook \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: ping" \
-d '{"zen": "test", "hook_id": 123}'PORT- Server port (default: 8000)GITHUB_WEBHOOK_SECRET- Webhook signature verification secret (optional but recommended)ENVIRONMENT- Environment indicator (development/production)
RELAY_SERVER_URL- WebSocket URL of relay server (required)- Local:
ws://localhost:8000/ws - Production:
wss://your-app.railway.app/ws
- Local:
Edit client/client.py to add custom logic for different GitHub events:
def handle_webhook(data: dict):
event_type = data.get("event")
payload = data.get("payload")
if event_type == "push":
# Trigger deployment, run tests, etc.
subprocess.run(["./deploy.sh"])
elif event_type == "pull_request":
# Auto-review, generate descriptions, etc.
subprocess.run(["./review-pr.sh", str(payload["number"])])- Real-time webhook delivery to local machine
- Automatic reconnection with retry logic
- Webhook signature verification (HMAC-SHA256)
- Support for multiple simultaneous clients
- Automatic event logging to
webhook_logs/ - Heartbeat mechanism to maintain connections
GitHub Webhooks:
- Trigger local scripts on GitHub events
- Build custom CI/CD pipelines
- Auto-generate PR descriptions/reviews
- Real-time repository activity monitoring
LLM Conversation Insights:
- Capture action items from AI conversations
- Track ideas and decisions automatically
- Organize conversation insights by type and priority
- Review and act on insights via CLI tool
- Integration with AI workflows
- Always use
GITHUB_WEBHOOK_SECRETin production - Use WSS (not WS) for production WebSocket connections
- Logs are stored locally in
webhook_logs/- review .gitignore settings
See SECURITY_SETUP.md for detailed security configuration.
- CONTRIBUTING.md - New engineer onboarding guide
- CLAUDE.md - Architecture details and development patterns (for Claude Code)
- SECURITY_SETUP.md - Security configuration and testing
- docs/deployment/ - Deployment guides and reports
- docs/worklogs/ - Development session logs
- FUTURE_TASKS.md - Roadmap of planned improvements
MIT