Frontend Architecture
After creating an app, it should look something like:
.
βββ README.md
βββ components
β βββ atoms
β β βββ index.tsx
β βββ pages
β βββ Home
βββ next.config.js
βββ node_modules
β βββ [...]
βββ package.json
βββ pages
β βββ index.tsx
βββ static
βββ favicon.ico
The project is structured as follows:
-
components
: In the components directory, you will find React components. Some of them are reusable pieces of the application (such as a button), but others are directly main pages. -
pages
: The pages directory contains your Application Views and Routes. Next reads all the files inside this directory and creates the application router. So for example, alogin.tsx
file in this folder will result in a/login
route serving this component.
If you want to know more about the next architecture, visit the official docs.