How sun-flat-yamada/github-copilot-dashboard works
This is a GitHub Copilot usage and cost analytics platform. Its principal workflow collects GitHub metrics, seat and cost-center data, enriches and aggregates them into date-scoped outputs, persists those outputs on an isolated data branch, then loads and filters them in a browser dashboard. Distinct product stages include CSV report import, billing reconciliation and month-close, data-quality and seat audits, and dashboard analysis such as budgets, trends, adoption, and idle-seat savings. The graph reflects README-documented capabilities where implementation files were not sampled; those links are cited to the README.
Main entry points: PipelineOrchestrator.ts Pipeline Orchestrator · App.tsx Dashboard App · useDashboardData.ts Dashboard Data Hook · fork-safe-storage.ts Fork-Safe Data Store
Components 23
Collection & Enrichment
- GitHub API Adapter
src/adapters/github-api/GitHubApiCopilotDataSource.ts - Raw API Fetcher
src/adapters/github-api/RawApiFetcher.ts - Attribute Resolution
src/collector/attribute-resolver.ts
Analytics & Finance
- Pipeline Orchestrator
src/application/pipeline/PipelineOrchestrator.ts - Metrics Aggregation
src/processor/metrics-aggregator.ts - Report Import
src/processor/report-parser.ts - Finance & Audits
src/application/pipeline - Report Generation
src/processor/report-engine.ts
Data Persistence
- Storage Writer
src/adapters/storage/ForkSafeStorageWriter.ts - Fork-Safe Data Store
src/storage/fork-safe-storage.ts
Dashboard & Analysis
- Dashboard App
dashboard/src/App.tsx - Dashboard Data Hook
dashboard/src/hooks/useDashboardData.ts - Dataset Loader
dashboard/src/dataset/datasetLoader.ts - Query Entry
dashboard/src/query/queryEngine.ts - Filter Engine
dashboard/src/query/filterEngine.ts - Analysis Views
dashboard/src/views
Domain Contracts
- Usage Data Contracts
src/domain/entities/copilot.ts - Pricing Catalog
src/domain/pricing/pricing-catalog.ts - Metric Registry
src/domain/metrics/metric-registry.ts
Other components
- GitHub Copilot API
- Scheduled Collection
- Mapping Secrets
- Dashboard User
Connections 23
- GitHub Copilot API → Scheduled Collection: supplies API data
README.md - Mapping Secrets → Scheduled Collection: injects mapping
README.md - Scheduled Collection → GitHub API Adapter: starts collection
- GitHub API Adapter → Raw API Fetcher: fetches through
- Pipeline Orchestrator → Attribute Resolution: resolves attributes
src/application/pipeline/PipelineOrchestrator.ts - Pipeline Orchestrator → Metrics Aggregation: aggregates metrics
src/application/pipeline/PipelineOrchestrator.ts - Pipeline Orchestrator → Report Import: parses reports
src/application/pipeline/PipelineOrchestrator.ts - Pipeline Orchestrator → Finance & Audits: runs stages
src/application/pipeline/PipelineOrchestrator.ts - Pipeline Orchestrator → Storage Writer: persists results
src/application/pipeline/PipelineOrchestrator.ts - Report Generation → Metric Registry: qualifies metrics
src/processor/report-engine.ts - Storage Writer → Fork-Safe Data Store: delegates storage
src/adapters/storage/ForkSafeStorageWriter.ts - Scheduled Collection → Fork-Safe Data Store: writes data branch
README.md - Fork-Safe Data Store → Dashboard App: supplies dashboard data
README.md - Dashboard User → Dashboard App: uses dashboard
README.md - Dashboard App → Dashboard Data Hook: loads dashboard data
dashboard/src/App.tsx - Dashboard Data Hook → Dataset Loader: loads datasets
dashboard/src/hooks/useDashboardData.ts - Dashboard Data Hook → Query Entry: queries datasets
dashboard/src/hooks/useDashboardData.ts - Query Entry → Filter Engine: delegates filtering
dashboard/src/query/queryEngine.ts - Dashboard App → Analysis Views: hosts analysis views
dashboard/src/App.tsx - Pipeline Orchestrator → Usage Data Contracts: processes usage data
src/application/pipeline/PipelineOrchestrator.ts - Report Generation → Pricing Catalog: uses pricing rules
- Dashboard User → Finance & Audits: reviews audits
README.md - Dashboard User → Analysis Views: explores analytics
README.md