Install the core package plus the framework integration and database adapter you need.
Next.js App Router
Install command
$ pnpm add @bolkauth/core @bolkauth/nextjs @bolkauth/reactThen add one adapter:
Drizzle
Install command
$ pnpm add @bolkauth/adapter-drizzle drizzle-ormPrisma
Install command
$ pnpm add @bolkauth/adapter-prisma @prisma/clientMongoDB
Install command
$ pnpm add @bolkauth/adapter-mongodb mongodbCLI Setup
You can also start from the CLI wizard:
Install command
$ pnpm dlx @bolkauth/cli initThe wizard can create lib/auth.ts, app/api/auth/[...bolkauth]/route.ts, middleware.ts, and .env.example.
Requirements
| Requirement | Notes |
|---|---|
| Node.js | Use Node.js 18 or newer for Web Crypto support. |
| TypeScript | Recommended for typed auth config, hooks, and adapter contracts. |
| Next.js | Use the App Router integration from @bolkauth/nextjs. |
| Database | Bring your own database through Drizzle, Prisma, MongoDB, or a custom adapter. |
Environment Variables
Create .env.local in your app:
Generate a session signing secret with: