Skip to content

Next.js template with translation and authentication included.

Notifications You must be signed in to change notification settings

IgorDGomes/Next-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Next js Template

Translation to other languages and authentication are included.

Template

  1. Translation
  2. Authentication
  3. Important
  4. Getting Started

Translation

The translation is made using i18next.

Follow this guide to use i18next in your application or this video to use i18next with i18nexus.

Authentication

The authentication is made using NextAuth with google and github.

Follow the official website for more information.

Important

Be aware that if any code is written in a client component it can be modified by anyone using the application.

Translation Details

It's important to create a .env file with your i18nexus api key:

    I18NEXUS_API_KEY=...

For more information there's a video explaining how to use the i18nexus website to translate your sentences.

Authentication Details

  1. If you choose not to have private application please ignore USER_INFO and delete the code for verification on the following pages:

  2. It's necessary to update the .env file to contain the chosen providers, for more information about providers: providers

  3. If it's enough to have the providers already included here, please update the .env file to the following:

Note: do not include the curly braces.

    GITHUB_ID={Your Github ID}
    GITHUB_SECRET={Your Github Secret}

    GOOGLE_CLIENT_ID={Your Google ID}
    GOOGLE_CLIENT_SECRET={Your Google Secret}

    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=n2/axQt6jRBaJoAUMp3K60EprZq/E1wxgiUQ/rR5uH4=

    USER_INFO={Allowed email}

Getting Started

To start using this template do the following steps:

  1. Clone the repository to your machine.
    git clone https://github.com/IgorDGomes/Next-Template.git
  1. Open the project and go to the template directory.
    cd template/
  1. Create a .env file following the instruction above for either translation, authentication or both.

  2. Run the Application:

    npm run dev
  1. Open on the web http://localhost:3000

About

Next.js template with translation and authentication included.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published