Docs
Installation
Installation
Step-by-step guide to install and configure your SaaS project
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 18+
- bun (recommended) or npm
- Git
- A code editor (NeoVim, VSCode, etc.)
Create project
Choose one of these methods to create your project:
Method 1: Using create-next-app
npx create-next-app my-saas-project --example "https://github.com/mageshyt/next-saas-starter"Method 2: Clone repository
git clone https://github.com/mageshyt/next-saas-starter my-saas-project
cd my-saas-projectA good way to create your repository, but the deployment will fail because you need to add your environment variables locally in your project. Follow the documentation for that.
Install dependencies
Enter in the folder and install dependencies for your project:
cd my-saas-project
bun installCreate a .env file
Copy/paste the .env.example in the .env file:
NEXT_PUBLIC_APP_URL=http://localhost:3000
AUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_OAUTH_TOKEN=
DATABASE_URL=
RESEND_API_KEY=
EMAIL_FROM=
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
NEXT_PUBLIC_STRIPE_PRO_MONTHLY_PLAN_ID=
NEXT_PUBLIC_STRIPE_PRO_YEARLY_PLAN_ID=
NEXT_PUBLIC_STRIPE_BUSINESS_MONTHLY_PLAN_ID=
NEXT_PUBLIC_STRIPE_BUSINESS_YEARLY_PLAN_ID=Configuration part
Let's check the configuration part for update all environment variables before use bun run dev.