How sharvani-shriya/ad-spend-optimizer works
Ad Channel Spend Optimizer is a small Vue-and-FastAPI dashboard for reviewing campaign performance and receiving a ROAS-based budget recommendation. The main workflow is: a user opens the dashboard, which requests campaign metrics and an optimization suggestion; the API reads campaigns from SQLite, computes per-campaign CPA/ROAS or invokes the optimizer, and returns results for display. The README documents dashboard capabilities not visible in the sampled frontend source; relationships below reflect the documented fetch workflow and inspected backend calls.
Main entry points: main.py FastAPI routes · optimizer.py Budget suggestion · index.html Vue dashboard · database.py Campaigns SQLite
Components 7
Dashboard
- Vue dashboard
frontend/index.html
API
- FastAPI routes
backend/main.py - Campaign metrics
backend/main.py
Optimization
- Channel ROAS
backend/optimizer.py - Budget suggestion
backend/optimizer.py
Campaign data
- Campaigns SQLite
backend/database.py
Other components
- Advertiser
Connections 9
- Advertiser → Vue dashboard: opens
- Vue dashboard → FastAPI routes: fetches data
- FastAPI routes → Campaigns SQLite: reads campaigns
- FastAPI routes → Campaign metrics: computes CPA/ROAS
- Campaign metrics → FastAPI routes: returns metrics
- FastAPI routes → Budget suggestion: requests suggestion
- Budget suggestion → Channel ROAS: aggregates ROAS
- Budget suggestion → FastAPI routes: returns suggestion
- FastAPI routes → Vue dashboard: returns results