Inspiration
Free-tier dashboards look generous until you ship. Then MAU, egress, and “Hobby is non-commercial” hit at once, and the first real bill (or throttle) is the first time you notice.
Stacksmith already planned what to build. We wanted the next question founders actually ask: what does this stack cost at my scale, and which limit breaks first? StackCost is that check — architecture cost and tier estimation before surprise invoices.
What it does
You pick from a fixed catalog — Supabase, Vercel, Clerk, Neon, OpenRouter, PostHog — then set monthly active users and storage/transfer per user.
POST /api/analyze returns:
freeTierExceeded— whether any service needs a paid tier at this loadbreakdown[]— per provider: cheapest covering tier, estimated monthly cost, and the bottleneck (the limit that decides the tier)totalEstimatedMonthlyrecommendation— one or two concrete cost-cut lines for this stack and scale
Estimates can be copied as Markdown or shared via a #e= URL fragment (no database). Numbers are a starting point for a pricing-page check, not a quote.
How we built it
Forked Stacksmith for the Build with Stripe Community hackathon (Stripe Dhaka AI Event 2026). Same Next.js 15 + Stripe Projects scaffolding; the planner became an estimator.
- UI: one client surface (
StackCost) — service toggles, MAU/data sliders, result cards, breakdown table - AI: OpenRouter with a compact published free-tier reference (
lib/tiers.ts) in the system prompt so the model reasons from real allowances instead of inventing limits - Reliability: a
:freemodel fallback chain, JSON extraction from messy completions, and sanitization so the breakdown only includes services the user actually picked - Infra: OpenRouter + Vercel via the Stripe Projects CLI. No database — every estimate is stateless
Challenges we ran into
- Credits vs free models: a fresh OpenRouter account can
402on paid models. We kept a:freefallback and treat slugs as something to re-check on OpenRouter’s model list. - Vercel
PLAN_REQUIRED:vercel/projectneedsvercel/hobbyfirst — the CLI tells you, but only after you guess wrong. - LLMs and JSON: models wrap JSON in fences or invent extra providers. We extract balanced JSON, validate the shape, and drop rows that aren’t in the selected stack.
- Pricing that lies by omission: Hobby “free” vs commercial-use clauses; DB size and egress often blow before MAU caps. Encoding those bottlenecks in the prompt mattered more than another UI widget.
- Cloned
.projects/state: Stacksmith’s Stripe account isn’t ours — re-init against your own account before you can provision.
Accomplishments that we're proud of
- A demo you can finish in one sitting: pick a stack, set scale, see bill + throttle + a specific bottleneck.
- Grounding estimates in a real (compact) tier table, not vibes.
- Shareable, zero-backend estimates (
#e=+ Markdown report) that still feel like a product. - Shipping on free OpenRouter models with retries so the hackathon demo doesn’t die on the first
500/402. - Tests for JSON extraction, share encoding, and report rendering — small, but they catch the failure modes that ruin live demos.
What we learned
Provider “free” is a bundle of limits, not a price of $0. The interesting output isn’t a single monthly number — it’s which dimension fails first.
Also: Stripe Projects is a real workflow (plan before deployable, env pull, rotate on leak). LLM apps in a weekend live or die on prompt constraints + parse/sanitize, not on model brand. And stateless by default is a feature when you don’t need accounts.
What's next for Stack-Cost
- More providers and usage-shaped inputs (events/user, function GB-hours, recordings) instead of MAU + MB only
- Refreshable pricing from official pages or APIs so
TIER_REFERENCEdoesn’t rot - Side-by-side stack A vs stack B and “what if we drop this service?”
- Optional saved estimates / team share without giving up the no-login path
- Clearer disclaimer UX: always confirm against current provider pricing before you commit spend
Built With
- next.js
- openrouter
- react
- typescript
- vercel
- vitest
Log in or sign up for Devpost to join the conversation.