LogoRobo.js
TemplatesWeb apps

Next.js + Auth

A Next.js template with authentication using @robojs/auth and Prisma.

Next.js + Auth

Next.js with @robojs/auth and Prisma for authentication.

Getting Started

Create a project with this template:

npx create-robo@next <project-name> --template web-apps/next-auth-ts

Then navigate into your project directory:

cd <project-name>

Configure your database in .env:

DATABASE_URL="postgresql://user:password@localhost:5432/myapp"

Run migrations:

npx prisma migrate dev

Run development mode:

npm run dev

Features

  • Discord OAuth authentication
  • Session management
  • User database with Prisma
  • Protected routes
schema.prismaDatabase schema
.envDatabase URL

Hosting

npm run deploy

On this page