SecureStart

Authentication Starter Kit for Next.js

BetterAuth is a ready-to-use authentication starter kit for Next.js applications. Download once, customize to your needs, and focus on building your app features instead of auth logic.

terminal
terminal
Modern Technology Stack

Carefully selected technologies engineered for optimal performance

Next.js 15

Frontend

React framework with App Router

Server ComponentsApp RouterTypeScriptPerformance

BetterAuth

Authentication

Modern authentication library

OAuth IntegrationJWT SessionsSecurity FirstType Safe

Neon DB

Database

Serverless PostgreSQL platform

Auto-scalingBranchingFast QueriesServerless

Prisma

ORM

Next-generation ORM

Type SafetyMigrationsSchema ManagementQuery Builder

TypeScript

Language

Typed JavaScript at scale

Static TypingIntelliSenseError PreventionRefactoring

Nodemailer

Email

Email sending made simple

SMTP SupportTemplatesSecurityReliability

Everything You Need for Authentication

A comprehensive suite of tools to secure your application and manage users effectively.

Email & Password

Classic email and password authentication.

Social Logins

Integrate with Google, GitHub, etc.

User Management

Manage your users and their roles.

Customizable UI

Easily customize the look and feel.

Secure Sessions

Robust session management.

Developer Friendly

Simple APIs for quick integration.

Audit Logs

Track important authentication events.

Get Started in 5 Minutes

Follow these simple steps to set up your authentication system

1

Clone the Repository

Get the starter kit from GitHub

Terminal
git clone https://github.com/Abdullah-dev0/SecureStart.git
cd SecureStart
2

Install Dependencies

Install all required packages

Terminal
npm install
3

Set Up Environment Variables

Configure your environment settings

Terminal
cp .env.example .env.local


DATABASE_URL=your_neon_postgres_connection_string
NEXTAUTH_SECRET=your_long_random_secret
NEXTAUTH_URL=http://localhost:3000

GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_gmail_app_password

ALLOWED_EMAIL_DOMAIN=gmail.com;example.org
4

Set Up Prisma

Generate Prisma client and push database schema

Terminal
npx prisma generate
npx prisma db push
5

Run the Application

Start the development server

Terminal
npm run dev

You're all set!

Visit http://localhost:3000to see your authentication system in action.

Ready to Get Started?

Download the starter kit and have authentication set up in your Next.js app in minutes.