Along with the work to introduce webpack to build browser files for the daily dashboard, there are a number of shortcuts that need to be addressed to make this a stable/ performant process.
In rough priority order:
- Build all TypeScript with webpack - in order to get something up and running webpack has just been used to compile browser code, this leaves us with the standard
tsc TypeScript compiler for the server and two entirely separate build processes. Given time to consider templates and moving static files, webpack could much more efficiently build both server and client which would speed up builds and improve the watch development process
- Introduce Jest test runner for browser and server code - unit/ integration tests are currently a mach up of a lot of libraries, simplifying this to use jest would allow us to clean up the current tests and also introduce tests specifically for react components
- Use server side rendering - with webpack building both the browser and server code we can include browser dependencies into the server build and allow most of the lifting to be done before sending the page -- this will reduce how much the client needs to fetch and let us consider accessibility for limited JS environments
Dashboard specific:
- Use code splitting to reduce browser payload - everything is currently bundled up and served at once resulting in huge files, splitting out react and the graphing library (includes d3 etc.) would allow the browser to individually cache what it needs
- Support ticking over to the next day - the base date is currently set when the page loads, this isn't updated when the date changes and will cause unknown and incorrect behaviour
Along with the work to introduce webpack to build browser files for the daily dashboard, there are a number of shortcuts that need to be addressed to make this a stable/ performant process.
In rough priority order:
tscTypeScript compiler for the server and two entirely separate build processes. Given time to consider templates and moving static files, webpack could much more efficiently build both server and client which would speed up builds and improve thewatchdevelopment processDashboard specific: