Giter Site home page Giter Site logo

jdawkinsdew / nextjs13-nextauth-synpress-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 361 KB

Next.js boilerplate project offering integration of NextAuth.js for authentication, Tailwind CSS and Synpress(Cypress). Built with TypeScript. #NextJS #TailwindCSS #NextAuth #Cypress #TypeScript

JavaScript 2.87% TypeScript 96.26% CSS 0.87%
cypress nextauth nextjs-boilerplate nextjs13 synpress tailwindcss typescript

nextjs13-nextauth-synpress-boilerplate's Introduction

Next.js 13 Tailwind Boilerplate with NextAuth.js and Synpress(Cypress)

This repository is a Next.js boilerplate project that includes NextAuth.js for authentication, Cypress for end-to-end testing, and Tailwind CSS for styling. It is built with TypeScript to provide type safety and better developer experience.

Features

  • Next.js for server-side rendering and frontend development.
  • NextAuth.js for authentication with custom login, MFA, signup, and email providers.
  • Tailwind CSS for easy and flexible styling.
  • TypeScript for static typing and improved code quality.
  • Synpress(Cypress) for end-to-end testing and test automation.

Prerequisites

Make sure you have the following installed on your machine:

Getting Started

  1. Clone this repository to your local machine:
git clone https://github.com/jdawkinsdew/nextjs-tailwind-boilerplate.git
cd nextjs-tailwind-boilerplate
  1. Install the dependencies using npm or yarn:
npm install

# or

yarn install
  1. Configure NextAuth.js:

In order to use authentication features, you need to configure NextAuth.js. The necessary files are already set up in the src/auth directory. Open src/auth/[...nextauth].ts and update the configuration according to your authentication providers and settings.

  1. Set environment variables:

Create a .env.local file in the root of the project and set the required environment variables. Refer to .env.example for the list of required variables.

  1. Run the development server:
npm run dev

# or

yarn dev

The development server will start, and you can access your application at http://localhost:3000.

Testing with Synpress

Synpress is set up in this project for end-to-end testing. To run the Synpress tests, you need to create test scripts in /tests/e2e/specs directory. And use the following command:

npm run sy:open

# or

yarn sy:open

This will open the Cypress test runner, and you can execute the tests from there.

Building and Deployment

To build the production-ready version of your app, use the following command:

npm run build

# or

yarn build

This will create an optimized build of your application in the build directory.

For deployment, follow the recommended deployment process for Next.js applications.

nextjs13-nextauth-synpress-boilerplate's People

Contributors

jdawkinsdew avatar

Watchers

 avatar

Forkers

lucasliu2022

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.