A production-ready Next.js starter template with essential integrations for shipping full-stack applications insanely fast.
- Authentication - Ready-to-use authentication with NextAuth.js
- Database & ORM - Prisma ORM setup with your choice of database
- Payment Processing - Stripe integration with webhook handling
- UI Components - shadcn/ui components with Tailwind CSS
- Form Handling - React Hook Form with Zod validation
- Data Fetching - TanStack Query (React Query) integration
- Email Services - SendGrid/Resend integration
- Icons - Lucide icons/React Icons library
- Next.js
- NextAuth.js
- Prisma
- Stripe
- TanStack Query
- React Hook Form
- shadcn/ui
- Tailwind CSS
- Zod
- Lucide Icons
-
Install dependencies:
npm install
-
Create a
.envfile in the root directory and copy contents from.env.local. Then delete.env.local. Read carefully instructions in the file. -
Set up required credentials:
- Create a Google Cloud project for authentication
- Set up a database on Supabase or Neon.tech
- Configure Stripe for payments
- Set up SendGrid or Resend for emails
-
Initialize the database:
npx prisma db push npx prisma generate
-
Start the development server:
npm run dev
-
Test authentication by signing in
-
Customize your application:
- Update app name in
package.json - Modify metadata in utils file
- Search for "TODO" in the entire codebase and update accordingly
- Update app name in
Create a .env file with the following:
NEXTAUTH_URL=
NEXTAUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=DATABASE_URL=STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=SENDGRID_API_KEY=
RESEND_API_KEY=- Go to Google Cloud Console
- Create a new project
- Navigate to APIs & Services > Credentials
- Configure OAuth consent screen
- Create OAuth 2.0 Client ID
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google(development)https://your-domain.com/api/auth/callback/google(production)
- Choose your database provider, either works:
- Create a new project
- Copy the database connection URL
- Update
DATABASE_URLin your.envfile
The starter includes a pre-configured Stripe webhook handler (/api/webhooks/route.js) for processing payments. To set up:
- Create a Stripe account
- Get your API keys from the dashboard
- Set up webhook endpoints
- Update your
.envfile with Stripe credentials
src/
├── app/
│ ├── api/ # API routes including auth and webhooks
│ ├── components/ # UI components
│ └── ...
├── lib/ # Utility functions and configurations
├── prisma/ # Database schema
└── ...
app/api/auth/[...nextauth]/route.js- Authentication configurationapp/api/webhooks/route.js- Stripe webhook handlerlib/auth.js- Authentication utilitieslib/stripe.js- Stripe configurationprisma/schema.prisma- Database schema
- Adding New API Routes: Create new files in
app/api/ - Construct Your Schema: Update
prisma/schema.prismaand runnpx prisma db push - UI Components: Find pre-built components in
app/components/ui - Authentication: Add providers in
app/api/auth/[...nextauth]/route.js
- Authentication Issues: Verify Google Cloud credentials and redirect URIs
- Database Errors: Check DATABASE_URL and ensure Prisma schema is synced
- Stripe Webhook Errors: Verify webhook secret and endpoint configuration
Built with ❤️ by Run @runbuilds