Folder Structure
After creation, your project should look like this:
The purpose of each of these files and folders are as follows:
.github
This folder simply contains the project's Contributing Guide.
__tests__
This folder should contain all tests written. Currently unit tests are provided for each localized version of the template's index page.
config
Stores configuration files for most of the starter template's features:
i18n/config.ts - Used by our react-i18next integration. You should not modify this file to customize the configuration for your app, instead you should modify app.config.ts.
jest/cssTransform.js - Used by our Jest setup to transform .css files.
jest/test-utils.tsx - Loaded by each test file to set up the testing framework before each test.
seo/next-seo.config.ts - Configuration file pulled in by our Next SEO integration. You should not modify this file to customize the configuration for your app, instead you should modify app.config.ts.
public
Stores the following image and json assets:
locales - Contains sub-folders for each locale configured for the app, which in turn contain the locale translation files. This is an example of how to configure translation files to leverage
i18next's
Namespaces feature, more of which you can learn about here.favicon.ico, *.png - favicon and application icon files.
site.webmanifest - The PWA manifest file.
vercel.svg - The Vercel logo that
create-next-app
gives us, unaltered.
src
This is where the custom components, pages, Context API providers, typings and utility code for the project live.
Non-page components
styles
Stores the app's global CSS and CSS/SCSS module files. Feel free to look around at these files to see how easy it is to leverage the Tailwind CSS support integrated with this starter template. Modify/replace the files to suit the needs of your app.
Last updated