- GitHub Account with organization (for verified publisher status)
- Domain name for your application (e.g.,
codxcd.com) - Hosting platform (Vercel, Netlify, Railway, or custom server)
- Database (PostgreSQL recommended for production)
- Go to GitHub Settings > Developer settings > GitHub Apps
- Click "New GitHub App"
- Use these settings:
Name: CodXCD DevOps Copilot
Homepage URL: https://your-domain.com
Webhook URL: https://your-domain.com/api/webhooks
Callback URL: https://your-domain.com/auth/callbackPermissions:
- Repository: Contents (Read), Issues (Write), Pull requests (Write), Checks (Write)
- Organization: Members (Read)
- Account: Email addresses (Read)
Events:
- installation, installation_repositories
- marketplace_purchase
- issues, issue_comment
- pull_request, pull_request_review
- workflow_run, check_run, check_suite
- deployment, deployment_status
- repository_vulnerability_alert
-
Connect GitHub Repository:
# Push your code to GitHub git add . git commit -m "Initial CodXCD implementation" git push origin main
-
Deploy to Vercel:
- Go to vercel.com
- Import your GitHub repository
- Configure environment variables (see below)
- Deploy
-
Configure Environment Variables:
GITHUB_APP_ID=your_app_id GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..." GITHUB_WEBHOOK_SECRET=your_webhook_secret GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_SECRET=your_client_secret DATABASE_URL=postgresql://... JWT_SECRET=your_jwt_secret NODE_ENV=production FRONTEND_URL=https://your-domain.vercel.app
-
Connect Repository:
# Install Railway CLI npm install -g @railway/cli # Login and deploy railway login railway link railway up
-
Set Environment Variables:
railway variables set GITHUB_APP_ID=your_app_id railway variables set GITHUB_PRIVATE_KEY="your_private_key" # ... add all other variables
-
Build Docker Image:
docker build -t codxcd . docker tag codxcd your-registry/codxcd:latest docker push your-registry/codxcd:latest -
Deploy with Docker Compose:
version: '3.8' services: app: image: your-registry/codxcd:latest ports: - "3001:3001" environment: - GITHUB_APP_ID=${GITHUB_APP_ID} - GITHUB_PRIVATE_KEY=${GITHUB_PRIVATE_KEY} - DATABASE_URL=${DATABASE_URL} depends_on: - postgres postgres: image: postgres:15 environment: POSTGRES_DB: codxcd POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD} volumes: - postgres_data:/var/lib/postgresql/data volumes: postgres_data:
-
Update GitHub App Settings:
- Webhook URL:
https://your-domain.com/api/webhooks - Homepage URL:
https://your-domain.com - Callback URL:
https://your-domain.com/auth/callback
- Webhook URL:
-
Generate Private Key:
- Download the private key from GitHub App settings
- Convert to single line:
cat private-key.pem | tr '\n' '\\n' - Add to environment variables
-
Test Webhook Delivery:
- Install the app on a test repository
- Check webhook deliveries in GitHub App settings
- Verify logs show successful processing
-
Submit Copilot Extension Application:
- Go to GitHub Copilot Extensions (when available)
- Register your app as a Copilot Extension
- Provide endpoint:
https://your-domain.com/api/copilot
-
Test Copilot Integration:
@codxcd What can you do? @codxcd Start timer for issue #123 @codxcd Check security alerts
-
Create Marketing Assets:
- High-resolution logo (512x512px)
- Feature screenshots
- Demo videos (private YouTube links)
-
Set Up Pricing Plans:
- Free: Basic features, 3 repositories
- Pro: $29/user/month, unlimited features
-
Submit to GitHub Marketplace:
- Complete marketplace application
- Provide all required documentation
- Wait for GitHub review (typically 1-2 weeks)
-
Set Up Monitoring:
# Health check endpoint curl https://your-domain.com/health # Monitor logs tail -f logs/combined.log
-
Update Dependencies:
npm audit npm update
-
Backup Database:
pg_dump $DATABASE_URL > backup.sql
-
Webhook Delivery Failures:
- Check webhook URL is accessible
- Verify webhook secret matches
- Ensure HTTPS is properly configured
-
Copilot Extension Not Responding:
- Verify endpoint is registered correctly
- Check server logs for errors
- Test with curl:
curl -X POST https://your-domain.com/api/copilot/chat
-
Database Connection Issues:
- Verify DATABASE_URL format
- Check database server is running
- Ensure proper SSL configuration
- GitHub App Documentation: https://docs.github.com/en/apps
- Copilot Extensions: https://docs.github.com/en/copilot/building-copilot-extensions
- Marketplace Guidelines: https://docs.github.com/en/apps/github-marketplace
- Environment variables are properly secured
- GitHub App private key is encrypted
- Webhook signatures are verified
- Database connections use SSL
- Rate limiting is implemented
- Input validation is in place
- Error messages don't leak sensitive data
- Logs don't contain secrets
- Enable gzip compression
- Implement caching for GitHub API calls
- Use connection pooling for database
- Set up CDN for static assets
- Monitor response times
- Implement graceful shutdowns
Your CodXCD bot is now ready for production deployment! 🚀