webdevcody/wdc-saas-starter-kit
webdevcody/wdc-saas-starter-kit has 1,344 GitHub stars and 280 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-09 05:43 UTC. Last push 2025-12-01.
Notice! this starter kit isn't fully finished, but I'm just making this public for now if anyone wants to add onto it. I'm getting burned out on working on this so I'm open to anyone wanting to help contribute to fixing up any bugs they find, etc.
Measured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalNotice! this starter kit isn't fully finished, but I'm just making this public for now if anyone wants to add onto it. I'm getting burned out on working on this so I'm open to anyone wanting to help contribute to fixing up any bugs they find, etc.
Discord
You can join the discord if you want to talk about the code here or suggest features / etc.
Code Walkthrough (Early Access)
For those wanting more hands on video walkthrough content that explains this code base, shows how to deploy it, and how to maintain it in production, I'm working on a paid video walkthrough series found here https://webdevcody.gumroad.com/l/wdc-saas-starter-kit-walkthrough. I'm in the process of recording and editing videos, but if you purchase now it's 50% off the original pricing.
Welcome to the Starter Kit
Welcome to the WDC Next.js Starter Kit! This is a github template which contains the following technology we feel is a great starting point for any new SaaS product:
- Authorization
- Subscription Management (Stripe)
- Stripe Integration / Webhooks
- Group Management
- File Upload to R2
- Drizzle ORM
- Light / Dark Mode
- ShadCN
- Tailwind CSS
- Posthog Analytics
Contributing
If you find obvious issues with this starter kit, feel free to submit a pull request or submit and issue. We want to keep this starter simple with the core technology picked, so we don't recommend trying to add in various things without prior approval.
How to Get Started
Start by clicking the "use this template" button on the github repo. We suggest creating a new repository so you can track your code changes. After, clone your own repository down to your computer and start working on it.
Prerequisites
This starter kit does uses Docker and Docker Compose to run a postgres database, so you will need to either have those installed, or modify the project to point to a hosted database solution.
How to Run
cp .env.sample .envnpm idocker compose upnpm run db:migratenpm run dev
Env Setup
This starter kit depends on a few external services, such as google oauth, stripe, and resend. You'll need to following the steps below and make sure everything is setup and copy the necesssary values into your .env file:
Resend
Create an account on https://resend.com/ and generate an api key and paste into EMAIL_SERVER_PASSWORD
Setup your domain in resend so that you can send emails from your custom domain and set EMAIL_FROM to match your expected from line. To do this, go to your domain provider and add the necessary records outlined in resend.
Cloudflare R2
TODO: add info about bucket and keys
Database
This starter kit uses postgres. Supabase provides 2 free postgres database. Setup a database and get your DATABASE_URL.
Stripe Setup
This starter kit uses stripe which means you'll need to setup a stripe account at https://stripe.com. After creating an account and a project, you'll need to set the following env variables:
- STRIPE_API_KEY
- NEXT_PUBLIC_STRIPE_KEY
- STRIPE_WEBHOOK_SECRET
- PRICE_ID
- NEXT_PUBLIC_STRIPE_MANAGE_URL
How you can find these are outlined below:
Stripe Keys
You need to define both NEXT_PUBLIC_STRIPE_KEY and STRIPE_API_KEY inside of .env. These can get found here:
Webhook Keys
Depending on if you are developing locally or deploying to prod, there are two paths you need to take for getting a webhook key:
Local Development
- Install the Stripe CLI:
For macOS or Linux, you can use Homebrew:
brew install stripe/stripe-cli/stripe
- For Windows, you can use the Windows installer from the Stripe CLI GitHub releases page - https://github.com/stripe/stripe-cli/releases
- Add Stripe CLI to your PATH: Ensure the directory containing the Stripe CLI executable is in your system's PATH environment variable.
- We provided an npm alias
stripe:listenyou can run if you want to setup your locally running application to listsen for any stripe events. Run this command and copy the webhook secret it prints to the console into your .env file.
Production
When going to production, you'll need to create a webhook endpoint and copy your webhook secret into STRIPE_WEBHOOK_SECRET:
- https://dashboard.stripe.com/test/webhooks
- create an endpoint pointing to https://your-domain.com/api/webhooks/stripe
- listen for events invoice.payment_succeeded and checkout.session.completed
- find your stripe secret key and copy into your projects
Price Id (Product)
You'll need to create a subscription product in stripe:
- https://dashboard.stripe.com/products/create
- Make your one time product
- Copy the price id
- paste price id into .env of PRICE_ID
Customer Portal
Stripe has a built in way for customers to cancel their subscriptions. You'll need to enable this feature:
- https://dashboard.stripe.com/settings/billing/portal
- Click activate portal link button
- Copy your portal link
- Paste as env variable as NEXT_PUBLIC_STRIPE_MANAGE_URL
HOST_NAME
When deplying to production, you want to set HOST_NAME to your FQDN, such as https://you-domain.com
Auth Setup
Google Provider
By default, this starter only comes with the google provider which you'll need to setup:
- https://console.cloud.google.com/apis/credentials
- create a new project
- setup oauth consent screen
- create credentials - oauth client id
- for authorized javascript origins
- Authorized redirect URIs
- Set your google id and secret inside of .env
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
Github provider
TODO: add info
Posthog
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,398 starspublic-apis/public-apis
A collective list of free APIs
497,679 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
447,495 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,261 stars