How vedantsingh-0/cloud-cost-optimizer works
CloudOptimizer is a web application for users to connect AWS accounts, inspect cloud costs and resource usage, configure alerts, and manage paid plans. The principal workflow is account registration/login, AWS credential setup, then dashboard requests for cost, EC2, and S3 data; the UI presents results as charts and summaries. Separate capabilities cover scheduled/email reports and alerts, administrative user access, and Razorpay subscriptions. The frontend excerpt shows these API interactions, while some backend routes and resource controllers were not sampled; their subsystem paths are grounded in the file tree, but uncertain internal wiring is omitted.
Main entry points: App.js Dashboard UI · index.js Express API · auth.js Auth guard · User.js User records
Components 25
Web interface
- Dashboard UI
frontend/src/App.js - Landing page
frontend/src/LandingPage.js - Pricing UI
frontend/src/Pricing.js
Identity and accounts
- Express API
backend/index.js - Auth routes
backend/routes/authRoutes.js - Authentication
backend/controllers/authController.js - Auth guard
backend/middleware/auth.js - User records
backend/models/User.js - AWS credentials
backend/controllers/authController.js
AWS insights
- Cost routes
backend/routes/costRoutes.js - Cost analysis
backend/controllers/costController.js - Per-user AWS clients
backend/config/userAwsClients.js - EC2 routes
backend/routes/ec2Routes.js - EC2 insights
backend/controllers/ec2Controller.js - S3 routes
backend/routes/s3Routes.js - S3 usage
backend/controllers/s3Controller.js
Cost notifications
- Alert routes
backend/routes/alertRoutes.js - Alerts and reports
backend/controllers/alertController.js
Plans and billing
- Payment routes
backend/routes/paymentRoutes.js - Plans and payment
backend/controllers/paymentController.js
Other components
- Visitor / user
- AWS Cost Explorer
- AWS EC2 / S3
- Email delivery
- Razorpay
Connections 43
- Visitor / user → Landing page: opens
- Landing page → Dashboard UI: starts signup
- Visitor / user → Dashboard UI: uses
- Dashboard UI → Express API: API requests
- Express API → Auth routes: dispatches
- Auth routes → Authentication: dispatches
- Auth routes → Auth guard: protects routes
- Authentication → User records: reads / writes
- Dashboard UI → AWS credentials: submits credentials
- Authentication → User records: stores credentials
- Express API → Cost routes: dispatches
- Cost routes → Auth guard: protects routes
- Cost routes → Cost analysis: dispatches
- Cost analysis → User records: reads credentials
- Cost analysis → AWS Cost Explorer: queries costs
- Dashboard UI → EC2 routes: requests idle EC2
- Express API → EC2 routes: dispatches
- EC2 routes → Auth guard: protects routes
- EC2 routes → EC2 insights: dispatches
- Dashboard UI → S3 routes: requests usage
- Express API → S3 routes: dispatches
- S3 routes → Auth guard: protects routes
- S3 routes → S3 usage: dispatches
- EC2 insights → Per-user AWS clients: gets client
- S3 usage → Per-user AWS clients: gets client
- Per-user AWS clients → User records: loads credentials
- Per-user AWS clients → AWS EC2 / S3: creates AWS clients
- Dashboard UI → Alert routes: checks / configures
- Express API → Alert routes: dispatches
- Alert routes → Auth guard: protects routes
- Alert routes → Alerts and reports: dispatches
- Alerts and reports → Per-user AWS clients: gets cost client
- Alerts and reports → AWS Cost Explorer: queries costs
- Alerts and reports → User records: reads / updates
- Alerts and reports → Email delivery: sends notices
- Dashboard UI → Pricing UI: opens plans
- Pricing UI → Payment routes: requests plans
- Dashboard UI → Payment routes: creates / verifies
- Express API → Payment routes: dispatches
- Payment routes → Auth guard: protects payments
- Payment routes → Plans and payment: dispatches
- Plans and payment → Razorpay: creates orders
- Plans and payment → User records: updates plan