Pattern Intro - tsgrp/HPI GitHub Wiki
If you don't know what a design pattern is, you are missing out. Take some time and google it, then come back here.
If you're not going to read this post in detail, I'm going to put gist right out front. If you're designing a piece of HPI no matter how big or small, you should have a plan, and you should be able to clearly align your plan with one of the patterns already utilized in the application. (Or have a good reason why you aren't.)
Patterns are important because they allow us to re-use proven strategies and make use of the HPI toolset in consistent ways which makes life much easier when different team members are touching a lot of the same code at different times.
I'm going to do my best to organize all the patterns that have taken shape in a top down approach starting from macro and moving to micro, while putting in other tidbits where they fit. The downside of this approach will be that a newer developer may not be concerned with macro level patterns as they are only working on smaller pieces. I would advise that readers skim until they encounter information that is meaningful to them and read more closely from that point. As you become more comfortable and experienced with the application, please re-read this article in the hopes that each time you will get more out of it. Also that allows us the flexibility to change this document and know that people will see our changes.
###General Design The application as a whole is divided into 'modules'. I say 'modules' because that word has many different meanings not just for HPI but in CS/IS in general. For clarity in this context we can call them HPI Modules. HPI modules are sections of the app that can stand alone and clients can take or leave as a whole. The Admin, Search, Stage, and Dashboard are examples of HPI Modules. (The admin isn't really optional at this point, but as you will see from a technical perspective it fits the criteria).
Each HPI Module should have it's own router. The router will define any routers the Module will handle and for each route, will call useLayout specifying