I started this project with zero knowledge of Supabase, Stripe, auth systems, or Next.js tooling. A week later I have a fully working AI SaaS boilerplate called TokenBase. Here's how.
What I built
TokenBase is a Next.js 14 starter kit that gives developers everything they need to launch an AI SaaS app:
Supabase auth (email, Google OAuth, magic links, password reset)
Credit/token billing system with live balance updates
AI chat UI powered by Groq
Razorpay + Stripe payments
PostHog analytics
Full documentation
How I built it (vibe coding)
I used Cursor and Windsurf as AI coding assistants. Instead of writing code manually, I described what I wanted and let the AI build it. My job was to make decisions about what to build, not how to write every line.
The key insight: break everything into micro-tasks. Instead of saying "build me a payment system", I said "create a Razorpay order API route that returns order ID and amount". Small, focused prompts get much better results.
The credit system (most interesting part)
The core feature of TokenBase is the credit billing system:
New users get 100 credits automatically via a Supabase DB trigger
Each AI message deducts 10 credits server-side before calling the AI
If credits hit 0, the API returns a 402 and blocks the request
Users can buy more credits via Razorpay or Stripe
Live demo
tokenbase-two.vercel.app
If you want to skip the setup and just start building your AI product, I packaged everything into a boilerplate: himanshu0317.gumroad.com/l/qgbmfj
Happy to answer questions about the stack or the vibe coding approach!
Top comments (0)