A free, open-source Next.js SaaS boilerplate to help you ship your product 10x faster.
- Next.js 15 - Latest App Router with React 19
- TypeScript - Full type safety across the codebase
- Authentication - Email/password & OAuth (Google, GitHub) with Better-Auth
- Database - PostgreSQL with Drizzle ORM
- Payments - Stripe integration for subscriptions
- Email - Transactional emails with Resend
- Dark Mode - Built-in theme switching with next-themes
- UI Components - Beautiful components with Tailwind CSS
- SEO Optimized - Meta tags, Open Graph, and more
- Responsive - Mobile-first design
| Category | Technology |
|---|---|
| Framework | Next.js 15 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Authentication | Better-Auth |
| Database | PostgreSQL + Drizzle ORM |
| Payments | Stripe |
| Resend | |
| Icons | Lucide React |
- Node.js 18+
- PostgreSQL database
- npm or yarn
- Clone the repository
git clone https://github.com/Harries/startfast-free.git
cd startfast-free- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localEdit .env.local with your credentials:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/startfast"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key-min-32-chars"
BETTER_AUTH_URL="http://localhost:3000"
# OAuth (optional)
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
# Stripe
STRIPE_SECRET_KEY=""
STRIPE_WEBHOOK_SECRET=""
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=""
# Resend
RESEND_API_KEY=""
EMAIL_FROM="noreply@yourdomain.com"- Push database schema
npm run db:push- Start development server
npm run devOpen http://localhost:3000 to see your app.
startfast-free/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ │ ├── auth/ # Better-Auth endpoints
│ │ │ └── webhooks/ # Stripe webhooks
│ │ ├── auth/ # Auth pages (signin, signup)
│ │ ├── dashboard/ # User dashboard
│ │ ├── docs/ # Documentation page
│ │ ├── privacy/ # Privacy policy
│ │ ├── terms/ # Terms of service
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Landing page
│ ├── components/
│ │ ├── layout/ # Header, Footer
│ │ ├── sections/ # Landing page sections
│ │ │ ├── hero.tsx
│ │ │ ├── features.tsx
│ │ │ ├── pricing.tsx
│ │ │ ├── testimonials.tsx
│ │ │ ├── faq.tsx
│ │ │ └── cta.tsx
│ │ ├── ui/ # Reusable UI components
│ │ ├── providers.tsx # Context providers
│ │ └── theme-toggle.tsx # Dark mode toggle
│ ├── db/
│ │ └── schema.ts # Drizzle database schema
│ ├── lib/
│ │ ├── auth.ts # Better-Auth server config
│ │ ├── auth-client.ts # Better-Auth client
│ │ ├── db.ts # Database connection
│ │ ├── stripe.ts # Stripe configuration
│ │ ├── email.ts # Email service
│ │ └── utils.ts # Utility functions
│ └── styles/
│ └── globals.css # Global styles
├── .env.example # Environment variables template
├── drizzle.config.ts # Drizzle ORM config
├── next.config.ts # Next.js config
├── tailwind.config.ts # Tailwind CSS config
└── tsconfig.json # TypeScript config
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run db:push |
Push schema to database |
npm run db:studio |
Open Drizzle Studio |
npm run db:generate |
Generate migrations |
The project includes the following tables:
- users - User accounts
- sessions - Authentication sessions
- accounts - OAuth provider accounts
- verifications - Email verification tokens
- subscriptions - Stripe subscription data
StartFast uses Better-Auth for authentication:
- Email/Password sign up and sign in
- OAuth providers (Google, GitHub)
- Session management
- Password reset (with email)
Stripe integration includes:
- Checkout sessions
- Subscription management
- Webhook handling
- Customer portal
Update the logo and brand name in:
src/components/layout/header.tsxsrc/components/layout/footer.tsx
Modify the color palette in tailwind.config.ts:
colors: {
primary: { ... },
secondary: { ... },
}Edit sections in src/components/sections/:
hero.tsx- Hero section with CTAfeatures.tsx- Feature highlightspricing.tsx- Pricing planstestimonials.tsx- Customer reviewsfaq.tsx- Frequently asked questionscta.tsx- Call to action
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
StartFast works with any platform supporting Next.js:
- Railway
- Render
- AWS Amplify
- Docker
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please give it a star on GitHub!
Built with ❤️ by Harries