All source code in our application will live in a folder called
src-folder will mainly contain other folders (which we will go through in a moment) and the main entry files for both server-side rendering and the application itself.
Always remember though that this structure is not set in stone and you can modify it as much as you want to, this has mainly proven a good structure in previous projects.
The full architecture will look something like this:
src/ -- common/ -- components/ -- modules/ -- redux/ -- styles/ -- index.tsx -- server.tsx package.json // And all the other configuration files
In this folder we will have common files needed by modules and components alike, such as classes to define information needed in multiple places. We dive more deeply into it here.
In this folder we will have common components, such as buttons, links and inputs. A deeper dive can be found here.
In this folder we will have common redux files, such as a store, utilities etc. A deeper dive can be found here.
In this folder we will include all the stylesheets for the application. A deeper dive can be found here.
Tests for each file will be contained in a folder called
__specs__ in the same directory as the file itself. You can read more about testing here