Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js starter template with React 17, TypeScript, Tailwind CSS 2, NextAuth, and Fauna DB for passwordless and OAuth auth.

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
nextjs-starter is a Next.js boilerplate template that delivers GitHub, LinkedIn, and passwordless email authentication backed by Fauna DB, ready to use as the starting point for a new web app. This open-source starter is built by Bhanu Teja (GitHub user pbteja1998) and published under the MIT License.
nextjs-starter is a starter kit for Next.js that combines React 17, TypeScript, Tailwind CSS 2, React Query 3, and NextAuth.js into one project scaffold. It takes environment variables for OAuth providers and a Fauna DB secret as input, and outputs a running application with authentication flows, database schema migration scripts, and code-quality tooling. A live demo is available at next-starter.bhanuteja.dev, and the original blog post explaining the setup is referenced in the README.
yarn setup-db command to apply the schema.fauna/faunadb) by setting USE_FAUNA_DOCKER=true and running yarn setup-docker-db.NEXTAUTH_URL, SECRET, EMAIL_SERVER, EMAIL_FROM, GITHUB_ID, GITHUB_SECRET, LINKEDIN_ID, LINKEDIN_SECRET, and FAUNADB_SECRET.nextjs-starter is aimed at developers who want to skip authentication boilerplate when starting a new Next.js project. Full-stack developers can use it as a foundation for products that need login and a serverless database, teams can adopt it as a consistent internal starting point with TypeScript and Tailwind already wired, and developers learning NextAuth.js, Fauna, or React Query can study a working integration of all three. It is also useful for indie hackers who need a quick MVP with social and passwordless login.
To run it locally, clone the repository, run yarn to install dependencies, and copy .env.example to .env.local. Then set your own values for the auth and database environment variables, run yarn setup-db to create the Fauna schema, and launch the development server with yarn dev. For local database development, the README documents starting the fauna/faunadb Docker container and applying migrations with yarn setup-docker-db.
The repository supports Fauna Dev, a local Docker container. Pull the fauna/faunadb image, start it with docker run --rm --name faunadb -p 8443:8443 -p 8084:8084 fauna/faunadb, set USE_FAUNA_DOCKER=true in .env.local, and run yarn setup-docker-db. Each container start creates a fresh instance, and stopping the container clears all data.
You need to define NEXTAUTH_URL, SECRET, EMAIL_SERVER, EMAIL_FROM, GITHUB_ID, GITHUB_SECRET, LINKEDIN_ID, LINKEDIN_SECRET, and FAUNADB_SECRET in .env.local. The README provides instructions for creating a GitHub OAuth app, a LinkedIn OAuth app, and a Fauna server key.
Yes. NextAuth.js is configured with passwordless email magic-link authentication alongside GitHub and LinkedIn OAuth. You must provide an SMTP server string via the EMAIL_SERVER environment variable for the email to be sent to users.
The template uses React 17 with TypeScript, Tailwind CSS 2, React Query 3, and NextAuth.js for authentication. The database is Fauna DB, and the project also includes ESLint, Prettier, and Husky for code quality. The Next.js framework powers the entire application.
