Startups

The Stack (Read This First)

Here’s the full answer before the breakdown. If you’re pre-revenue, this entire stack costs $0/month. With early users, you’re looking at $20–$50/month. Scaling past a few hundred paying customers, $300–$600/month — most of that is your LLM API bill.

LayerToolPre-revenueEarly users (~100)Scaling (~1k users)
LLM APIGroq (Llama) / Anthropic$0–$5$20–$50$200–$400
FrontendNext.js on Vercel$0$0$0–$20
BackendRailway / Render$0$5$10–$20
DatabaseSupabase / Neon$0$0–$25$25–$50
AuthSupabase Auth$0$0$0
PaymentsStripe$02.9% + $0.30/txn2.9% + $0.30/txn
Vector DBpgvector (in Supabase)$0$0$0
StorageCloudflare R2$0$0$0–$10
EmailResend$0$0$0–$20
MonitoringBetter Stack / Sentry$0$0$0
Total~$0–$5~$25–$80~$235–$520

That’s the stack. Everything below is why.


LLM API: Stop Defaulting to OpenAI

OpenAI is not the cheapest option, and for most startup use cases, it’s not necessary either.

The practical breakdown:

  • Groq runs Llama 3.3 70B at around $0.59/million input tokens — roughly 10x cheaper than GPT-4o. The throughput is fast enough for production, the latency is genuinely impressive, and the free tier is generous for development. For most structured generation, summarization, classification, and moderate reasoning tasks, Llama 3.3 70B on Groq matches GPT-4o quality close enough that users can’t tell the difference.

  • Anthropic Claude Haiku 3.5 is $0.80/million input tokens and punches well above its weight for instruction-following and agentic workflows. If your product requires reliability and you’re comfortable paying slightly more, Haiku is the right pick over GPT-4o-mini.

  • OpenAI GPT-4o-mini sits at around $0.15/million input tokens and is genuinely excellent for simple extraction, routing, and classification tasks. Use it for cheap calls you make at high volume.

  • Together AI and Fireworks AI are the other credible options. Both run open models at competitive prices and are production-stable. Useful if you need a specific open model or want a second provider for redundancy.

Where founders overspend: Defaulting to GPT-4o ($2.50/million input tokens) for every call because it’s the default in the cookbook they copied. Run a quick quality eval on your actual use case before committing. The difference is often unmeasurable to end users.

Rule of thumb: Use the cheapest model that passes your quality bar on your actual prompts. Run GPT-4o only when you can demonstrate the quality delta justifies the cost.


Frontend: Next.js on Vercel Free Tier

Next.js on Vercel is the default answer and it’s correct.

The free tier gives you:

  • 100GB bandwidth/month
  • Unlimited deployments
  • Edge functions
  • Preview deployments per branch

That’s more than enough for a pre-revenue product and most early-stage products with real users. The Hobby plan is free. You won’t need the Pro plan ($20/month) until you’re consistently over the bandwidth limits or need custom domains with SLAs.

When to look elsewhere:

  • If your app has heavy server-side computation, Vercel’s function execution limits will bite you. Move backend logic off Vercel early.
  • Netlify is a credible alternative with a similar free tier.
  • If you’re already on Railway or Render for the backend, deploying a simple Next.js app there avoids the split architecture.

Don’t do: Self-hosting Next.js on a $5 VPS as a way to save $20/month. Your time configuring nginx is worth more than that.


Backend: Serverless First, VPS When You Must

For most AI startups, the backend is where the LLM calls happen. Keep it simple.

Serverless (Vercel API routes / Next.js API routes): Free, no maintenance, good for request-response patterns. Fine for most CRUD and LLM call proxying. The problem: hard limits on execution time (300 seconds on the free tier, 800 seconds on Pro). If your LLM workflow takes longer than that, you need something else.

Railway: The cleanest option for a persistent backend. Free tier gives you $1 of credit/month (with a one-time $5 trial credit). A small Node or Python service running continuously costs around $5–$10/month on Railway. Deployments are fast, the DX is excellent, and it handles env vars without drama. Start here.

Render: Similar story. Free tier spins down after inactivity (annoying for demos, fine for background workers). The $7/month paid tier keeps services always-on.

Fly.io: Excellent for running containers close to users. More operational complexity than Railway but more control. Free tier offers $5 in trial credits (no permanent free tier for new accounts). Good choice if latency matters geographically.

Where founders overspend: Spinning up an EC2 instance or a DigitalOcean droplet before they need it because “that’s how real apps work.” Railway is a real app platform. You don’t need to manage infrastructure until you have a reason to.


Database: Supabase or Neon, Both Are Free to Start

Supabase is the default pick. The free tier includes:

  • 500MB database storage
  • 1GB file storage
  • 50,000 monthly active users for auth
  • Built-in pgvector (no separate vector DB needed)
  • Realtime subscriptions
  • A pretty good dashboard

The free tier pauses after 7 days of inactivity. That’s annoying in development but irrelevant in production. The $25/month Pro plan removes pausing and increases limits significantly.

Neon is a strong alternative if you want serverless Postgres with branching. The free tier is generous and there’s no pausing. Better for development workflows where you want database branches per feature branch. Slightly less integrated — no auth, no storage built in.

PlanetScale used to be on this list but removed their free tier. Skip it unless you’re on MySQL for a specific reason.

Where founders overspend: Paying $50–$200/month for managed Postgres (RDS, Cloud SQL) on AWS or GCP before they have meaningful traffic. Supabase or Neon handle the first 12–18 months of most startups without issue.


Auth: Supabase Auth Is Good Enough

