Skip to content

Case study · Theliv

Theliv: an AWS cost-monitoring SaaS, built end to end.

Theliv is my own SaaS product. It connects to a team's AWS accounts with a read-only role, checks spend every night, flags cost spikes and waste the day they start, explains what changed, and hands over the fix. It's built for the engineer who has to act on the bill and the founder who pays it.

01 — At a glance

The short version.

Role
Sole engineer: product, architecture, frontend, backend and infrastructure
Status
Live, with a 14-day free trial
Stack
  • Next.js
  • TypeScript
  • Supabase (PostgreSQL)
  • Stripe
  • AWS Cost Explorer API
  • AWS STS & CloudFormation
  • Anthropic Claude
  • Slack API

02 — The problem

What it had to solve.

AWS bills arrive once a month, but cost problems start on a Tuesday: a misconfigured autoscaling rule, a forgotten instance, traffic routed through a NAT gateway. By billing day the waste has compounded for weeks.

AWS Cost Explorer shows what the bill was. It doesn't say why a service jumped, what to change, or whether last month's fix actually saved anything. Teams end up with engineers stopping work to explain an invoice.

03 — What I built

The product, feature by feature.

  • Nightly cost ingestion for every connected account and service, plus on-demand sync.
  • Per-account spike detection, with thresholds tuned to each account's own normal range.
  • A deterministic waste scanner: idle EC2, unattached EBS volumes, orphaned Elastic IPs and gp2 volumes that can move to gp3, priced from AWS list prices.
  • AI-written explanations: Claude describes the likely cause of a spike and the fix as a Terraform or CLI snippet, labelled as AI beside the measured numbers.
  • A run-rate forecast against per-account budgets, with a projected breach date pushed to Slack.
  • A Verified Dollars Saved ledger, Slack and email alerts, a monthly report and Stripe billing.

04 — Architecture

The decisions that shaped it.

Read-only by design

Customers connect with one CloudFormation template that creates a cross-account IAM role with read and describe permissions only. Theliv assumes it at runtime through STS with a unique external ID per account, so no long-term AWS keys are ever stored.

Detectors decide, the model narrates

Every resource fact and dollar figure comes from deterministic detectors and AWS list prices. The LLM only explains, its output is labelled as AI and drawn dashed in charts, and if the model is unavailable the measured alert still ships.

Savings are proven, not estimated

A finding is credited to the ledger only when a later scan shows the resource changed, or a teammate marks it done. Each saving is credited once, enforced in the database, so the number can go to finance without a caveat.

Tenant isolation everywhere

Every query is scoped to the customer's organization with role-based access, row-level security is enabled on every table, and Slack webhook URLs are AES-256 encrypted at rest.

05 — Challenges

What was hard, and how I solved it.

Trusting an LLM near money.

A model that invents a dollar figure would end the product's credibility. Splitting measurement (deterministic) from explanation (AI, labelled) means the model can be wrong about a cause without ever being wrong about a number.

Alerts that mean something across very different accounts.

A fixed threshold is noise for a large account and silence for a small one. Spike detection compares each account to its own normal range, and every account has its own sensitivity and alert floor.

Access a security reviewer will approve.

Least-privilege, read-only permissions in a single template, every action listed in the onboarding wizard before deployment, and disconnection in one click.

06 — Results

Where it stands.

  • Live and taking sign-ups, with a 14-day free trial.
  • Onboarding is one CloudFormation stack; the first scan loads 30 days of cost history.
  • AWS-only today; Azure, GCP and Kubernetes coverage are on its roadmap.

The savings figures on Theliv's own site are illustrative, so none are quoted here as results.

Building something similar?

An MVP or a full SaaS product, built on a foundation that survives its first customers.

07 — Contact

Let's Build Something.

I take on a small number of projects at a time, from full product builds to deployment, performance and automation work: scoped, shipped, and handed over clean.

Bengaluru, India → Open to RelocationReplies under 24h

Send a message

What happens next: I read every message myself. Typical reply time: under 24h.