A Next.js Authentication starter template. Includes Drizzle, MySql, TanStack Query, TailwindCSS, shadcn/ui, zod and React Hook Form.
copy the .env.example
file to .env
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=123456
MYSQL_DATABASE=next-drizzle
SESSION_SECRET_KEY=your-secret-key
Install dependencies
pnpm install
Generate the Drizzle
pnpm db:generate
Migrate Database with Drizzle
pnpm db:migrate
Run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
- Delba Youtube Channel - Next.js: Authentication (Best Practices for Server Components, Actions, Middleware)
- Next.js Documentation - Authentication
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!