A basic, no-frills, Next.js boilerplate that includes the follwing:
✅ Typescript
✅ Next Auth
✅ TailwindCSS
✅ Mongoose
✅ FontAwesome icons
✅ Testing with Cypress
✅ Eslint with Airbnb config and Prettier
First, clone this repository
git clone https://github.com/camrymps/nextjs-boilerplate.git
Next, install the dependencies
cd nextjs-boilerplate
yarn install
And finally, run
yarn dev
It is recommended you add ESLint and Prettier extensions to your IDE (if it supports them). For example, when using VSCode you can install the ESLint extension, located here, and the Prettier extension, located here.
Mongoose models are located in the models folder. A simple user model has been provided.
An example cypress test, located at cypress/integration/login.spec.ts, has been provided. Before running this test, change the "example@example.com" email address to a valid email address in the cypress/fixtures/user.json file. You will also need to make sure you have configured the proper email settings in the .env.local file. The config files, located under cypress/configFiles, can be used to provide your tests with additional environment variables. For more information about using environment variables with Cypress, go here.
To begin testing, simply run
yarn run cy:dev
MIT