create-nexttify-saas
v0.1.11
Published
Create a SaaS Next.js + Stripe app (CLI scaffolder)
Maintainers
Keywords
Readme
create-nexttify-saas
Create a SaaS starter with Next.js + Stripe + Razorpay in seconds.
Quick start
npx create-nexttify-saas my-saas --ts # TypeScript
# or
npx create-nexttify-saas my-saas # JavaScriptGlobal CLI vs npx
- npx (recommended): Runs the latest CLI directly without installing it into your project.
- Global CLI (optional): Install once, then run the command anywhere.
# install globally
npm i -g create-nexttify-saas
# use
create-nexttify-saas my-saas --tsAvoid installing inside an existing project with npm i create-nexttify-saas. That only adds the CLI as a dependency and will not scaffold a new app.
Options
--ts Use the TypeScript template (default: false)
--pkg <tool> Package manager: npm | pnpm | yarn | bun (default: npm)
--force Scaffold into non-empty directoryWhat’s included
- Next.js App Router (14+)
- Tailwind CSS preconfigured
- Payments: Stripe + webhook
- Optional webhooks: Razorpay, PayPal, Cashfree (stubs)
- Minimal auth/RBAC placeholders
- Simple email templates placeholder
After scaffolding
cd my-saas
npm i # or pnpm i / yarn / bun install
cp .env.example .env.local # paste STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET
npm run devWhat the CLI does
- Creates a new folder with a Next.js project (JS or TS)
- Adds Tailwind CSS, pricing page, and navbar
- Sets up webhook routes for Stripe (and optional Razorpay, PayPal, Cashfree stubs)
- Creates
.env.exampleand.env.localfor you to fill in keys
Generated folders explained
app/– App Router pages and API routesapp/pricing/– Example pricing UIapp/api/*-webhook/– Webhook endpoints for payment providerslib/– Payment helperstailwind.config,postcss.config– Tailwind setup Common tasks
# create TypeScript app
npx create-nexttify-saas my-saas --ts
# create JavaScript app
npx create-nexttify-saas my-saas
# use pnpm as package manager
npx create-nexttify-saas my-saas --pkg pnpmCommon errors
next: not found
- Run
npm iin the generated folder; Next.js installs with your app
- Run
Unexpected token 'export' in next.config.js
- Use the latest version (>= 0.1.4) or ensure JS template uses CommonJS
module.exports = nextConfig;
- Use the latest version (>= 0.1.4) or ensure JS template uses CommonJS
CLI installed inside existing project (no folder created)
- Remove it:
npm uninstall create-nexttify-saas - Re‑run with npx:
npx create-nexttify-saas my-saas
- Remove it:
Screenshots (npm page)
Package page shows a generic “npm i …” install. For create‑* CLIs, use
npxornpm createas shown above. Stripe setupCreate test keys in the Stripe Dashboard
Set
STRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRETin.env.localStart the app, then forward webhooks with the Stripe CLI:
stripe listen --forward-to localhost:3000/api/stripe-webhookExamples
npx create-nexttify-saas acme-saas --pkg pnpm --ts
npx create-nexttify-saas demo-saas # JS, npm
Folder structure (generated)
my-saas/ app/ page.(ts|js)x layout.(ts|js)x pricing/page.(ts|js)x api/ stripe-webhook/route.(ts|js) razorpay-webhook/route.(ts|js) # optional stub paypal-webhook/route.(ts|js) # optional stub cashfree-webhook/route.(ts|js) # optional stub lib/ stripe.(ts|js) payments/ stripe.(ts|js) razorpay.(ts|js) paypal.(ts|js) cashfree.(ts|js) tailwind.config.(ts|js) postcss.config.(ts|js) package.json
Note: Run this CLI with npx to scaffold a new folder (like create-react-app). Do not install it as a dependency in an existing project.Troubleshooting
- Node 18+ is required
- If
npxfails to find the command, clear cache:npx --yes create-next-saas my-saas - If install is slow, try a different registry mirror
License
MIT
