This is a clean template for new web based projects.
- Download this repository as a zip
- Adapt to your needs
- Push to your project repository
Code that should be unit tested.
You should put files here if:
- The file can be tested without any mock, only with the parameters needed.
- The file may be useful in other project
- The file does not depend on any file outside "Lib"
Examples: React components, helpers, etc
The modules are the different aspects of your project. They're where the business logic should live.
The code here are good candidates for integration tests. Remember to mock API responses.
Examples:
Type of Project | Modules |
---|---|
Multimidia | Catalog, Player, ... |
Store | Games, Music, Books, ... |
News | Editorial, ... |
This especial module is where all the code that is needed for the application as a whole. Good examples are the backend comunication and the app main layout (shell).
The code in this folder is where you should handle user input and mapping to modules.
The routes should handle all the initialization needed for the application, as well as final rendering for the client.
Role | Lib |
---|---|
Routing | NextJS |
Rendering | Preact |
Test | Jest, Testing Library |
Static analisis | Typescript, Eslint, stylelint |
Formating | Prettier, stylelint |