Documentation

Installation

  • Clone the repository and install the dependencies
    (you may want to fork the project before, to have your own copy):

    git clone https://github.com/jsulpis/nextjs-template.git && cd nextjs-template && yarn install

  • Update the package.json metadata with yours.

Configuration

Tailwind CSS

  • You may want to change the theme in tailwind.config.js to use your own color palette.
  • See the documentation for more details.

SonarCloud

  • Create a new project on SonarCloud and note the generated token.
  • Update the project description in sonar-project.properties.
  • The Sonar Scanner is set up to run in the GitHub Actions workflow. You just need to add a SONAR_TOKEN secret in your GitHub repository (Settings > Secrets) with the token generated in SonarCloud.

Deployment

This template is ready to be deployed on Vercel : just connect it to your GitHub repository and let it deploy it. The deployement should also be fairly straightforward with any other cloud platform like Netlify.

Environment variables

This project uses the NEXT_PUBLIC_ROOT_URL environment variable in several meta tags. This variable refers to the deploy url of your application. A value is given in the .env.production file, which you may want to update with your url. You can also set this variable in the settings of your project on Vercel.