An intelligent GitHub issue management system built on Cloudflare's edge computing platform. This AI-powered application automatically analyzes GitHub repositories, categorizes issues, detects duplicates, and provides actionable insights to help development teams prioritize their work effectively.
This is my Cloudflare Assignment for the Cloudflare 2026 Internship.
- Cloudflare AI GitHub Issue Manager
Try it out: Deployed Application
This project fulfills all requirements for the Cloudflare AI Application Assignment:
- LLM Integration: Uses OpenAI GPT-4o-mini for intelligent issue analysis and categorization
- Workflow/Coordination: Multi-worker architecture with service bindings and KV storage
- User Input Interface: Professional Next.js web application with real-time interaction
- Memory/State: KV caching system with 24-hour TTL and persistent frontend state
- Repository Naming: Correctly prefixed with
cf_ai_ - Documentation: Comprehensive README with setup instructions
- Original Work: 100% original implementation with proper attribution
- AI Prompts: Detailed
PROMPTS.mdwith all AI-assisted development prompts
graph TB
A[User Interface<br/>Next.js Frontend] --> B[API Worker<br/>GitHub Integration]
B --> C[AI Worker<br/>OpenAI GPT-4o-mini]
B --> D[KV Storage<br/>Caching Layer]
C --> E[Issue Analysis<br/>Categorization & Prioritization]
E --> B
B --> A
-
Web Frontend (
/web/)- Next.js 15.3.4 with App Router
- shadcn/ui components with Tailwind CSS
- Real-time loading states and error handling
- Responsive design for all devices
- Deployed on Cloudflare pages
-
API Worker (
/api/)- Cloudflare Worker with Hono framework
- GitHub API integration with rate limiting
- Service binding to AI worker
- KV storage for intelligent caching
- Deployed on Cloudflare workers
-
AI Worker (
/ai/)- OpenAI GPT-4o-mini integration
- Intelligent issue categorization and prioritization
- Duplicate detection algorithms
- Implementation order suggestions
- Deoloyed on Cloudflare workers
- Automatic Categorization: Bugs, Features, Enhancements, Chores, Documentation
- Priority Assignment: Critical, High, Medium, Low based on impact analysis
- Duplicate Detection: Identifies similar issues across the repository
- Implementation Ordering: Suggests optimal sequence for issue resolution
- Smart Caching: 24-hour KV cache to reduce API calls and costs
- Batch Processing: Efficient LLM calls with concurrency limits
- Rate Limit Handling: Graceful GitHub API rate limit management
- Edge Computing: Global deployment for minimal latency
- Modern UI: Clean, intuitive interface with loading states
- Real-time Feedback: Instant analysis results with progress indicators
- Error Handling: Comprehensive error messages and recovery options
- Mobile Responsive: Optimized for all screen sizes
- Framework: Next.js 15.3.4 with App Router
- Styling: Tailwind CSS + Lucide React Icons + shadcn/ui components
- HTTP Client: Axios with TypeScript types
- Runtime: Cloudflare Workers
- Framework: Hono for API routing
- AI Integration: OpenAI GPT-4o-mini
- Storage: Cloudflare KV for caching
- Communication: Service bindings between workers
- Language: TypeScript with strict type checking
- Testing: Vitest for unit testing
- Deployment: Wrangler CLI for Cloudflare Workers
- Code Quality: ESLint + Prettier
- Node.js 18+ and npm
- Cloudflare account with Workers enabled
- OpenAI API key
git clone https://github.com/Adedoyin-Emmanuel/cf_ai_github_issue_manager
cd cf_ai_github_issue_manager
# Install dependencies for all services
npm install
cd api && npm install
cd ../ai && npm install
cd ../web && npm installcd ai
wrangler secret put OPENAI_API_KEY
# Enter your OpenAI API key when promptedcd api
# Create KV namespace
wrangler kv:namespace create "REPO_CACHE"
wrangler kv:namespace create "REPO_CACHE" --preview
# Update wrangler.jsonc with the returned namespace IDscd web
# Create .env.local or .env
echo "NEXT_PUBLIC_API_URL=http://localhost:8787/v1" > .env.localStart all services in separate terminals:
# Terminal 1 - Web Frontend
cd web && npm run dev
# Terminal 2 - API Worker
cd api && npm run dev
# Terminal 3 - AI Worker
cd ai && npm run devVisit http://localhost:3000 to see the application.
Deploy in order:
# 1. Deploy AI Worker
cd ai && npm run deploy
# 2. Deploy API Worker (update AI_WORKER_URL in wrangler.jsonc)
cd api && npm run deploy
# 3. Deploy Web Frontend (update NEXT_PUBLIC_API_URL)
cd web && npm run build && npm run start- Enter Repository URL: Paste any public GitHub repository URL
- Analyze Issues: Click "Analyze Issues" to start the AI analysis
- Review Results: View categorized issues with priorities and duplicates
- Take Action: Use the implementation order to prioritize your work
For a repository like facebook/react, the system will:
- Fetch all open issues from the GitHub API
- Categorize each issue (Bug, Feature, Enhancement, etc.)
- Assign priority levels based on impact and urgency
- Identify duplicate or similar issues
- Suggest an optimal implementation order
Analyzes a GitHub repository and returns AI-processed issue insights.
Request:
{
"repoUrl": "https://github.com/owner/repo"
}Response:
{
"success": true,
"repository": {
"name": "repo-name",
"owner": "owner",
"description": "Repository description",
"stars": 1234,
"forks": 567,
"openIssues": 89,
"url": "https://github.com/owner/repo"
},
"issues": [
{
"issue_number": 123,
"title": "Fix critical bug in authentication",
"category": "Bug",
"priority": "Critical",
"duplicates": [124, 125],
"reasoning": "Affects core functionality and has multiple reports",
"implementationOrder": 1
}
],
"timestamp": "2025-01-27T10:30:00.000Z"
}Run the test suite:
# AI Worker tests
cd ai && npm test
# API Worker tests
cd api && npm test- API Keys: Securely stored as Cloudflare secrets
- Rate Limiting: Built-in GitHub API rate limit handling
- CORS: Properly configured for cross-origin requests
- Data Privacy: No user data stored beyond caching requirements
This project is licensed under the MIT License - see the LICENSE file for details.
- Cloudflare Workers for the serverless platform
- OpenAI for the GPT-4o-mini model
- Next.js Team for the excellent React framework
- shadcn/ui for the beautiful component library
For questions or support:
- Open an issue on GitHub
- Check the PROMPTS.md for development context
Built with ❤️ for the Cloudflare AI Application Assignment