GitLeads is an open-source web app for finding relevant GitHub contributors from a natural-language prompt, enriching lead data, and sending outreach through Gmail.
- Prompt-based GitHub lead generation
- GitHub OAuth authentication with per-user access token search
- MCP-backed repository discovery (
mcp-use+@modelcontextprotocol/server-github) - Contributor profiling from GitHub users and commit metadata
- Optional Apollo enrichment for additional contact data
- Optional Gemini prompt analysis for better repo/query targeting
- Gmail OAuth + send workflow for outreach
- Admin users dashboard backed by DynamoDB
- User enters a campaign prompt.
- App authenticates with GitHub (if not already signed in).
- Backend builds one or more GitHub repository search queries.
- Repositories are discovered through MCP, then GitHub REST fallback if needed.
- Top contributors are collected and enriched into outreach-ready leads.
- User selects leads and sends email outreach from connected Gmail.
- Next.js App Router
- TypeScript
- NextAuth (GitHub OAuth)
- MCP (
mcp-use, GitHub MCP server) - GitHub REST API
- Optional Gemini API
- Optional Apollo API
- Gmail OAuth + Gmail API
- Optional DynamoDB persistence for admin analytics
app/ Next.js app routes and API routes
components/ Client UI components
lib/ Campaign, auth, integrations, and helpers
public/ Static assets
scripts/ Deployment and utility scripts
types/ Shared TypeScript declarations
- Node.js 20+
- npm 10+
- A GitHub OAuth app
- (Optional) Google OAuth app for Gmail outreach
- (Optional) Apollo API key
- (Optional) Gemini API key
- (Optional) AWS credentials + DynamoDB table for
/users
- Install dependencies.
npm install- Copy environment template.
cp .env.example .env.local-
Fill required variables in
.env.local. -
Run local dev server.
npm run dev- Open http://localhost:3000.
Required for core app auth:
| Variable | Required | Description |
|---|---|---|
AUTH_SECRET |
Yes | Secret used by NextAuth/session crypto |
NEXTAUTH_URL |
Yes | Base URL for auth callbacks |
GITHUB_CLIENT_ID |
Yes | GitHub OAuth app client ID |
GITHUB_CLIENT_SECRET |
Yes | GitHub OAuth app client secret |
Required only for Gmail outreach:
| Variable | Required | Description |
|---|---|---|
GOOGLE_CLIENT_ID |
For Gmail | Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
For Gmail | Google OAuth client secret |
Optional integrations:
| Variable | Required | Description |
|---|---|---|
APOLLO_API_KEY |
No | Enables Apollo enrichment |
GEMINI_API_KEY |
No | Enables Gemini query analysis |
GMAIL_MCP_SERVER_URL |
No | Uses external Gmail MCP endpoint before Gmail API fallback |
Optional admin dashboard persistence:
| Variable | Required | Description |
|---|---|---|
USER_REGISTRY_TABLE |
For /users |
DynamoDB table name for login analytics |
AWS_REGION |
For /users |
AWS region |
AWS_ACCESS_KEY_ID |
For /users |
AWS access key |
AWS_SECRET_ACCESS_KEY |
For /users |
AWS secret key |
npm run dev- start development servernpm run build- build production bundlenpm run start- start production servernpm run lint- run ESLint
POST /api/campaigns/start- generate campaign + leads from promptPOST /api/outreach/send- send outreach to selected recipientsGET /api/gmail/status- read Gmail connection statusGET /api/gmail/connect- start Gmail OAuth flowGET /api/gmail/callback- handle Gmail OAuth callbackPOST /api/gmail/disconnect- clear Gmail connectionGET /api/admin/users- admin analytics endpoint
This app is Vercel-ready.
vercel link
vercel env add
vercel --prodIf you use AWS Secrets Manager, you can sync env vars with:
./scripts/sync-secrets-to-vercel.sh <secret-id> production- Never commit
.env.localor real credentials. - Use least-privilege OAuth scopes where possible.
- Rotate API keys/tokens if exposed.
- Treat GitHub search limits as a production reliability concern and add backoff/429 handling.
- Fork the repo.
- Create a feature branch.
- Make changes with tests/lint passing.
- Open a pull request with a clear summary and screenshots for UI changes.
Choose and add a license file before publishing (MIT is common for this type of project).