A modern, production-ready Next.js starter template with Supabase backend integration.
- Next.js 14 with App Router
- TypeScript with strict configuration
- Tailwind CSS with dark mode support
- Supabase for database and authentication
- Stripe integration for payments
- React Query for data fetching and caching
- ESLint and Prettier for code quality
- Responsive design with mobile-first approach
- Next.js 14 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Lucide React - Icons
- next-themes - Theme management
- Supabase - Backend as a Service
- PostgreSQL - Database
- Row Level Security (RLS) - Data security
- TanStack Query - Data fetching
- Stripe - Payment processing
- Zod - Schema validation
- date-fns - Date utilities
- Node.js 18+
- npm/yarn/pnpm
- Supabase account
git clone <your-repo-url>
cd nextjs-starter
npm install
cp .env.local.example .env.local
Fill in your environment variables:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Stripe (optional)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
# Other
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
npm run dev
Open http://localhost:3000 to see your application.
├── src/
│ ├── app/ # App Router pages
│ ├── components/ # Reusable components
│ ├── lib/ # Utility functions
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
├── tailwind.config.ts # Tailwind configuration
├── next.config.js # Next.js configuration
└── package.json
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLint
This starter uses Supabase Auth with support for:
- Email/Password authentication
- Social logins (Google, GitHub, etc.)
- Magic link authentication
- Row Level Security (RLS)
Stripe integration is pre-configured for:
- One-time payments
- Subscription billing
- Webhook handling
- Tailwind CSS for utility-first styling
- CSS Variables for theming
- Dark mode support with
next-themes
- Responsive design with mobile-first approach
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
This starter can be deployed on any platform that supports Node.js:
- Netlify
- Railway
- Render
- DigitalOcean App Platform
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add 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.
- Next.js for the amazing React framework
- Supabase for the backend infrastructure
- Tailwind CSS for the utility-first CSS framework
- Vercel for seamless deployment
Built with ❤️ using Next.js and Supabase