How bh-gaur/cloud-cost-intelligence works
AWS Cost Intelligence is a multi-tenant FinOps platform. Users explore cost and account data in the React app; its API layer scopes requests to an organization, aggregates stored spend and provider data, and returns dashboard, drilldown, and export results. Separate branches analyze optimization opportunities and anomalies, track budgets and tagging, and generate and dispatch reports. The README documents major capabilities that are not fully visible in sampled source; those branches are represented at subsystem level. Arrows use cited excerpts or README statements; unsampled implementation details are not asserted.
Main entry points: base.py ORM base · service.py Report service · App.tsx Routes and shell · __init__.py Versioned API
Components 28
User application
- Routes and shell
frontend/src/App.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Landing
frontend/src/pages/Landing.tsx - Admin users
frontend/src/pages/AdminUsers.tsx - API client
frontend/src/api/client.ts - API data types
frontend/src/types/index.ts
API and access
- Versioned API
backend/app/api/v1/__init__.py - Auth and tenant scope
backend/app/auth/tenant_context.py - Services endpoint
backend/app/api/v1/services.py
FinOps analysis
- Cost aggregation
backend/app/services/cost_service.py - Optimization engine
backend/app/optimization/engine.py - Optimization rules
backend/app/optimization/rules/s3_storage.py - Anomaly detection
backend/app/alerts/detector.py - Tag governance
backend/app/services/tagging_service.py - Report service
backend/app/reports/service.py
Providers and delivery
- Notification dispatch
backend/app/notifications/service.py - Provider abstraction
backend/app/providers/factory.py
Persistence
- Runtime settings
backend/app/config/settings.py - Database sessions
backend/app/database/session.py - ORM base
backend/app/database/base.py - AWS accounts
backend/app/models/account.py - Cost records
backend/app/models/cost.py - Organizations
backend/app/models/organization.py - Users
backend/app/models/user.py - Alert records
backend/app/models/alert.py - Recommendations
backend/app/models/optimization.py
Other components
- FinOps user
- AWS services
Connections 30
- FinOps user → Routes and shell: uses
- Routes and shell → Dashboard: routes to
frontend/src/App.tsx - Routes and shell → Landing: routes to
frontend/src/App.tsx - Routes and shell → Admin users: routes to
frontend/src/App.tsx - Dashboard → API client: requests data
- API client → Versioned API: sends requests
- API client → API data types: uses types
frontend/src/api/client.ts - Versioned API → Auth and tenant scope: scopes access
- Versioned API → Services endpoint: routes services
- Services endpoint → Cost aggregation: calls
backend/app/api/v1/services.py - Cost aggregation → Cost records: queries
backend/app/services/cost_service.py - Cost aggregation → AWS accounts: queries
backend/app/services/cost_service.py - Cost aggregation → Provider abstraction: uses provider
backend/app/services/cost_service.py - Optimization engine → Optimization rules: evaluates
backend/app/optimization/engine.py - Optimization engine → Recommendations: saves findings
backend/app/optimization/engine.py - Anomaly detection → Alert records: records anomalies
- Tag governance → Cost records: analyzes tags
backend/app/services/tagging_service.py - Report service → Cost records: reads spend
backend/app/reports/service.py - Report service → Recommendations: reads findings
backend/app/reports/service.py - Report service → Alert records: reads alerts
backend/app/reports/service.py - Report service → Notification dispatch: dispatches reports
- Notification dispatch → AWS services: notifies channels
- Provider abstraction → AWS services: queries AWS
- Database sessions → Runtime settings: configures engine
backend/app/database/session.py - Versioned API → Database sessions: injects sessions
- Database sessions → ORM base: creates sessions
- ORM base → AWS accounts: models
backend/app/models/account.py - ORM base → Cost records: models
backend/app/models/cost.py - ORM base → Organizations: models
backend/app/models/organization.py - ORM base → Users: models
backend/app/models/user.py