How mmaudet/ovh-cost-manager works
OVH Cost Manager imports OVHcloud billing and account data into local SQLite, then serves an account-aware API to a React dashboard for cost, infrastructure, trend, comparison, and carbon analysis. The map preserves documented dashboard branches and CLI exports alongside the sampled runtime layers. Several tab and server implementations were not excerpted, so their documented capabilities are shown, but uncertain internal call paths are omitted.
Main entry points: Dashboard.jsx Dashboard shell · db.js SQLite database · index.js API server · import.js Data importer
Components 27
Import and tools
- Data importer
data/import.js
API and authentication
- API server
server/index.js - OIDC authentication
server/auth/routes.js - Consumption service
server/consumption.js
Billing data
- SQLite database
data/db.js - Cost classification
data/classify.js - Cloud usage
data/cloud-usage.js - Billing months
data/months.js - Query conditions
data/sql-conditions.js
Dashboard analysis
- Dashboard shell
dashboard/src/pages/Dashboard.jsx - API client
dashboard/src/services/api.js - Account selection
dashboard/src/utils/accounts.js - Overview analysis
dashboard/src/tabs/OverviewTab.jsx - Month comparison
dashboard/src/tabs/useCompareTab.js - Unfolded comparisons
dashboard/src/components/UnfoldingRow.jsx - Trend analysis
dashboard/src/tabs/TrendsTab.jsx - Public Cloud
dashboard/src/tabs/PublicCloudTab.jsx - Web Cloud
dashboard/src/tabs/WebCloudTab.jsx - Infrastructure inventory
dashboard/src/tabs/InfrastructureTab.jsx - Backup analysis
dashboard/src/tabs/BackupTab.jsx - Carbon footprint
dashboard/src/tabs/CarbonTab.jsx - Sortable tables
dashboard/src/components/SortableHeader.jsx
Exports and CLI
- Invoice CLI
cli/index.js - Project bill tools
cli/bills-by-project.js - CSV and reports
dashboard/src/utils/csv.js
Other components
- Operator
- OVHcloud API
Connections 28
- Operator → Data importer: starts import
README.md - Data importer → OVHcloud API: fetches billing data
README.md - Data importer → SQLite database: stores imports
README.md - Operator → API server: opens dashboard
README.md - Dashboard shell → API client: requests data
README.md - API client → API server: calls API
README.md - API server → SQLite database: queries
server/index.js - API server → OIDC authentication: mounts authentication
server/index.js - API server → Consumption service: serves consumption
server/index.js - Project bill tools → SQLite database: reads bills
cli/bills-by-project.js - Dashboard shell → Overview analysis: shows tab
README.md - Dashboard shell → Month comparison: shows tab
README.md - Dashboard shell → Trend analysis: shows tab
README.md - Dashboard shell → Public Cloud: shows tab
README.md - Dashboard shell → Web Cloud: shows tab
README.md - Dashboard shell → Infrastructure inventory: shows tab
README.md - Dashboard shell → Backup analysis: shows tab
README.md - Dashboard shell → Carbon footprint: shows tab
README.md - Month comparison → API client: fetches comparison data
dashboard/src/tabs/useCompareTab.js - Month comparison → Unfolded comparisons: uses unfolding rows
dashboard/src/tabs/useCompareTab.js - Dashboard shell → Account selection: selects account
- Overview analysis → Sortable tables: sorts tables
- Infrastructure inventory → CSV and reports: exports CSV
README.md - Operator → Invoice CLI: runs invoice tool
README.md - Cost classification → SQLite database: classifies bill lines
data/db.js - Cloud usage → SQLite database: supplies usage kinds
data/db.js - Billing months → SQLite database: supports month queries
data/db.js - Query conditions → SQLite database: builds query conditions
data/db.js