A modern, open-source SaaS starter kit built with Next.js 15 and Payload CMS, designed to accelerate your SaaS development.
payload-saas-starter.vercel.app
-
Authentication System
- Secure user authentication with HTTP-only cookies
- Email/password registration and login
- Role-based access control (admin/user)
- Password strength validation
- "Remember me" functionality
- Protected routes with middleware
-
Modern Tech Stack
- Next.js 15 with App Router
- Payload CMS for content management
- TypeScript for type safety
- PostgreSQL database with Payload adapter
- Tailwind CSS for styling
- Shadcn UI components
- Dark/light mode with theme persistence
-
Developer Experience
- Clean project structure
- Server components and actions
- Reusable design system components
- Type-safe APIs
- Vercel deployment ready
- Node.js 18+ and pnpm
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/brijr/payload-saas-starter.git cd payload-saas-starter
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env
Edit the
.env
file with your database credentials and other settings. -
Start the development server:
pnpm dev
-
Visit
http://localhost:3000
to see your application.
/src
/app # Next.js App Router
/(frontend) # Frontend routes
/(admin) # Protected admin routes
/(auth) # Authentication routes
/(site) # Public site routes
/(payload) # Payload CMS routes
/collections # Payload collections
/components # React components
/auth # Authentication components
/ds # Design system components
/site # Site components
/theme # Theme components
/ui # UI components
/lib # Utility functions
/public # Static assets
This project is ready to deploy on Vercel:
- Push your code to a GitHub repository
- Connect the repository to Vercel
- Configure environment variables
- Deploy!
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by brijr