React REST API project structure template using TypeScript, MobX, and Styled-Components
I will be glad to any suggestions and corrections, for I am constantly trying to improve the structure of my projects :)
My email for contact - phoenix.ofdarkness@mail.ru
This folder contains the components that form the pages. (Can use Containers, Smart, Ordinary, Simple, and UI components in their implementation)
Container components that can use services and custom hooks are stored in this folder. (They may use Smart, Ordinary, Simple and UI components in their implementation.)
This folder contains all smart components, which can use both the repository and custom hooks, but which cannot use services. (Can use in their implementation Ordinary, Simple and UI components)
This folder stores all the complex components that can’t use the repository or custom hooks. (Can use Simple and UI components in their implementation)
This folder stores all auxiliary, silly components, which must not use any custom hooks or repository. (Can use UI components in their implementation)
This folder contains all components that replace the native components (for example: button, label, radio, select, h1, h2, h3, and so on). These components may contain some logic, using hooks and storage (for example in the Select component)
This folder contains all of the logic of the project. From services to config.
This folder contains configuration files of example (for example: URI of servers or some limits/patterns/routes)
There are constants in this folder (for example: messages, units, mime-types)
This folder contains all your hooks.
In this folder there are all your models which come from API server. Try not to specify attached models in descriptions of the models themselves, it is better to do it in description of the response type of corresponding service.
This folder contains your table schemes or form schemes.
This folder stores your services for API-server communication.
This folder stores (if used with MobX) store context and global store schemes.
This folder stores your project’s theme(s).
This folder stores all domain types
This folder stores all auxiliary functions