Supabase Auth is free, built into your existing Supabase project, and handles email/password, magic links, OAuth (Google, GitHub, etc.), and phone OTP. The implementation is straightforward with the Supabase client libraries. For 95% of AI startups, this is the correct answer.

Clerk is genuinely excellent and has a better developer experience — pre-built UI components, a cleaner dashboard, better user management. The free tier covers 50,000 monthly retained users. Pro costs $20/month (with 50,000 MRU included). If you’re building a B2B product with team/organization features, Clerk’s org support is worth the money. If you’re not, you’re paying for DX you don’t need.

Rolling your own: Don’t. Auth is a security-critical surface that you will get wrong in subtle ways. Use an established library at minimum (Auth.js / NextAuth is free and handles most cases). Never implement your own session management or credential storage.


Payments: Stripe, No Alternatives Worth It

Stripe is the answer. There’s no cheaper credible alternative for startups.

The 2.9% + $0.30 per transaction is non-negotiable. Ways to reduce the effective rate:

  • Use annual billing — encourages it with a discount, reduces transaction count
  • For high-ticket plans ($100+/month), the per-transaction fee becomes negligible
  • Keep pricing simple — fewer plans means fewer edge cases in billing logic

Where founders overspend: Spending engineering time building complex billing logic before they have enough revenue to justify it. Start with 1–2 fixed price plans. Add usage-based billing when you actually need to meter usage.

Stripe’s free tier is effectively unlimited — you only pay fees on successful transactions. No monthly fees until you’re using advanced features.


Vector DB: pgvector, Not Pinecone

If you’re already on Supabase, you have pgvector. Use it.

pgvector handles embedding storage and cosine similarity search directly in Postgres. For most RAG applications at early-scale (millions of vectors, not billions), it performs well enough. The operational overhead is zero — it’s just another Postgres extension.

When pgvector isn’t enough: When you’re running similarity search over hundreds of millions of vectors, or when you need advanced filtering + vector search with low latency at high query volume. That’s not your problem today.

Pinecone free tier gives you 1 index and 100k vectors. Reasonable for prototyping, but you’ll hit the limit fast in production. Avoid it as a primary store unless you have a specific reason pgvector won’t work.

Qdrant Cloud has a generous free tier (1GB RAM cluster) and excellent performance. Legitimate option if you want a dedicated vector store without the Supabase dependency.


Storage: Cloudflare R2

Cloudflare R2 is free for the first 10GB stored and 1 million Class A (write) operations. Egress is free — which is the killer feature. S3 charges for egress at $0.09/GB, which adds up fast for any application serving stored files to users.

For most AI startups storing user uploads, generated outputs, documents for RAG, and similar assets, R2 handles the first significant period of growth for free.

Supabase Storage is a reasonable alternative if you want everything in one place. The free tier includes 1GB. It’s backed by S3 and has good CDN integration.

AWS S3: Don’t default to it early. The egress costs will surprise you. R2 is structurally cheaper and compatible with the S3 API, so migration is low friction later.


Email: Resend

Resend’s free tier covers 3,000 emails/month and 100/day. That’s sufficient for transactional email (auth, receipts, notifications) through your early growth phase.

The API is clean, the React Email integration is excellent for building templates, and setup takes 20 minutes including DNS verification.

When you’ll need more: High-volume outbound (newsletters, product announcements). At that point, look at Loops ($49/month for a proper marketing/transactional hybrid) or continue on Resend’s paid tier ($20/month for 50k emails).

Postmark and SendGrid work but are more expensive for the same usage. No reason to start there.


Monitoring: Free Tiers That Actually Work

Sentry (error tracking): Free tier covers 5,000 errors/month. Set it up before you have users. The time you save debugging production issues pays for itself in the first week.

Better Stack (uptime monitoring + log management): Free tier includes uptime monitoring and 3GB of log storage (3-day retention). Good enough for early-stage. The log ingestion is surprisingly useful for debugging AI pipelines — you can see exactly what prompts went out and what came back.

Vercel Analytics: Built into Vercel, free. Basic web analytics without the GDPR headaches of Google Analytics.

What to skip early: Datadog, New Relic, full APM platforms. You’ll pay $50–$200/month for dashboards you won’t look at. Sentry + Better Stack covers what matters until you’re at meaningful scale.


The Hidden Costs Nobody Mentions

Your LLM API bill will grow nonlinearly. As you add features, each user session involves more calls. A product that costs $0.02/user/day at launch might cost $0.15/user/day after six months of feature development. Track cost-per-user from day one.

Free tiers have limits that matter at the wrong moment. Supabase pauses, Render spins down, Vercel’s bandwidth limits aren’t as far off as they seem for media-heavy apps. Know the limits before you demo to an investor.

Authentication MAUs are counted differently. Clerk’s 50k MRU limit and Supabase’s 50k MAU limit count differently. Understand what “active” means for each platform before you’re surprised by an invoice.


When to Spend More

The stack above is the right choice until you have evidence it isn’t. Upgrade when:

  • Your free tier limits are actually constraining product decisions (not just “might become a problem”)
  • A paid tier solves a real problem you’re experiencing, not a hypothetical one
  • You have revenue to justify it — the goal is to get to revenue on this stack, not to build perfect infrastructure in advance

The startups that win aren’t the ones with the best infrastructure. They’re the ones that shipped fast enough to learn what their customers actually needed.


Summary

Build on this stack, ship fast, and upgrade individual layers as you hit real constraints. Most AI startups never outgrow the free tiers of Supabase and Vercel. Your LLM API bill will be your first meaningful cost, and that’s fine — it means users are using your product.

The tools above give you everything you need to go from idea to paying customers without spending anything meaningful on infrastructure.