Folder structure
I like to keep folder structure simple and easy to read for other developers. This template recommends the following folder structure:
├── client│ ├── components│ ├── config│ ├── context│ ├── data│ ├── errors.ts│ ├── hooks│ ├── theme│ └── types├── server│ ├── controllers│ ├── dal.ts│ ├── db.ts│ ├── errors.ts│ ├── middelwares│ └── types.ts├── models├── pages├── public├── README.md├── example.env└── tsconfig.jsonImports
The tsconfig.json has
"paths": { "@/client/*": ["./client/*"]},"baseUrl": "./",which can allow you to import directly without using long ../../. And making it easier to understand.