Uses the Next.js App Router to organize pages and routes
next-authjs-template — Next.js Starter Template
By caru-ini
An authentication starter template built on the Next.js App Router, integrating Auth.js, Prisma, PostgreSQL, Tailwind CSS, and shadcn/ui, with a Docker-based local database and T3 Env environment variable validation.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Integrates Auth.js (Next-Auth v5) to implement authentication flows
Accesses PostgreSQL via Prisma and provides migration scripts
Builds interface components with Tailwind CSS and shadcn/ui
Provides docker-compose to start a local database container
Uses T3 Env for type-safe validation of environment variables
Template Details
This is a full-stack starter template for authentication scenarios; the repository describes it as a Next.js 15 + Auth.js + Prisma + shadcn/ui Starter Kit. The template uses the Next.js App Router, with Auth.js (Next-Auth v5) for the authentication layer, Prisma for data access to PostgreSQL, and Docker to start a database container for local development. The UI is built with Tailwind CSS and shadcn/ui components, environment variables are validated for type safety via T3 Env, and code linting uses ESLint 9's flat config.
The usage path is fairly complete in the README: you can create a repository from the template using create-next-app or the GitHub CLI, install dependencies, generate an authentication secret with the auth CLI, configure AUTH_SECRET, DATABASE_URL, and the GitHub OAuth ID and Secret in .env.local, then start the database via docker-compose, run Prisma migrations, and start the development server. For deployment, the README recommends Vercel or Coolify and notes that on self-hosted platforms such as Coolify you need to set AUTH_TRUST_HOST=true.
Limitations to note: the template's default third-party login example is GitHub OAuth, and the README does not list other login methods; the database points to a local PostgreSQL container by default; the repository also contains a more complete fullstack-template (switching to better-auth, Hono, S3, etc.), while this template is positioned as a basic authentication starting point. The demo site and screenshots are for interface display only, and the licensing and costs of third-party assets and external services (domain, hosting, database) must be verified separately.
Is it right for your project?
Use Cases
- Quickly setting up a full-stack project skeleton with login functionality
- Verifying the authentication flow using GitHub OAuth as an example
- Running PostgreSQL locally with Docker for development and debugging
- Using as a reference project for learning how the Next.js App Router works with Auth.js
Suitable For
- Developers familiar with Next.js and TypeScript who want to skip authentication configuration
- Teams needing starter code for a Prisma + PostgreSQL data layer
- Interface developers who prefer the Tailwind CSS and shadcn/ui component style
- Self-hosting users preparing to deploy to platforms such as Vercel or Coolify
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
You can create a repository from the template via pnpm create next-app -e or gh repo create --template
- 2
After installing dependencies, generate AUTH_SECRET using pnpm dlx auth@latest secret
- 3
Configure AUTH_SECRET, DATABASE_URL, AUTH_GITHUB_ID, and AUTH_GITHUB_SECRET in .env.local
- 4
Start the database with docker-compose up -d, then run pnpm prisma:migrate to complete migrations
- 5
When deploying on self-hosted platforms such as Coolify, set AUTH_TRUST_HOST=true
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version of the public repository under the MIT license; the free scope is the code of that version and does not mean external services or third-party assets are free.
Must comply with when using
- You are allowed to use, modify, commercially use, and distribute the code of this version for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Using GitHub OAuth login requires registering a GitHub OAuth app yourself and providing a client ID and secret, which is an external service account requirement.
- A GitHub OAuth client secret must be configured; authentication depends on the external GitHub service and does not run independently locally.
- You must provide a PostgreSQL database connection yourself; the template points to a local container by default, and a separate database service is needed for production.
- Deployment recommends third-party hosting platforms such as Vercel or Coolify, which may incur external service costs.
- When deploying on self-hosted platforms such as Coolify, you must additionally set the AUTH_TRUST_HOST=true environment variable.
- More advanced features (better-auth, Hono, S3, etc.) are in a separate template repository and are not within the scope of this free template.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
- External services such as domain, hosting, database, payment, or AI may charge additional fees.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
AUTH_GITHUB_ID=your_github_id
Original README
AUTH_GITHUB_SECRET=your_github_secret
Original README
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
Original README
Recommend [Vercel](https://vercel.com/) or [Coolify](https://coolify.io/) for deployment.
Original README
you should set `AUTH_TRUST_HOST=true` in environment variables.
Original README
https://github.com/caru-ini/next-authjs-template/blob/main/LICENSEhttps://github.com/caru-ini/next-authjs-template/blob/main/README.mdWant to use `better-auth` instead of `auth.js` or more advanced features? Check out our **Enhanced Fullstack Template**!
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-03. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 87 / 100
- Technologies
- Next.js · React
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-09-29
- Screenshot last checked
- 2026-10-03
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: [email protected] · 2026-10-04
Inspect the recorded source material
SHA-256: ca11744bbb310b1d880f096ed1a48a4087f1edfc1063191e4564182429936a5c
2026-10-03T13:46:35.406Z
Source file / repository# Next.js Auth.js Template This project is a web application template with authentication features, using Next.js 15 and Auth.js. It incorporates modern web development best practices, enabling rapid development initiation. ## Key Features - **Next.js 15(App Router)**: Utilizing the latest React framework - **ESLint 9**: Latest version of ESLint (flat config) - **Auth.js(Next-Auth v5)**: Easy implementation of a secure authentication system - **Tailwind CSS**: Customizable utility-first CSS framework - **shadcn/ui**: Functional UI components - **Prisma**: Efficient database operations with a type-safe ORM - **PostgreSQL**: Reliable relational database - **Docker**: Database containerization for local development - **T3 Env**: Type-safe environment variables with validation ## Setup Instructions 1. Clone the repository With create-next-app ```bash pnpm create next-app -e https://github.com/caru-ini/next-authjs-template ``` or using GitHub CLI ```bash gh repo create <your-repo-name> --template https://github.com/caru-ini/next-authjs-template --clone ``` 2. Install dependencies: ```bash pnpm i ``` 3. Generate auth.js secret ```bash pnpm dlx auth@latest secret ``` 4. Set up environment variables: Create a `.env.local` file and set the necessary environment variables: ```env AUTH_SECRET=your_auth_secret # already generated DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public" AUTH_GITHUB_ID=your_github_id AUTH_GITHUB_SECRET=your_github_secret ``` 5. Set up the database: ```bash docker-compose up -d ``` 6. Run Prisma migrations: ```bash pnpm prisma:migrate ``` 7. Start the development server: ```bash pnpm dev ``` ## Deployment Recommend [Vercel](https://vercel.com/) or [Coolify](https://coolify.io/) for deployment. On coolify (or other self-hosted deployment platforms), you should set `AUTH_TRUST_HOST=true` in environment variables. ## Technologies Used - [Next.js](https://nextjs.org/) - [Auth.js](https://authjs.dev/) - [Prisma](https://www.prisma.io/) - [PostgreSQL](https://www.postgresql.org/) - [Tailwind CSS](https://tailwindcss.com/) - [shadcn/ui](https://ui.shadcn.com/) - [Docker](https://www.docker.com/) - [T3 Env](https://github.com/t3-oss/t3-env) ## License This project is released under the MIT License. See the [LICENSE](LICENSE) file for details. ## Support If you have any questions or need assistance, please open an issue or contact the project maintainer directly. ## Star Us! If you find this project useful, we'd greatly appreciate it if you could star our GitHub repository. Your support is a huge encouragement for us to continue improving and maintaining this project. --- ## Want more advanced features? Want to use `better-auth` instead of `auth.js` or more advanced features? Check out our **Enhanced Fullstack Template**! ### Key Improvements - 🔐 **Better Auth** - More flexible and modern authentication system - 🔥 **Hono + Hono RPC** - Type-safe API routes with Hono framework and Hono RPC client - 🍃 **Tailwind CSS 4** - Latest version with enhanced features - ⚛️ **React 19** - Latest React with improved performance - 📦 **AWS S3 Integration** - Ready-to-use file upload functionality - 🔧 **Enhanced DX** - Pre-commit hooks, better linting. - 💡 **AI-ready** - Pre-configured AI-ready configuration for Cursor(AI IDE). **👀Check the repository**: [caru-ini/fullstack-template](https://github.com/caru-ini/fullstack-template)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
