VIBE CODING TEMPLATE by llm_san
✅ Follow me on Twitter
✅ If you like this project, consider sponsoring me
A modern, full-stack Next.js application template built for rapid development and scalability. This template provides a complete foundation for building SaaS applications with authentication, payments, and analytics.
- 🎨 Modern UI: Built with Next.js 15, React 19, TypeScript, and Tailwind CSS
- 🔐 Authentication: Complete auth system with Clerk
- 💳 Payments: Stripe integration with subscription management
- 📊 Analytics: PostHog integration for user tracking
- 🤖 AI Ready: OpenAI integration setup
- 🗄️ Database: PostgreSQL with Supabase and Drizzle ORM
- 📱 Responsive: Mobile-first design with clean UI components
- 🔧 Developer Experience: ESLint, Prettier, TypeScript, and comprehensive tooling
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + Shadcn/UI components
- UI Library: Radix UI primitives
- Animations: Framer Motion
- Database: PostgreSQL with Supabase
- ORM: Drizzle with type-safe queries
- API: Next.js Server Actions
- File Upload: Built-in support
- Authentication: Clerk (social logins, user management)
- Payments: Stripe (subscriptions, one-time payments)
- Analytics: PostHog (user tracking, feature flags)
- AI: OpenAI API integration
- Package Manager: Yarn (required)
- Node.js: v20.12.2 (see .nvmrc)
- Linting: ESLint + Prettier
- Git Hooks: Husky for pre-commit checks
Before getting started, you'll need accounts for these services (all have free tiers):
- GitHub - Code repository
- Supabase - Database hosting
- Clerk - Authentication
- Stripe - Payments
- PostHog - Analytics
- Vercel - Deployment (recommended)
Create a .env.local file in your project root:
# Database (Supabase)
DATABASE_URL=your_supabase_connection_string
# Authentication (Clerk)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/login
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/signup
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard
# Payments (Stripe)
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
NEXT_PUBLIC_STRIPE_PORTAL_LINK=your_stripe_portal_link
NEXT_PUBLIC_STRIPE_PAYMENT_LINK_YEARLY=your_yearly_payment_link
NEXT_PUBLIC_STRIPE_PAYMENT_LINK_MONTHLY=your_monthly_payment_link
# Analytics (PostHog)
NEXT_PUBLIC_POSTHOG_KEY=your_posthog_project_key
NEXT_PUBLIC_POSTHOG_HOST=https://eu.i.posthog.com
# AI (OpenAI) - Optional
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4o-mini-
Clone the repository
git clone <your-repo-url> cd vibe-template
-
Set up Node.js version
# Install and use the correct Node.js version nvm install 20.12.2 nvm use 20.12.2 -
Install dependencies
yarn install
-
Environment setup
# Copy environment template cp .env.example .env.local # Fill in your environment variables (see section above)
-
Database setup
# Push database schema yarn db:push -
Start development server
yarn dev
Your app will be available at http://localhost:3000
yarn dev- Start development serveryarn build- Build for productionyarn start- Start production server
yarn clean- Fix linting and format code (recommended after changes)yarn lint- Run ESLintyarn lint:fix- Auto-fix linting issuesyarn type-check- TypeScript type checkingyarn format:write- Format code with Prettier
yarn db:push- Push schema changes to databaseyarn db:generate- Generate new migrationsyarn db:migrate- Run pending migrations
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages
│ ├── (marketing)/ # Public marketing pages
│ └── dashboard/ # Protected dashboard
├── components/ # Reusable UI components
│ ├── ui/ # Shadcn/UI components
│ ├── header/ # Header components
│ └── sidebar/ # Sidebar components
├── lib/ # Utilities and configurations
│ ├── services/ # External service integrations
│ └── config/ # Environment configurations
├── db/ # Database schema and migrations
├── actions/ # Server Actions
├── types/ # TypeScript type definitions
└── hooks/ # Custom React hooks
- Component Organization: Folder-based with focused sub-components
- Data Flow: React Components → Server Actions → Services
- Type Safety: End-to-end TypeScript with schema-generated types
- Code Quality: Strict ESLint rules with auto-formatting
The template includes a complete authentication system:
- Sign Up/Sign In: Custom styled Clerk components
- Protected Routes: Automatic redirects for authenticated users
- User Management: Profile creation and management
- Social Logins: Google, GitHub, and other providers
Stripe integration includes:
- Subscription Management: Monthly/yearly plans
- Customer Portal: Self-service billing
- Webhook Handling: Automatic subscription status updates
- Type-Safe: Full TypeScript support
PostHog integration provides:
- User Tracking: Page views and custom events
- Feature Flags: A/B testing capabilities
- User Identification: Automatic user association
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push
Make sure to set all the environment variables from the .env.local example in your deployment platform.
- Fork the repository
- Create a feature branch
- Make your changes
- Run
yarn cleanto ensure code quality - Submit a pull request
MIT License - see LICENSE file for details.
For questions and support:
- Create an issue in the repository
- Check the documentation in
CLAUDE.mdfor development guidelines
If you find this template useful, consider supporting its development:
- Sponsor on GitHub
- Follow me on Twitter for updates
Built by Santiago Pablo Ortiz (llm_san) • 2025