System architecture
Cost & Usage View Architecture
- 01Identify the available usage
A cost-awareness dashboard that pulls usage and spend signals from the actual infrastructure — Supabase (DB size, egress, compute, MAU), Vercel (ba...
- 02a scheduled fetch that
Build a scheduled fetch (Vercel Cron or Supabase Cron + edge function) that records daily usage snapshots into a usage table so trends and month-to-date projections are computable.
- 03Vercel API
Vercel API (usage/billing) contributes the trusted model for Cost & Usage View so metrics are defined before they are visualized.
- 04Supabase usage + Postgres
Render a cost/usage panel (server component) with current month-to-date, trend per resource, and a simple projected-end-of-month figure against a configured budget.
- 05Review Queue
If a provider lacks a usable usage API, fall back to a manually imported monthly billing CSV for that resource and keep automated snapshots for the...
- 06Owner Review
Owners see infrastructure cost as a tracked trend with early warnings — no more surprise overage bills, and a clear view of which resource (DB egre...