Key Features • Tech Stack • Quick Start • Project Structure
Looking for a mobile app boilerplate? Check out NativeExpress - The ultimate React Native & Expo boilerplate!
Clone the repository:
git clone https://github.com/robinsadeghpour/saas-boilerplate.git
cd saas-boilerplate
Install dependencies:
pnpm install
Copy the environment variables:
cp .env.example .env
Start the PostgreSQL database:
./start-database.sh
Run database migrations:
pnpm prisma migrate dev
Start the development server:
pnpm dev
src/
├── app/ # Next.js App Router pages and layouts
├── components/ # Reusable UI components
├── hooks/ # Custom React hooks
├── lib/ # Core utilities and services
├── provider/ # Context providers and wrappers
├── server/ # Server-side logic
├── styles/ # Global styles and Tailwind config
├── trpc/ # tRPC router and procedures
└── types/ # TypeScript types and interfaces
🚀 NativeExpress - The ultimate React Native & Expo boilerplate with all the features you need to build production-ready mobile apps.
Follow on X • Subscribe on YouTube
This project is maintained by Robin Faraj
The following environment variables are required for the application to function properly:
DATABASE_URL
: PostgreSQL connection URLNEXT_PUBLIC_STACK_PROJECT_ID
: Your Stack Auth project IDNEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY
: Your Stack Auth publishable client keySTACK_SECRET_SERVER_KEY
: Your Stack Auth secret server keyThese environment variables are optional but enable additional features:
RESEND_API_KEY
: For email functionalityRESEND_AUDIENCE_ID
: For newsletter managementSENTRY_ORG
and SENTRY_PROJECT
: For error trackingNEXT_PUBLIC_POSTHOG_HOST
and NEXT_PUBLIC_POSTHOG_KEY
: For analyticsCopy .env.example
to .env
Set up the database:
./start-database.sh
pnpm db:push
For Stack Auth credentials: