Getting Started
Get your SaaS application up and running in minutes.
Installation
Step 1: Download Boilerplate
Download the Prisma Boilerplate from Dashboard
Step 2: Install dependencies
npm install
Step 3: Set up environment variables
Create a .env
file in the root directory with the following variables:
# DatabaseDATABASE_URL="postgresql://username:password@localhost:5432/saas_db"# AuthenticationGOOGLE_CLIENT_ID="your-google-client-id"GOOGLE_CLIENT_SECRET="your-google-client-secret"AUTH_SECRET="your-auth-secret"# Email (for Email Provider)EMAIL_SERVER_HOST="smtp.resend.com"EMAIL_SERVER_PORT="465"EMAIL_FROM="Your Name <onboarding@resend.dev>"EMAIL_SERVER_USER="resend"RESEND_API_KEY="re_..."# StripeSTRIPE_PUBLIC_KEY="your-stripe-publishable-key"STRIPE_SECRET_KEY="your-stripe-secret-key"STRIPE_WEBHOOK_SECRET="your-stripe-webhook-secret"NEXT_PUBLIC_APP_URL="http://localhost:3000"NODE_ENV="development"
See the Database, Authentication, Emails, Payments complete setup for your application.
Step 4: Start the development server
npm run dev
Your application running at http://localhost:3000.
Branding & Favicon Setup
- Update the
lib/config.ts
file with your startup's details - Update the
public/site.webmanifest
file with your startup's details - Generate Favicon using RealFaviconGenerator# Place these files in /app directory:app/└── favicon.ico# Place these files in /public directory:public/├── android-chrome-192x192.png├── android-chrome-512x512.png├── favicon-16x16.png├── favicon-32x32.png├── apple-touch-icon.png└── site.webmanifest
Project Structure
Directory Overview
Here's an overview of the main directories and files in the project:
saasboilerplate/├── app/ # Next.js app directory│ ├── (marketing)/ # Marketing pages (public)│ ├── (protecting)/ # Protected pages (require auth)│ ├── api/ # API routes│ └── ... # Other app routes├── components/ # React components│ ├── landing/ # Landing page components│ ├── ui/ # UI components│ └── ... # Other components├── data/ # Static data files├── lib/ # Utility functions and libraries│ ├── prisma.ts # Prisma client│ ├── stripe.ts # Stripe configuration│ └── ... # Other utilities├── prisma/ # Prisma schema and migrations│ ├── schema.prisma # Database schema│ └── migrations/ # Database migrations└── public/ # Static assets