Skip to content

Latest commit

 

History

History
59 lines (37 loc) · 2.64 KB

README.md

File metadata and controls

59 lines (37 loc) · 2.64 KB

Next.js Starter

This project is designed to help you quickly set up a Next.js application. This starter is built with flexibility in mind, allowing you to choose how you want to deploy your Next.js application:

  • next export: You can easily export your application as static HTML and assets using Next.js's next export feature. This makes it suitable for hosting on platforms like GitHub Pages, Netlify, your own server, or any other static hosting provider.

  • Vercel or other hosting providers: If you prefer serverless deployments, this starter seamlessly integrates with Vercel's serverless functions, providing a powerful hosting solution.

Table of contents

Getting started

  1. Clone the repository.
  2. Install dependencies:
npm i
  1. Run your develop environment:
npm run dev
localhost:3000/

Page naming convention

In this starter, we follow a naming convention for pages that aligns with DDD (Domain-driven design) principles. Each page file is named using the format page-name.page.tsx, where page-name represents the name of the page or route. For example, the main page of your application could be named index.page.tsx. Using this naming convention helps maintain a clean and organized folder structure that reflects the structure of your application's domains or features. By separating pages into their respective folders and adopting a consistent naming convention, you can easily locate and manage your application's routes.

Internationalization with i18next

In this project, we have integrated i18next to make it easy for you to create multi-language websites. Here's how we use i18next:

  1. Translation Files: We maintain separate JSON translation files for each supported language. These files contain translation keys and their corresponding localized text. For example, you might find the English translation file for home page at public/locales/en/homePage.json

  2. Locale Configuration: We configure i18next to load the appropriate translation files based on the user's selected locale.

  3. Integration with React: We use the react-i18next package to integrate i18next with React components, making it seamless to access translations in your React components.

Useful Links