A comprehensive starter template for modern web development, featuring Next.js 15, React 19, Supabase, Prisma, ShadCN UI, and more.
Clone the repository: ``` git clone https://github.com/yourusername/nextjs-supabase-boilerplate.git ```
Navigate to the project directory: ``` cd nextjs-supabase-boilerplate ```
Install dependencies: ``` npm install ``` or ``` yarn install ```
Set up environment variables (see Environment Variables section below)
Run the development server: ``` npm run dev ``` or ``` yarn dev ```
Open http://localhost:3000 in your browser to see the result.
Create a .env.local
file in the root directory and add the following variables:
```env
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
DATABASE_URL=your_database_connection_string
RESEND_API_KEY=your_resend_api_key
HASHNODE_PUBLICATION_ID=your_hashnode_publication_id ```
Supabase:
Database URL:
Resend:
Hashnode:
The boilerplate comes with Supabase authentication set up. Use the AuthForm
component to handle sign-up and sign-in functionality.
Prisma is configured to work with your Supabase database. Use the Prisma client in your API routes or server components to perform database operations.
The blog is integrated with Hashnode CMS, a feature-rich CMS platform, where you can create posts seamlessly. Posts are fetched and displayed in the /blog
route.
Stripe payment integration enables you to receive payments from your users.
Paystack is a Stripe alternative for users in Africa who can't access Stripe.
Resend Integration enables you to send transactional emails at scale.
A contact form is available that sends emails using Mailgun. The form submission is handled by the /api/contact
route.
The project uses Tailwind CSS for styling. Customize the theme in the tailwind.config.js
file.
``` ├── src/app/ │ ├── api/ │ ├── blog/ │ ├── dashboard/ │ ├── profile/ │ ├── layout.tsx │ └── page.tsx
├── components/ui ├── lib/ ├── prisma/ ├── public/ ├── utils/ ├── lib/ ├── prisma/ ├── public/
└── ...configuration files ```
theme-provider.tsx
file to customize the themecomponents/
directoryapp/api/
directoryprisma/schema.prisma
and run migrationssrc/app
folder and add them to your header, footer, or dashboard.This project is ready to be deployed on Vercel:
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.