A React-based dashboard for visualizing DigitalOcean billing data.
All you need is an API token from Digital Ocean with Read permissions scoped to Billing.
- Connect with your DigitalOcean API token
- View summary of your billing data
- Visualize monthly spend trends
- Analyze spend by category, project, and product
- Download invoice data as CSV
- Filter data by time range
- Node.js (version 14 or later)
- npm or yarn
- DigitalOcean API token (with read access to billing data)
-
Clone this repository:
git clone https://github.com/N-Erickson/DigitalOcean-Billing-Dashboard.git -
Install dependencies:
npm install -
Start the development server:
npm start -
Open http://localhost:3000 in your browser.
- Enter your DigitalOcean API token on the login screen
- The dashboard will load your billing data automatically
- Use the time range selector to filter data
- Download CSV data for further analysis
- Click individual invoice CSV buttons to download specific invoices
This application connects directly to the DigitalOcean API from the browser, which may result in CORS (Cross-Origin Resource Sharing) issues depending on your browser and configuration. If you encounter CORS errors, consider:
- Using a CORS browser extension (for development only)
- Setting up a simple proxy server
- Deploying the application to a DigitalOcean App Platform or similar service
src/App.js- Main application componentsrc/components/- React componentsLoginForm.js- API token input formDashboard.js- Main dashboard layoutSummaryCards.js- Summary metrics displayInvoiceTable.js- Invoice listing with CSV exportcharts/- Chart componentsMonthlyChart.js- Monthly spend trend chartCategoryChart.js- Category breakdown chartProjectChart.js- Project breakdown chartProductChart.js- Product breakdown chart
src/utils/dataUtils.js- Data processing utilities
Attribution-NonCommercial 4.0 International
