A Next.js template that combines commonly used tools and libraries for building full-stack web applications. This stack is specifically designed to be optimized for AI coding assistants like Cursor.
This template includes Next.js 14 with the App Router, Supabase for the database, Resend for transactional emails, and optional integrations with various AI providers and AWS services.
⚠️ Note: This is my personal template with tools that I personally have experience with and think are solid options for building modern full-stack web application. Your preferences very likely differ, so feel free to fork and modify it for your own use. I won't be accepting pull requests for additional features, but I'll be happy to help you out if you have any questions.
- Next.js 14 - React framework with App Router
- TypeScript - Type safety throughout
- tRPC - End-to-end type-safe APIs
- Prisma - Database ORM and schema management
- NextAuth.js - Authentication with Prisma adapter
- Supabase - Postgres database with realtime and auth
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Lucide Icons - Icon set
- Dark mode with Tailwind CSS
- Storybook - Component development environment
- Geist Font - Typography by Vercel
- Multiple AI integrations available:
- OpenAI - GPT-4 and o-series models
- Anthropic - Sonnet-3.5
- Perplexity - Web search models
- Groq - Fast inference
- Inngest - Background jobs and scheduled tasks
- Resend - Email delivery
- AWS S3 - File storage
- Supabase - Primary database (Note that I don't directly use the supabase client in this template, so you can switch out supabase with other database providers via the DATABASE_URL and DIRECT_URL environment variables.)
- react-toastify - Toast notifications
- Utility functions for common operations
- TypeScript and ESLint configuration included
- Fork this repository
- Install dependencies:
npm install
- Copy
.env.example
to.env
and configure your environment variables - Set up your database:
npx prisma migrate dev
- Start the development server:
npm run dev
Visit http://localhost:3000 to see your app.
app/
- Next.js app router pages and API routessrc/
components/
- UI componentslib/
- Utilities and configurationsapi/
- tRPC routersutils/
- Shared utilities
stories/
- Storybook files
prisma/
- Database schema
This template is optimized for deployment on Vercel.
- Create a new Supabase project at supabase.com
- Get your database connection strings from Supabase:
- Project Settings → Database
- Copy both the URI (for
DATABASE_URL
) and Direct Connection (forDIRECT_URL
)
- Push your code to GitHub
- Go to vercel.com/new
- Import your repository
- Configure the following environment variables:
DATABASE_URL
- Your Supabase database URLDIRECT_URL
- Your Supabase direct connection URLNEXTAUTH_SECRET
- Generate withopenssl rand -base64 32
NEXTAUTH_URL
- Your production URL (e.g., https://your-app.vercel.app)- Add any other variables from
.env.example
that you're using
- Deploy!
- Run database migrations in the Vercel deployment:
npx vercel env pull .env.production.local # Pull production env vars
npx prisma migrate deploy # Deploy migrations to production
- Set up your custom domain in Vercel (optional):
- Go to your project settings
- Navigate to Domains
- Add your domain and follow the DNS configuration instructions
MIT License