DEV Community

Song Jack
Song Jack

Posted on

How I Built a SaaS That Costs $0/Month to Run (Next.js + Vercel + AI API)

The Setup

I run a website that generates AI fortune readings using 4 different divination systems. It has 108 SEO-optimized pages, email capture, and a payment flow.

My monthly cost: $0.

Here is the exact stack and why each piece costs nothing.

The Stack

Frontend + Backend: Next.js 14

Cost: $0

Next.js gives me server-side rendering, API routes, and static generation — all in one framework. No separate backend server needed.

// pages/api/fortune.js — AI reading endpoint
export default async function handler(req, res) {
  const { birthDate, question } = req.body;
  const reading = await generateReading(birthDate, question);
  res.json({ success: true, reading });
}
Enter fullscreen mode Exit fullscreen mode

Hosting: Vercel Hobby Plan

Cost: $0

Vercel gives you:

  • 100GB bandwidth/month
  • Serverless functions (free tier)
  • Automatic HTTPS
  • Edge network (global CDN)
  • Preview deployments for every git push

For a side project, this is more than enough.

Database: Vercel KV (free tier)

Cost: $0

I use Vercel KV (Redis) for:

  • Rate limiting (5 reads per IP per day)
  • Tracking free vs paid users
  • Session tokens

The free tier gives 30MB storage and 30K requests/month.

AI: Free Tier APIs

Cost: $0 (for now)

I use a combination of:

  • Free tier LLM APIs for text generation
  • Offline calculations for astrology, BaZi, numerology (pure math, no API needed)
  • The tarot card drawing is literally random number generation

The only AI calls are for the detailed reading text. At my current traffic (~10 visitors/day), I am well within free limits.

Payments: PayPal.Me

Cost: $0 (PayPal takes 2.9% + $0.30 per transaction)

Instead of building a complex Stripe integration, I use PayPal.Me links. User clicks "Pay $0.99" → goes to PayPal → comes back with a URL parameter → I verify and grant access.

// Dead simple payment verification
const paidPlan = params.get('paid');
if (paidPlan) {
  const token = generateToken(paidPlan);
  localStorage.setItem('token', token);
  // Done. No webhooks, no Stripe, no complexity.
}
Enter fullscreen mode Exit fullscreen mode

Email: Custom /api/subscribe endpoint

Cost: $0

I collect emails with a simple API endpoint and store them in a JSON file. No Mailchimp, no SendGrid. When I have 100+ subscribers, I will switch to Resend (free 100 emails/day).

SEO: Built into Next.js

Cost: $0

  • Dynamic sitemap generation
  • JSON-LD structured data
  • Meta tags per page
  • All handled by Next.js getStaticProps

The One Thing I Pay For

Domain name: $12/year (actually I am using the free .vercel.app subdomain, so technically $0)

That is it. The entire stack costs $0/month.

When Would You Start Paying?

Trigger Cost When
1000+ visitors/day Vercel Pro ($20/mo) Not yet
100+ emails Resend ($0 for 100/day) Soon
Custom domain $12/year Already have
More AI calls Pay-per-use API When traffic grows

The Lesson

Most side projects fail because of complexity, not features. Using free tiers aggressively lets you focus on building and marketing instead of worrying about infrastructure costs.

Build first, pay later. If your product makes money, the costs are a rounding error.


What is your $0/month stack? And what is the first thing you would pay for when revenue comes in?

See my project live — built with exactly this stack.

Top comments (0)