How omi1739/github-project-intelligence works
GPI is a browser-only GitHub repository intelligence extension. A user opens a GitHub repo and starts analysis from the page or side panel; the side panel resolves the repository, the analysis service collects repository data, builds a deterministic multi-domain report, caches it locally, and renders report sections. Options configure the GitHub token and cache, while the documented AI provider layer is optional and currently hidden in the UI. Some wiring is documented rather than excerpted, so unverified links are omitted.
Main entry points: index.ts Report builder · analysis.ts Analysis orchestration · App.tsx Side panel app · github.ts GitHub collector
Components 24
Extension entry
- Repo page detector
src/content/github-detector.ts - Extension worker
src/background/service-worker.ts
Repository collection
- Analysis orchestration
src/services/analysis.ts - GitHub collector
src/services/github.ts - Local settings and cache
src/services/storage.ts
Analysis engine
- Report builder
src/analyzers/index.ts - Stack detection
src/analyzers/stack.ts - Structure inference
src/analyzers/structure.ts - Dependency analysis
src/analyzers/dependencies.ts - Testing analysis
src/analyzers/testing.ts - Security signals
src/analyzers/security.ts - Code quality
src/analyzers/quality.ts - README analysis
src/analyzers/readme.ts - Activity and overview
src/analyzers/activity.ts - Health scoring
src/analyzers/health.ts - Manifest parsing
src/utils/manifest.ts
Report interface
- Side panel app
src/sidepanel/App.tsx - Report sections
src/sidepanel/components/sections
Settings and AI
- Options interface
src/options/OptionsApp.tsx - Optional AI providers
src/services/ai.ts - Secret redaction
src/utils/redact.ts
Other components
- Repository user
- GitHub repository
- GitHub API
Connections 25
- Repository user → Repo page detector: opens repo page
README.md - Repo page detector → GitHub repository: detects repo page
README.md - Repository user → Side panel app: opens side panel
README.md - Side panel app → Analysis orchestration: requests analysis
src/sidepanel/App.tsx - Side panel app → Analysis orchestration: loads cached report
src/sidepanel/App.tsx - Analysis orchestration → GitHub collector: collects repository data
src/services/analysis.ts - GitHub collector → GitHub API: requests repository data
README.md - GitHub collector → GitHub repository: fetches raw files
README.md - Analysis orchestration → Local settings and cache: reads and writes cache
src/services/analysis.ts - Analysis orchestration → Report builder: builds report
src/services/analysis.ts - Report builder → Stack detection: runs detection
src/analyzers/index.ts - Report builder → Structure inference: runs analysis
src/analyzers/index.ts - Report builder → Dependency analysis: runs analysis
src/analyzers/index.ts - Report builder → Testing analysis: runs analysis
src/analyzers/index.ts - Report builder → Security signals: runs analysis
src/analyzers/index.ts - Report builder → Code quality: runs analysis
src/analyzers/index.ts - Report builder → README analysis: runs analysis
src/analyzers/index.ts - Report builder → Activity and overview: builds overview
src/analyzers/index.ts - Report builder → Health scoring: calculates score
src/analyzers/index.ts - Stack detection → Manifest parsing: parses dependencies
src/analyzers/stack.ts - Side panel app → Report sections: renders report
src/sidepanel/App.tsx - Repository user → Options interface: configures extension
README.md - Options interface → Local settings and cache: loads and saves settings
src/options/OptionsApp.tsx - Optional AI providers → Secret redaction: redacts secrets
src/services/ai.ts - Report builder → Optional AI providers: can summarize report
README.md