DEV Community

Cover image for How I Built a Real-Time Meeting Cost Calculator with AWS DynamoDB, Next.js, and Claude AI
Murtaza
Murtaza

Posted on

How I Built a Real-Time Meeting Cost Calculator with AWS DynamoDB, Next.js, and Claude AI

I created this post for the purposes of entering the H0: Hack the Zero Stack hackathon. #H0Hackathon

The Problem

Every week, companies hemorrhage money in meetings nobody needed. A 6-person standup with senior engineers costs $50 before anyone says a word. Multiply that across 52 weeks and you're looking at $2,600 — just for one recurring meeting. Most teams have dozens. The problem isn't that people don't care about wasted time, it's that the cost is invisible.

So I built MeetingTax — a real-time meeting cost calculator that puts a live dollar counter on every meeting.

Live demo: https://meetingtax-lac.vercel.app

GitHub: https://github.com/durtymurty/meetingtax


What It Does

  • Team builder — add people with salaries, hourly rates calculated automatically
  • Live meeting room — watch a dollar counter tick up every 500ms in real time
  • Cost breakdown — total cost, per person, per minute, all live
  • Meeting history — every meeting saved to DynamoDB with full attendee data
  • Analytics dashboard — total spend, averages, bar chart of meeting costs
  • Claude AI analysis — one click gets you sharp insights on which meetings to cut

The Stack

Layer Tech
Frontend Next.js 15, React, TypeScript
Database AWS DynamoDB (PAY_PER_REQUEST)
AI Anthropic Claude Haiku
Deployment Vercel

Why DynamoDB

This was the most intentional architectural decision in the project.

Meeting data has a clear, spiky usage pattern — lots of writes during work hours, nothing at night. PAY_PER_REQUEST billing means you pay for exactly what you use, scaling to zero overnight.

More importantly, Next.js API routes on Vercel are stateless serverless functions. DynamoDB's SDK connects without persistent connections, making it a natural fit. No connection pooling, no warm-up time, no complexity.

In a real deployment, multiple teams could end meetings simultaneously. DynamoDB handles concurrent writes natively with no locking required — each write is atomic and independent.

I set up two tables:

  • meetingtax-people — stores team members and salaries
  • meetingtax-meetings — stores every meeting record with cost, duration, attendees

Both on PAY_PER_REQUEST. Setup took one script and about 5 seconds.


The Real-Time Counter

The live cost ticker was the most interesting frontend challenge. The naive approach would be polling an API every second — wasteful and slow.

Instead, the counter runs entirely client-side:

const costPerSec = Array.from(selected).reduce((sum, id) => {
  const p = people.find((x) => x.id === id);
  return sum + (p ? p.salary / 2080 / 3600 : 0);
}, 0);

useEffect(() => {
  if (running) {
    intervalRef.current = setInterval(() => {
      const s = (Date.now() - startRef.current!) / 1000;
      setElapsed(Math.floor(s));
      setCost(costPerSec * s);
    }, 500);
  }
}, [running, costPerSec]);
Enter fullscreen mode Exit fullscreen mode

Annual salary ÷ 2080 working hours ÷ 3600 seconds = cost per second per person. Sum across all attendees, multiply by elapsed seconds, update every 500ms. Zero API calls while the meeting runs. The API only gets hit when the meeting ends and we write the final record to DynamoDB.


The Claude Integration

The AI analysis is a single POST to /api/analyze. It sends the full meeting history and team data to Claude Haiku with a tight prompt asking for specific, actionable insights — not generic advice.

The key was being narrow and specific. Instead of "analyze my meetings," the prompt tells Claude exactly what to output: biggest money-wasting patterns, specific meetings to cut, ideal cadence, and one surprising insight. Claude returns punchy paragraphs in plain text, which the frontend renders directly.

The result is genuinely useful — Claude identified that a solo standup was theater, not communication, and calculated exactly how much it would cost annually if the team scaled to 5 people without fixing the habit first.


Deployment

The entire stack deploys with one command:

vercel --prod
Enter fullscreen mode Exit fullscreen mode

Vercel auto-detects Next.js, builds it, and deploys. Environment variables
(AWS keys, Anthropic API key) live in Vercel's dashboard — never in code,
never in GitHub.

Every git push to main triggers a new production deploy automatically.


What's Next

  • Slack integration — post cost summary when a meeting ends
  • Google Calendar sync — import meetings automatically
  • Multi-team workspaces with invite links
  • Weekly email digest of most expensive meetings

Try It

Live demo: https://meetingtax-lac.vercel.app

GitHub: https://github.com/durtymurty/meetingtax

Built for the H0: Hack the Zero Stack hackathon by Amazon and Vercel.

H0Hackathon

Top comments (0)