|
1 | 1 | # GitHub Reports Visualizer |
2 | 2 |
|
3 | | -A powerful web application for visualizing and analyzing GitHub billing reports with interactive charts, advanced filtering, and comprehensive service breakdowns. **All data processing happens client-side in your browser** - your billing data never leaves your machine. |
| 3 | +Visualize GitHub billing reports with interactive charts and filters. Upload your CSV billing data and explore usage across Actions minutes, storage, packages, and Copilot. |
4 | 4 |
|
5 | | -## 🎯 Overview |
| 5 | +**Privacy first**: All data processing happens in your browser. Nothing is uploaded to any server. |
6 | 6 |
|
7 | | -The GitHub Reports Visualizer transforms complex GitHub billing CSV data into intuitive, interactive visualizations. Built with Next.js 15 and TypeScript, it provides deep insights into GitHub Actions, Packages, Storage, Copilot, and Codespaces usage across organizations, repositories, and cost centers. |
| 7 | +## Features |
8 | 8 |
|
9 | | -**🔒 Privacy First**: All CSV processing is done entirely in your browser. No data is uploaded to any server, ensuring your sensitive billing information remains completely private. |
| 9 | +- Filter by date range, organization, repository, and cost center |
| 10 | +- Toggle between cost ($) and usage volume views |
| 11 | +- Switch storage units between GB-hours and GB-months |
| 12 | +- View breakdowns by repository and organization |
| 13 | +- All processing happens client-side - your data stays private |
10 | 14 |
|
11 | | -## ✨ Key Features |
12 | | - |
13 | | -### 📊 Service-Based Analysis |
14 | | - |
15 | | -- **Actions Minutes**: Track workflow execution time with repository-based breakdowns |
16 | | -- **Actions Storage**: Monitor artifact and cache storage usage |
17 | | -- **GitHub Packages**: Analyze package hosting costs and usage |
18 | | -- **GitHub Copilot**: Visualize user engagement and costs |
19 | | -- **Codespaces**: Monitor development environment usage |
20 | | - |
21 | | -### 🔍 Advanced Filtering |
22 | | - |
23 | | -- **Date Range**: Filter data by custom date ranges with min/max bounds |
24 | | -- **Organization**: Multi-organization support with breakdown views |
25 | | -- **Cost Center**: Analyze costs by business units |
26 | | -- **Repository**: Smart repository filtering - shows all repos by default, automatically filters by selected organization |
27 | | -- **Cost vs Quantity**: Toggle between cost analysis ($) and usage volume for Actions, Storage, and Packages |
28 | | -- **Storage Units**: Switch between GB-Hours and GB-Months for storage-related services (Actions Storage, Packages) |
29 | | - |
30 | | -### 📈 Interactive Visualizations |
31 | | - |
32 | | -- **Stacked Bar Charts**: Complete historical daily trends with repository/organization breakdowns (no artificial date limits) |
33 | | -- **Pie Charts**: Service distribution and repository analysis with Top 10 + Others grouping |
34 | | -- **Area Charts**: Time-series cost and usage trends across entire dataset |
35 | | -- **Summary Cards**: Key metrics and totals at a glance with formatted values |
36 | | - |
37 | | -### 🎨 Smart Chart Modes |
38 | | - |
39 | | -- **Repository-Specific Views**: Focused analysis when filtering by repository |
40 | | -- **Organization Breakdowns**: Stacked charts when multiple organizations are present |
41 | | -- **Top 10 + Others**: Automatic grouping of less significant items |
42 | | -- **Dynamic Breakdown**: Switch between cost and usage metrics instantly |
43 | | - |
44 | | -## 🛠️ Technology Stack |
45 | | - |
46 | | -- **Framework**: Next.js 15.5.2 with App Router and Turbopack |
47 | | -- **Language**: TypeScript 5 |
48 | | -- **UI**: React 19 with Tailwind CSS |
49 | | -- **Charts**: Recharts 2.14.1 |
50 | | -- **Icons**: Lucide React |
51 | | -- **Data Processing**: Client-side CSV parsing with flexible column detection |
52 | | -- **Styling**: Tailwind CSS with custom dark theme components |
53 | | -- **Deployment**: Static export for GitHub Pages |
54 | | - |
55 | | -## 🚀 Getting Started |
| 15 | +## Running Locally |
56 | 16 |
|
57 | 17 | ### Prerequisites |
58 | 18 |
|
59 | | -- Node.js 18+ installed on your machine |
60 | | -- A GitHub billing report CSV file |
| 19 | +- Node.js 20 or higher |
61 | 20 |
|
62 | | -### Installation |
| 21 | +### Setup |
63 | 22 |
|
64 | | -1. **Clone the repository** |
| 23 | +1. Clone the repository: |
65 | 24 |
|
66 | 25 | ```bash |
67 | 26 | git clone https://github.com/wechuli/githubreportsvisualizer.git |
68 | 27 | cd githubreportsvisualizer |
69 | 28 | ``` |
70 | 29 |
|
71 | | -2. **Install dependencies** |
| 30 | +2. Install dependencies: |
72 | 31 |
|
73 | 32 | ```bash |
74 | 33 | npm install |
75 | | - # or |
76 | | - yarn install |
77 | | - # or |
78 | | - pnpm install |
79 | 34 | ``` |
80 | 35 |
|
81 | | -3. **Start the development server** |
| 36 | +3. Start the development server: |
82 | 37 |
|
83 | 38 | ```bash |
84 | 39 | npm run dev |
85 | | - # or |
86 | | - yarn dev |
87 | | - # or |
88 | | - pnpm dev |
89 | 40 | ``` |
90 | 41 |
|
91 | | -4. **Open the application** |
92 | | - |
93 | | - Navigate to [http://localhost:3000](http://localhost:3000) in your browser |
94 | | - |
95 | | -### Building for Production |
96 | | - |
97 | | -```bash |
98 | | -# Build the application |
99 | | -npm run build |
100 | | - |
101 | | -# Start the production server |
102 | | -npm run start |
103 | | -``` |
104 | | - |
105 | | -## 📁 CSV File Format |
106 | | - |
107 | | -The application automatically detects and parses GitHub billing CSV files with flexible column name matching: |
108 | | - |
109 | | -### Required Columns |
110 | | - |
111 | | -- **Date**: Usage date (flexible: `date`, `usage_date`, `billing_date`) |
112 | | -- **Product**: GitHub service (flexible: `product`, `service`, `service_type`) |
113 | | -- **SKU**: Specific service SKU identifier |
114 | | -- **Quantity**: Usage amount (flexible: `quantity`, `usage_quantity`, `units`) |
115 | | - |
116 | | -### Optional Columns (Enhance filtering and analysis) |
117 | | - |
118 | | -- **Price/Cost**: Cost per unit (flexible: `price_per_unit`, `unit_price`, `cost`, `applied_cost_per_quantity`) |
119 | | -- **Repository**: Repository identifier (flexible: `repository`, `repo`, `repository_name`, `repository slug`) |
120 | | -- **Organization**: GitHub organization (flexible: `organization`, `org`, `owner`, `account`) |
121 | | -- **Cost Center**: Business unit (flexible: `cost_center`, `costcenter`, `cost_centre`, `cost_center_name`) |
122 | | -- **Multiplier**: Pricing multiplier (flexible: `multiplier`, `pricing_multiplier`) |
123 | | - |
124 | | -The parser automatically detects column names in various formats, making it compatible with different GitHub billing export formats. |
125 | | - |
126 | | -## 🎮 How to Use |
127 | | - |
128 | | -1. **Upload Your Data**: Drag and drop or click to select your GitHub billing CSV file |
129 | | -2. **Watch Processing**: Real-time progress bar shows parsing status with row counts |
130 | | -3. **Explore Services**: Navigate between Actions Minutes, Actions Storage, Packages, Copilot, and Codespaces tabs |
131 | | -4. **Apply Filters**: |
132 | | - - Adjust date range to focus on specific time periods |
133 | | - - Select organization to filter by org (repository list updates automatically) |
134 | | - - Choose repository to see repo-specific analysis |
135 | | - - Filter by cost center for business unit insights |
136 | | -5. **Toggle Breakdown**: Switch between Cost ($) and Usage Volume views for Actions, Storage, and Packages |
137 | | -6. **Choose Storage Units**: For storage services (Actions Storage, Packages), toggle between GB-Hours and GB-Months (1 month ≈ 730 hours) |
138 | | -7. **Analyze Trends**: View complete historical data with no date limitations |
139 | | -8. **Export Insights**: All charts and data remain in your browser for analysis |
140 | | - |
141 | | -## 🏗️ Project Structure |
142 | | - |
143 | | -``` |
144 | | -src/ |
145 | | -├── app/ # Next.js app directory |
146 | | -│ ├── globals.css # Global styles |
147 | | -│ ├── layout.tsx # Root layout with metadata |
148 | | -│ └── page.tsx # Main application page |
149 | | -├── components/ |
150 | | -│ ├── charts/ # Chart components |
151 | | -│ │ └── ServiceChart.tsx # All visualization logic |
152 | | -│ └── ui/ # UI components |
153 | | -│ ├── DataFilters.tsx # Smart filtering with org-repo dependency |
154 | | -│ ├── FileUpload.tsx # Drag-drop upload with progress tracking |
155 | | -│ └── Tabs.tsx # Service navigation tabs |
156 | | -├── lib/ |
157 | | -│ ├── fileParser.ts # CSV parsing and categorization |
158 | | -│ └── utils.ts # Utility functions |
159 | | -├── types/ |
160 | | -│ └── billing.ts # TypeScript type definitions |
161 | | -└── public/ |
162 | | -
|
163 | | - └── favicon.svg # Custom app favicon |
164 | | -``` |
165 | | - |
166 | | -## 🎨 Features in Detail |
167 | | - |
168 | | -### Service Categorization |
169 | | - |
170 | | -- Automatically categorizes GitHub services from CSV data |
171 | | -- Provides service-specific visualizations and metrics |
172 | | -- Handles various GitHub product types and SKUs |
173 | | - |
174 | | -### Smart Filtering |
175 | | - |
176 | | -- Real-time data filtering without page reloads |
177 | | -- Persistent filter state across service tabs |
178 | | -- Visual indicators for active filters |
179 | | - |
180 | | -### Responsive Design |
181 | | - |
182 | | -- Mobile-friendly interface |
183 | | -- Adaptive chart layouts |
184 | | -- Touch-friendly controls |
185 | | - |
186 | | -### Data Processing & Performance |
187 | | - |
188 | | -- **100% Client-Side**: All CSV processing happens in your browser |
189 | | -- **Non-Blocking UI**: Large files are processed without freezing the interface |
190 | | -- **Real-Time Progress**: Visual progress indicators with row counts and validation status |
191 | | -- **Efficient Aggregation**: Chunked processing for memory efficiency |
192 | | -- **No Server Upload**: All CSV processing is done in-browser |
193 | | -- **Automatic Detection**: Smart column mapping and date range detection |
194 | | - |
195 | | -## 🤝 Contributing |
196 | | - |
197 | | -1. Fork the repository |
198 | | -2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
199 | | -3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
200 | | -4. Push to the branch (`git push origin feature/amazing-feature`) |
201 | | -5. Open a Pull Request |
| 42 | +4. Open [http://localhost:3000](http://localhost:3000) |
202 | 43 |
|
203 | | -## 📝 License |
| 44 | +## Usage |
204 | 45 |
|
205 | | -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 46 | +1. Upload your GitHub billing CSV file |
| 47 | +2. Navigate between service tabs (Actions, Storage, Packages, Copilot) |
| 48 | +3. Use filters to drill down by date, organization, or repository |
| 49 | +4. Toggle between cost and usage views |
| 50 | +5. For storage services, switch between GB-hours and GB-months |
206 | 51 |
|
207 | | -## 🐛 Known Issues & Compatibility |
208 | | - |
209 | | -- Browser compatibility tested on Chrome, Firefox, and Safari |
210 | | -- Mobile responsiveness optimized for tablets and larger screens |
211 | | -- Very large CSV files (>100MB) may require additional processing time |
0 commit comments