Skip to content

teo-goulois/nextjs-lucia-auth-drizzle-orm-template

Repository files navigation

Next.js auth boilerplate with Lucia and Drizzle ORM

This is a template for building web applications with Next.js, Lucia for authentication, and Drizzle ORM for database operations.

Table of Contents

Features

Password-less Auth with Email Link and Code

  • Enable users to access your application securely without the need for passwords.

GitHub, Google, and More Auth

  • Seamless integration with popular providers like GitHub and Google.

Password Auth with Reset Password Functionality

  • Enhance security with password authentication and reset password functionality.

Middleware Routing

  • Manage routes and access control effortlessly with middleware routing.

Two-Factor Auth for More Protection

  • Add an extra layer of protection to your application with two-factor authentication (2FA).

Beautiful Custom Email with React Email

  • Impress your users with stunning, custom email communications.

Rate Limiting to Prevent Spamming

  • Combat spam and abuse with built-in rate limiting.

Getting Started

To get started with this template, follow these steps:

  1. Clone this repository:

    git clone https://github.com/teo-goulois/nextjs-lucia-auth-drizzle-orm-template.git
  2. Navigate into the project directory:

    cd nextjs-lucia-auth-drizzle-orm-template
  3. Install dependencies:

    pnpm install
  4. Set up environment variables:

    Create a .env.local file in the root of the project and add the environment variables from the .env.example file.

  5. Run the development server:

    pnpm dev
  6. Open your browser and navigate to http://localhost:3000 to see the application running.

Usage

this boilerplate offers a seamless authentication experience for your Next.js projects. Customize authentication methods, manage routes, and ensure secure access for your users.

Authentication Providers

this boilerplate supports authentication with popular providers such as GitHub, Google, and more. Integrate authentication effortlessly and provide users with multiple login options.

Password-less Authentication

Enhance user experience and security with password-less authentication. Enable users to access your application via email links or codes without the need for passwords.

Middleware Routing

Simplify route management and access control with middleware routing. Define custom routes and ensure a smooth navigation experience for your users.

Two-Factor Authentication (2FA)

Add an extra layer of security to your application with two-factor authentication (2FA). Protect sensitive data and prevent unauthorized access with 2FA support.

Contributing

We welcome contributions from the community! To contribute to this boilerplate, please follow these guidelines:

  • Fork the repository
  • Create a new branch (git checkout -b feature)
  • Make your changes
  • Commit your changes (git commit -am 'Add feature')
  • Push to the branch (git push origin feature)
  • Create a new Pull Request

If you find a bug or have a feature request, please open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.