Translation to other languages and authentication are included.
The translation is made using i18next.
Follow this guide to use i18next in your application or this video to use i18next with i18nexus.
The authentication is made using NextAuth with google and github.
Follow the official website for more information.
Be aware that if any code is written in a client component it can be modified by anyone using the application.
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.
-
If you choose not to have private application please ignore USER_INFO and delete the code for verification on the following pages:
-
It's necessary to update the .env file to contain the chosen providers, for more information about providers: providers
-
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}
-
For the Github Id and Secret follow this steps
-
For the Google Id and Secret follow this steps
To start using this template do the following steps:
- Clone the repository to your machine.
git clone https://github.com/IgorDGomes/Next-Template.git
- Open the project and go to the template directory.
cd template/
-
Create a .env file following the instruction above for either translation, authentication or both.
-
Run the Application:
npm run dev
- Open on the web http://localhost:3000