The ultimate Next.js starter template β Modern, fast, and production-ready with cutting-edge technologies.
- ποΈ Next.js 15 β Latest React framework with App Router and Turbopack
- βοΈ React 19 β Latest React with improved performance and concurrent features
- π¨ Tailwind CSS v4 β Cutting-edge styling with CSS variables and dark mode
- π Dark Mode β Built-in theme switching with next-themes (defaults to dark)
- π Authentication β Complete Supabase auth with SSR, OAuth, and role-based access
- ποΈ Database β Type-safe Supabase + Drizzle ORM with auto-generated types
- π‘οΈ Security β Route protection, middleware guards, and RLS policies
- π UI Components β 11 pre-installed shadcn/ui components with Lucide icons
- β¨ Animations β Motion library for smooth, performant interactions
- π Type Safety β Full TypeScript with Zod validation and T3 Env
- β‘ Performance β Optimized fonts, images, and server-side rendering
- π οΈ Developer Experience β Biome linting, comprehensive docs, and examples
# Clone the repository
git clone <your-repo-url> my-app
cd my-app
# Install dependencies
bun install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your values
# Run the development server
bun devOpen http://localhost:3000 to see your application.
- Next.js 15.5.2 β React framework with App Router and Turbopack
- React 19 β Latest React with improved performance
- TypeScript 5 β Type safety and developer experience
- Bun β Fast JavaScript runtime and package manager
- Tailwind CSS v4 β Utility-first CSS framework with CSS variables
- next-themes β Perfect dark mode with system detection
- shadcn/ui β Beautifully designed accessible components
- Lucide Icons β Beautiful & consistent icon library
- Motion β Production-ready animation library
- Geist Font β Optimized typography from Vercel
- Supabase β Database, authentication, and real-time features
- @supabase/ssr β Server-side rendering support
- Drizzle ORM β Type-safe database toolkit
- PostgreSQL β Robust relational database
- Biome β Fast linter and formatter
- T3 Env β Type-safe environment variables
- Zod β TypeScript-first schema validation
neo/
βββ app/ # Next.js App Router
β βββ favicon.ico # App favicon
β βββ globals.css # Global styles and Tailwind imports
β βββ layout.tsx # Root layout component
β βββ page.tsx # Home page
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β β βββ alert.tsx # Alert component
β β βββ avatar.tsx # Avatar component
β β βββ badge.tsx # Badge component
β β βββ button.tsx # Button component
β β βββ card.tsx # Card component
β β βββ dialog.tsx # Dialog/Modal component
β β βββ dropdown-menu.tsx # Dropdown menu component
β β βββ input.tsx # Input component
β β βββ sonner.tsx # Toast notification component
β β βββ switch.tsx # Switch/Toggle component
β β βββ tabs.tsx # Tabs component
β βββ mode-toggle.tsx # Theme toggle component
β βββ theme-provider.tsx # Theme provider wrapper
βββ hooks/ # Custom React hooks (ready for use)
βββ lib/ # Utility functions and configurations
β βββ db/ # Database configuration
β β βββ index.ts # Database connection
β β βββ schema.ts # Database schema definitions
β βββ supabase/ # Supabase client configuration
β β βββ client.ts # Client-side Supabase client
β β βββ server.ts # Server-side Supabase client
β βββ auth.ts # Authentication utilities
β βββ env.ts # Environment variable validation
β βββ utils.ts # Shared utilities
βββ types/ # TypeScript type definitions
β βββ supabase.ts # Database types (auto-generated)
βββ drizzle/ # Database migrations (auto-generated)
βββ public/ # Static assets
βββ .env.example # Environment variables template
βββ middleware.ts # Next.js auth middleware
βββ biome.json # Biome configuration
βββ components.json # shadcn/ui configuration
βββ drizzle.config.ts # Drizzle ORM configuration
βββ next.config.ts # Next.js configuration
βββ tsconfig.json # TypeScript configuration
Neo comes with a comprehensive dark mode implementation using next-themes, providing seamless theme switching with proper SSR support.
- π Dark mode by default β Launches in dark theme for better UX
- π Smooth transitions β No flash of unstyled content (FOUC)
- π₯οΈ System preference detection β Automatically respects user's OS setting
- πΎ Persistence β Remembers user's theme choice across sessions
- β‘ SSR compatible β No hydration mismatches
The theme toggle is located on the homepage below "Hello World" and provides three options:
- Light β Clean, bright interface
- Dark β Easy on the eyes (default)
- System β Follows OS preference
// Theme provider wraps the entire app
<ThemeProvider
attribute="class"
defaultTheme="dark"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>The theme system uses CSS classes (.dark) to toggle styles, making it compatible with Tailwind CSS's dark mode utilities.
Neo includes a comprehensive .env.example file with all necessary environment variables. Copy it to .env.local and configure:
# Copy the environment template
cp .env.example .env.localRequired variables:
# Supabase Configuration (Required)
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key-here
DATABASE_URL=postgresql://postgres:password@host:5432/postgres
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
# Application Configuration
NODE_ENV=development
NEXT_PUBLIC_APP_URL=http://localhost:3000Optional services (uncomment and configure as needed):
- OpenAI API for AI features
- Stripe for payment processing
- Resend for transactional emails
- Analytics (Google Analytics, PostHog)
- Error monitoring (Sentry)
The .env.example file includes detailed documentation for each variable with setup instructions.
Neo comes with a complete Drizzle ORM setup for Supabase. Follow these steps to get your database running:
-
Create a Supabase project
- Sign up at supabase.com
- Create a new project
- Wait for the project to be ready
-
Configure environment variables
# Copy the example file cp .env.example .env.local # Add your Supabase credentials to .env.local: NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key DATABASE_URL=postgresql://postgres:[password]@[host]:5432/postgres
-
Set up your database schema
# Generate migration files from your schema bunx drizzle-kit generate # Apply migrations to your database bunx drizzle-kit migrate # Optional: Open Drizzle Studio to view your data bunx drizzle-kit studio
-
Example schema included
usersTable- User accounts and profilespostsTable- Content managementcommentsTable- User comments with threading- Full relationships and type inference
Neo includes a complete Supabase authentication system with advanced features:
- Email/Password Authentication β Traditional signup and login
- OAuth Integration β Google, GitHub, Discord, Facebook, Twitter
- Magic Links β Passwordless authentication via email
- Password Reset β Secure password recovery flow
- Email Verification β Account verification system
- Session Management β Automatic token refresh and persistence
- Route Protection β Next.js middleware with automatic redirects
- Role-based Access Control β Admin, moderator, user roles with hierarchy
- Row Level Security β Database-level access control via Supabase
- CSRF Protection β Built-in security measures with SameSite cookies
- Type-safe Auth β Full TypeScript integration throughout
- SSR Compatible β Full @supabase/ssr integration with Next.js App Router
- Cookie-based Sessions β Secure session persistence across server/client
- Automatic Refresh β Token refresh without user interaction via middleware
- Client/Server Sync β Consistent auth state everywhere with no hydration issues
- Multiple Client Types β Specialized clients for Server Components, API routes, and Server Actions
Sign up a new user:
import { signUp } from '@/lib/auth'
const result = await signUp('user@example.com', 'password123', {
name: 'John Doe'
})Protect API routes:
import { requireAuth } from '@/lib/auth'
export async function POST() {
const user = await requireAuth() // Throws if not authenticated
// Handle authenticated request
}Check user permissions:
import { checkUserRole } from '@/lib/auth'
const canModerate = await checkUserRole('moderator')Use in components:
import { getCurrentUser } from '@/lib/supabase/server'
export default async function ProtectedPage() {
const user = await getCurrentUser()
if (!user) redirect('/login')
return <div>Welcome, {user.email}!</div>
}The lib/auth.ts file provides comprehensive authentication utilities:
User Management:
signUp()- Register new users with email verificationsignIn()- Authenticate with email/passwordsignInWithOAuth()- OAuth authentication (Google, GitHub, Discord, etc.)signOut()- Secure sign outresetPassword()- Password recoveryupdatePassword()- Password updates
Profile Management:
getCurrentUserProfile()- Get user profile datacreateUserProfile()- Create user profilesupdateUserProfile()- Update user information
Authorization:
requireAuth()- Protect API routes (throws if not authenticated)requireRole()- Role-based protection (admin, moderator, user)checkUserRole()- Check user permissionsisUserActive()- Check account status
Admin Functions:
banUser()- Deactivate user accountsunbanUser()- Reactivate accountsvalidatePassword()- Password strength validation
Neo comes with essential shadcn/ui components ready to use:
- Button β All interaction types and variants
- Input β Text inputs and form controls
- Card β Content containers and layouts
- Dialog β Modals, confirmations, and overlays
- Alert β Notifications and status messages
- Badge β Labels and status indicators
- Tabs β Content organization and navigation
- Avatar β User profiles and images
- Sonner β Modern toast notifications
- Switch β Toggle controls and settings
- Dropdown Menu β Context menus and actions
Add additional shadcn/ui components as needed:
bunx shadcn@latest add table
bunx shadcn@latest add select
bunx shadcn@latest add checkbox# Development
bun dev # Start development server with Turbopack
bun build # Build for production
bun start # Start production server
# Code Quality
bun lint # Lint code with Biome
bun format # Format code with Biome
# Database
bunx drizzle-kit generate # Generate database migrations
bunx drizzle-kit migrate # Apply database migrations
bunx drizzle-kit studio # Open Drizzle StudioNeo includes a comprehensive design system with CSS variables that automatically adapt to light and dark modes. The theme system is built with next-themes and Tailwind CSS v4.
Customize colors in app/globals.css for both light and dark modes:
/* Light mode (default) */
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
/* ... */
}
/* Dark mode */
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
/* ... */
}Apply dark mode styles using Tailwind's dark: prefix:
<div className="bg-white dark:bg-black text-black dark:text-white">
Content that adapts to theme
</div>Update the default theme in app/layout.tsx:
<ThemeProvider
attribute="class"
defaultTheme="light" // Change to "light", "dark", or "system"
enableSystem
disableTransitionOnChange
>Fonts are configured in app/layout.tsx. Replace Geist with your preferred fonts:
import { Inter, JetBrains_Mono } from "next/font/google";
const inter = Inter({ subsets: ["latin"] });- Push your code to GitHub
- Connect your repo to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push
# Build the application
bun build
# Start the production server
bun start- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
- Next.js team for the incredible React framework
- Supabase for the powerful backend-as-a-service platform
- Tailwind CSS for the utility-first CSS framework
- shadcn for the beautiful and accessible UI components
- Drizzle Team for the type-safe ORM
- T3 Stack for environment variable patterns
- Vercel for fonts and deployment infrastructure
Built with β€οΈ using Neo
Get Started Β· Features Β· Tech Stack