An AI-powered platform for continuous repository health analysis, observability, and proactive developer insights.
CodeHealth-AI is a developer-focused platform that provides deep, automated insights into the health, maintainability, and long-term sustainability of software repositories. The platform combines static code analysis, commit behavior analytics, and AI-driven insights to help developers and teams understand where their codebase stands today and what to improve next.
The system is designed to be continuous, automated, and actionable. Once a repository is connected, CodeHealth-AI continuously re-analyzes the project on every push or pull request, tracks trends over time, and notifies users when important quality thresholds are breached.
- Live Website: [Add Live Website URL Here]
- GitHub Repository: [Add GitHub Repository URL Here]
This project was built and maintained by a two-member team:
- Complete backend architecture and implementation
- Metric design, scoring algorithms, and data modeling
- GitHub integrations, background workers, alerts, and automation
- Complete frontend architecture, implementation, and production deployment
- UI/UX design, interactive dashboards, and data visualizations
- Automated CI/CD pipelines and cross-service integration
- Production environment setup and configuration
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.4.10 | Application framework with App Router |
| React | 19.1.0 | UI component library |
| TypeScript | 5.x | Type-safe development |
| Zustand | 5.0.7 | State management |
| Recharts | 3.5.1 | Line charts and metric graphs |
| D3.js | 7.9.0 | Advanced visualizations (radar, heatmaps) |
| Chart.js | 4.5.1 | Gauge and distribution charts |
| GSAP | 3.13.0 | Animations and transitions |
| Socket.io-client | 4.8.1 | Real-time communication |
| Tailwind CSS | 4.x | Utility-first CSS framework |
| Axios | 1.11.0 | HTTP client |
| Technology | Purpose |
|---|---|
| Node.js + Express | Core API layer |
| Redis | Caching, queues, and real-time metric storage |
| BullMQ | Distributed job queue for async analysis |
| Supabase | Database and authentication support |
| Python + FastAPI | Advanced code analysis engine |
| Socket.io | Real-time bidirectional communication |
The system is deployed across four independent servers, managed via a sophisticated CI/CD pipeline that ensures scalability, isolation, and seamless delivery.
| Service | Platform | Purpose |
|---|---|---|
| Frontend | Vercel | Next.js SSR application with Edge caching |
| Backend API | Heroku | Express.js REST API (horizontally scaled) |
| Background Workers | Heroku | BullMQ job processing (isolated dynos) |
| Python Analysis Server | Heroku | FastAPI code analysis engine |
The transition from a development environment to a distributed production infrastructure required focused engineering efforts to ensure operational excellence.
- Production Hardening: Building upon the robust core architecture, targeted optimizations were implemented to align the system with distributed production constraints.
- Concurrency Management: Fine-tuned database connection pooling and resource limits to handle high-concurrency environments reliably.
- Resilient Processing: Hardened error recovery strategies and configured the asynchronous job processing system to sustain peak analysis loads without failure.
- Performance Tuning: Optimization of the Vercel deployment pipeline to leverage aggressive caching strategies and Edge capabilities.
- SSR Optimization: Enhanced Server-Side Rendering (SSR) configuration to ensure fast First Contentful Paint (FCP) and optimal SEO.
- Unified CI/CD: Integrated workflows that orchestrate seamless deployments across both frontend and backend services, ensuring reliability and professional standards.
Users can sign up or log in using GitHub OAuth or Google OAuth. After authentication, the user is redirected to the Dashboard.
From the dashboard, users can connect their GitHub repositories, select a repository and branch, and initialize analysis. Once initialized, CodeHealth-AI performs a full repository scan.
After initialization, users receive a comprehensive analysis including:
- Overall Code Health Score
- Technical Debt Score
- SLOC (Source Lines of Code)
- Days Active and Commit Activity
- Top Refactoring Targets
This analysis is visualized through interactive dashboards.
The Code Health Score is a composite score (0-100) that represents the overall sustainability of a repository.
It is computed using four weighted dimensions:
| Dimension | Weight |
|---|---|
| Code Quality | 45% |
| Development Activity | 25% |
| Bus Factor | 15% |
| Community | 15% |
The final score is soft-graded into categories:
- Excellent (85+)
- Good (70-84)
- Fair (55-69)
- Needs Improvement (40-54)
- Critical (<40)
Code Quality is calculated using static code analysis metrics aggregated at repository level:
a. Maintainability Index
- Indicates how easy the code is to understand and modify
- Higher values = better maintainability
b. Cyclomatic Complexity
- Measures logical complexity of code paths
- Penalized as complexity increases
c. Technical Debt (Risk Score)
Each file receives a Risk Score based on:
- Cyclomatic Complexity
- Halstead Volume (cognitive load)
- Maintainability Index
- Source Lines of Code (LOC)
Technical Debt represents the average risk score across all files:
- Lower debt = easier future development
- Used to estimate refactoring effort (days), cost impact, and files requiring attention
This score evaluates how actively and consistently the repository is being developed.
Measured using:
- Commits in last 30 days (logarithmic scaling)
- Average commits per day
- Active days ratio
- Consistency score
Velocity trends: Increasing, Stable, Decreasing, or Insufficient data
Bus Factor measures knowledge concentration risk.
Risk levels:
- Low: Healthy contributor distribution
- Medium: Few dominant contributors
- High: Project depends heavily on one contributor
Community reflects external adoption and engagement:
- GitHub Stars
- Forks
- Watchers
Metrics are logarithmically scaled to avoid bias toward large projects.
The Observability Tab provides continuous monitoring:
- Code Health Score over time
- Code Quality Score over time
- Push and Pull activity metrics
- Pull request velocity and throughput
- Reviewer performance tracking
- Activity heatmaps
- Stale PR identification
- Custom alert rule configuration
This allows users to track trends, not just snapshots.
CodeHealth-AI is fully automated:
- Every push or pull request triggers a background job
- Repository is re-analyzed
- Metrics are recalculated
- Dashboards update in real time
This ensures insights are always up-to-date.
Users can configure custom alerts:
- Select a metric (e.g., Code Health Score)
- Define a threshold and operator
When an activity causes the metric to breach the threshold:
- In-app notification is triggered
- Email notification is sent
This enables proactive quality control instead of reactive debugging.
In addition to raw metrics, the platform provides AI-generated insights:
- Human-readable summaries of repository state
- Explanations of risks and strengths
- Actionable recommendations for improvement
- Code smell detection and categorization
- Quick wins with estimated effort
- Architectural recommendations
These insights help developers understand why a score changed and decide what to refactor next.
For decision-makers, CodeHealth-AI generates:
- Key strengths
- Areas for improvement
- Overall bottom-line recommendation
This makes the platform suitable for individual developers, development teams, and technical leads.
CodeHealth-AI bridges the gap between raw static analysis tools and actionable engineering insights. By combining continuous analysis, observability, AI explanations, and alerting, it helps developers maintain healthy, scalable, and sustainable codebases over time.
The platform is designed to grow with the repository, providing value from early-stage projects to mature codebases.
Built by Kalash Thakare and Jayesh Rajbhar