A comprehensive React application for analyzing GitHub repositories with AI-powered natural language search capabilities. Built with React, Material-UI, and LangChain for an enhanced developer experience. Now fully containerized with Docker for easy deployment.
- URL Search: Direct repository analysis via GitHub URLs
- Natural Language Search: AI-powered repository discovery using plain English descriptions
- Repository statistics and metadata
- Contributor analysis with activity metrics
- Programming language breakdown with visual charts
- Commit activity patterns over time
- Issue analytics (open/closed/resolution times)
- Weekly commit activity visualization
- Search History: Automatic saving and quick access to previously analyzed repositories
- Bookmarks: Save favorite repositories for later analysis
- Export Functionality: Download analysis results in JSON/CSV formats
- Local Storage: All data persisted locally for privacy
- Dark/Light Theme: Toggle between themes with system preference detection
- Loading Skeletons: Professional loading states during data fetching
- Responsive Design: Works seamlessly on desktop and mobile devices
- Error Handling: Graceful error recovery with helpful messages
- Public API Mode: 60 requests per hour (no authentication required)
- Private API Mode: 5,000 requests per hour (requires GitHub personal access token)
- API Key Management: Easy-to-use interface for adding/removing API keys
- Rate Limit Monitoring: Real-time tracking of API usage and remaining requests
- Status Indicator: Visual display of current API mode and limits
├── Frontend (React + Material-UI)
│ ├── URL Search Mode (Direct GitHub API)
│ └── Natural Language Mode (Backend API)
├── Backend (Express + LangChain)
│ ├── OpenAI GPT-4o-mini for processing
│ └── Tavily Search for repository discovery
├── Data Storage (localStorage)
└── Docker Container (Production Ready)
- Clone the Repository
git clone <repository-url>
cd GithubRepoAnalyzer- Configure Environment Variables
cp server/.env.example server/.envEdit server/.env with your API keys:
OPENAI_API_KEY=your_openai_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
PORT=3001- Build and Run with Docker
# Build the Docker image
docker build -t github-analyzer .
# Run the container
docker run -p 3000:3000 -p 3001:3001 --env-file server/.env github-analyzer- Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Node.js (v16 or higher)
- npm or yarn
# Install dependencies
npm run install-all
# Start development mode
npm run devVisit http://localhost:3000 and use URL Search mode for immediate repository analysis.
# Build development image
docker build -t github-analyzer:dev .
# Run with volume mounting for development
docker run -p 3000:3000 -p 3001:3001 \
-v $(pwd)/src:/app/src \
-v $(pwd)/server:/app/server \
--env-file server/.env \
github-analyzer:dev# Build production image
docker build -t github-analyzer:prod --target production .
# Run production container
docker run -d -p 3000:3000 -p 3001:3001 \
--name github-analyzer \
--env-file server/.env \
github-analyzer:prod# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Select "URL Search" toggle
- Paste any GitHub repository URL
- Click "Analyze Repository"
- View comprehensive analytics
Example URLs:
https://github.com/facebook/reacthttps://github.com/microsoft/vscodegithub.com/nodejs/node(also works)
- Select "Natural Language" toggle
- Describe the type of repository you're looking for
- Click "Search Repositories"
- Browse AI-curated results and select one to analyze
Example Queries:
- "React dashboard with charts and tables"
- "Python machine learning library for beginners"
- "Node.js REST API with authentication"
- "Vue.js e-commerce application template"
- Repository Overview: Stars, forks, language, license
- Statistics: Issues, contributors, creation date, last update
- Language Breakdown: Visual pie chart of code distribution
- Contributors: Top contributors with commit counts
- Commit Activity: Weekly commit patterns over time
- Issue Analysis: Open/closed issues, resolution times, top contributors
- History Icon (🕒): Access previously analyzed repositories
- Bookmark Icon (🔖): Save repositories to favorites
- Export Button: Download analysis as JSON or CSV
- Search Results: Click any result to analyze that repository
# Local Development
npm start # Start React development server
npm run build # Build for production
npm test # Run tests
npm run server # Start backend server
npm run server-dev # Start backend with auto-reload
npm run dev # Start both frontend and backend
npm run install-all # Install all dependencies
npm run check-env # Verify API configuration
# Docker Development
docker build -t github-analyzer . # Build image
docker run -p 3000:3000 -p 3001:3001 github-analyzer # Run containerGithubRepoAnalyzer/
├── src/
│ ├── components/ # React components
│ │ ├── MainAnalyzer.js # Main search interface
│ │ ├── RepoCard.js # Repository overview
│ │ ├── RepoStatistics.js # Statistics display
│ │ ├── LanguageChart.js # Language breakdown
│ │ ├── ContributorsList.js # Contributors analysis
│ │ ├── CommitActivityChart.js # Commit patterns
│ │ ├── IssueAnalytics.js # Issue analysis
│ │ ├── SearchHistory.js # Search history dialog
│ │ ├── BookmarksList.js # Bookmarks management
│ │ ├── ExportButton.js # Data export functionality
│ │ └── Skeleton.js # Loading components
│ ├── services/ # API services
│ │ ├── githubService.js # GitHub API integration
│ │ └── agentService.js # AI search service
│ ├── utils/ # Utility functions
│ │ ├── storage.js # Local storage management
│ │ ├── exportUtils.js # Data export utilities
│ │ └── errorHandler.js # Error handling
│ └── contexts/ # React contexts
│ └── ThemeContext.js # Theme management
├── server/ # Backend API
│ ├── agent-server.js # Express server with AI
│ ├── package.json # Backend dependencies
│ └── .env # API keys (not committed)
├── public/ # Static assets
├── Dockerfile # Docker container configuration
├── .dockerignore # Docker ignore patterns
├── windsurf_deployment.yaml # Deployment configuration
└── package.json # Frontend dependencies
OPENAI_API_KEY=your_openai_api_key # Required for AI search
TAVILY_API_KEY=your_tavily_api_key # Required for AI search
PORT=3001 # Backend server port
NODE_ENV=production # Environment mode# Pass environment variables to container
docker run -p 3000:3000 -p 3001:3001 \
-e OPENAI_API_KEY=your_key \
-e TAVILY_API_KEY=your_key \
github-analyzer-
OpenAI API Key:
- Visit OpenAI Platform
- Create account and generate API key
- Ensure you have credits available
-
Tavily Search API Key:
- Visit Tavily
- Sign up for free account
- Get API key from dashboard
- Cause: Missing environment variables or port conflicts
- Solution:
# Check container logs docker logs <container-id> # Verify environment file cat server/.env # Check port availability netstat -tulpn | grep :3000
- Cause: Backend service not accessible within container
- Solution:
# Check if both ports are exposed docker run -p 3000:3000 -p 3001:3001 github-analyzer # Test backend health curl http://localhost:3001/health
- Cause: API keys not properly passed to container
- Solution:
# Check environment variables in container docker exec <container-id> env | grep API_KEY # Restart with explicit env vars docker run -e OPENAI_API_KEY=your_key -e TAVILY_API_KEY=your_key github-analyzer
- Cause: Backend server not started
- Solution: Run
npm run server-devin separate terminal
- Cause: Backend not accessible on port 3001
- Solution: Ensure backend is running and port 3001 is available
- Cause: API rate limits reached
- Solution:
- OpenAI: Check billing and usage limits
- GitHub: Wait for rate limit reset or add GitHub token
- Tavily: Check free tier limits
- Check Docker Container Health:
docker ps # List running containers
docker logs <container-id> # Check container logs
docker exec -it <container-id> bash # Access container shell- Verify API Configuration:
# In container
docker exec <container-id> cat /app/server/.env
# Local development
npm run check-env- Test Backend Health:
# Docker
curl http://localhost:3001/health
# Local
curl http://localhost:3001/health# Build the Docker image with correct platform for deployment (Render compatibility)
docker build --platform linux/amd64 -t github-repo-analyzer .
# Tag the image for Docker Hub (replace 'username' with your Docker Hub username here for example username is aniket024)
docker tag github-repo-analyzer:latest aniket024/github-repo-analyzer1:latest
docker tag github-repo-analyzer:latest aniket024/github-repo-analyzer1:v1.9
# Login to Docker Hub (if not already logged in)
docker login
# Push to Docker Hub
docker push aniket024/github-repo-analyzer1:latest
docker push aniket024/github-repo-analyzer1:v1.9# Pull the latest image from Docker Hub
docker pull aniket024/github-repo-analyzer1:latest
# Run the container
docker run -d -p 3000:3000 -p 3001:3001 \
--name github-analyzer \
--env-file server/.env \
aniket024/github-repo-analyzer1:latest# Tag for registry
docker tag github-analyzer:latest your-registry/github-analyzer:latest
# Push to registry
docker push your-registry/github-analyzer:latest# Deploy to cloud platform (example for generic cloud)
docker run -d -p 80:3000 -p 3001:3001 \
--name github-analyzer-prod \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
-e TAVILY_API_KEY=$TAVILY_API_KEY \
your-registry/github-analyzer:latest- Set all required API keys in your hosting platform
- Configure health checks on ports 3000 and 3001
- Set up SSL termination for HTTPS
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Make changes and test locally:
npm run dev # Local testing docker build -t github-analyzer:test . # Docker testing
- Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub API for repository data
- OpenAI for AI-powered search capabilities
- Tavily for web search functionality
- Material-UI for the beautiful component library
- Chart.js for data visualizations
- LangChain for AI agent framework
- Docker for containerization
If you encounter any issues:
- Check the Troubleshooting section
- Review Docker logs:
docker logs <container-id> - Search existing GitHub Issues
- Create a new issue with:
- Operating system and Docker version
- Container logs and error messages
- Steps to reproduce the problem
- Environment variables (without sensitive values)
Quick Commands Reference:
# Docker Quick Start
docker build -t github-analyzer . && docker run -p 3000:3000 -p 3001:3001 --env-file server/.env github-analyzer
# Local Quick Start
npm run install-all && npm run dev
# Health Check
curl http://localhost:3001/health