Loading...
Loading...
Loading projects...
A Go utility for cleaning unused UI components from React repositories
Autonomous Repository Maintenance and Dead Component Elimination Engine.
GitHub-Cleaner-Go is a production-grade automation tool that systematically traverses GitHub repositories, performs static import analysis on React codebases, identifies and removes unused UI components, validates builds post-cleanup, and commits the results without human intervention.
Built for developers managing large React ecosystems where component bloat accumulates across repositories. The tool functions as an autonomous maintenance agent, reducing technical debt through programmatic dead-code elimination.
---
+------------------------------------------------------------------------------------------+
| GitHub-Cleaner-Go Engine |
+------------------+---------------------------+-------------------------------------------+
| Repository | Static Analysis | Build and Commit |
| Orchestration | Pipeline | Pipeline |
+------------------+---------------------------+-------------------------------------------+
| - GitHub API | - Regex Import Scan | - npm install |
| - SSH Clone | - Source Graph Build | - Production Build |
| - DFS Traversal | - Dead-Component ID | - Git Commit |
| - Concurrent | - File Deletion | - Local Cleanup |
| (5 workers) | | |
+------------------+---------------------------+-------------------------------------------+
| Observability Layer |
| Prometheus Metrics (:2112) + Structured JSON Logging |
+------------------------------------------------------------------------------------------+The system operates as a three-stage pipeline: repository orchestration, static analysis and dead-component elimination, and build verification and commit. Repositories are processed concurrently (up to 5 at a time) via a goroutine pool with channel-based rate limiting.
---
components/ui directory structures..ts, .tsx, .js, .jsx files for import statements referencing components/ui/* components.npm install --legacy-peer-deps && npm run build to verify post-cleanup integrity.slog in JSON format with consistent attribute structure.---