Focus on simplicity, speed, and scalability. Built with modern stack: Tailwind CSS, shadcn/ui, Supabase, Stripe integration. Supports unlimited projects, team collaboration, dark/light mode, and seamless user experience. Perfect for solo devs and small teams who want full control without unnecessary complexity.
This application now uses local Next.js API routes instead of Supabase Edge Functions for Stripe integration. This makes deployment simpler and allows you to use standard .env files for configuration.
Copy .env.example
to .env.local
and fill in your actual values:
cp .env.example .env.local
NEXT_PUBLIC_SUPABASE_URL
- Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Your Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY
- Your Supabase service role key (server-side only)
STRIPE_SECRET_KEY
- Your Stripe secret key (server-side only)NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
- Your Stripe publishable keySTRIPE_WEBHOOK_SECRET
- Your Stripe webhook secret
NEXT_PUBLIC_SITE_URL
- Your site URL (for production)NEXTAUTH_URL
- Your site URL (same as above)NEXTAUTH_SECRET
- A random secret for NextAuth
- Install dependencies:
npm install
-
Set up your environment variables in
.env.local
-
Run the development server:
npm run dev
- Test Stripe webhooks locally using Stripe CLI:
stripe listen --forward-to localhost:3000/api/stripe/webhook
-
Build Settings:
- Build command:
npm run build
- Publish directory:
.next
- Build command:
-
Environment Variables: Add all the environment variables from your
.env.local
file to Netlify's environment variables section. -
Stripe Webhook Setup:
- Create a webhook endpoint in your Stripe dashboard
- Point it to:
https://your-domain.netlify.app/api/stripe/webhook
- Select the following events:
checkout.session.completed
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
invoice.payment_succeeded
invoice.payment_failed
- Deploy to Vercel:
npx vercel
-
Environment Variables: Add all environment variables through Vercel dashboard or CLI
-
Stripe Webhook Setup:
- Point webhook to:
https://your-domain.vercel.app/api/stripe/webhook
- Point webhook to:
The application now uses these local API routes:
POST /api/stripe/checkout
- Creates Stripe checkout sessionsPOST /api/stripe/webhook
- Handles Stripe webhook events
- Simpler Deployment - No need to deploy separate edge functions
- Environment Variables - Standard .env file support
- Better Debugging - Easier to debug locally
- Framework Integration - Better integration with Next.js
- No Vendor Lock-in - Can deploy to any platform that supports Next.js
-
Webhook Issues:
- Ensure
STRIPE_WEBHOOK_SECRET
matches your Stripe webhook endpoint - Check webhook logs in Stripe dashboard
- Verify webhook URL is correct
- Ensure
-
Environment Variables:
- Ensure all required variables are set
- Check for typos in variable names
- Verify Supabase service role key has proper permissions
-
CORS Issues:
- API routes include proper CORS headers
- Ensure your domain is whitelisted if needed
- Never expose
STRIPE_SECRET_KEY
orSUPABASE_SERVICE_ROLE_KEY
to the client - Use
NEXT_PUBLIC_
prefix only for client-side variables - Regularly rotate your webhook secrets
- Monitor webhook delivery in Stripe dashboard