Rescale logoNEMO

Project structure

Project structure and organization proposal

Motivation

The project structure is a key factor in the development process. It helps to organize the codebase, make it easier to maintain, and improve the development experience. A well-structured project can help developers to understand the codebase faster, find the files they need, and make changes more efficiently.

Proposal

_middleware.ts
_middleware.ts
layout.tsx
page.tsx
layout.tsx
page.tsx
_middleware.ts
layout.tsx
page.tsx
global.css
middleware.ts
package.json

Explanation

app folder contains the main application code. It is divided into two subfolders: (internal) and (public). The (internal) folder contains the internal pages, while the (public) folder contains the public pages. Each grouped layout has its own layout.tsx file and a page.tsx file. The _middleware.ts file is used to define middleware functions for route groups or pages that it's used in.

Use imports inside the middleware.ts file to use separate middleware functions inside global middleware configuration.

Last updated on

On this page