This Electron based application is an example of a Create React App generated UI that is supported by an Express powered REST API. The API and UI use a component based folder structure for consistency within the project. The API does not have a build step as this version of Electron uses Node 12. However if a typed language was added or the API is converted to the import syntax, then it could be added later.
- Git clone this repo
- In the project root run
npm i
. This will install the dependencies in the root of the project and then recursively install any dependencies in sub folders - Then run
npm start
to start build a development build of the app that will reload on changes where the UI is served up on port 3000 and the API on port 8008
Tests can be ran with npm run test-api
or npm run test-ui
- Once the dependencies have been install, run
npm run build
on Mac ornpm run build-win
on Windows (note that there is currently no Linux/Unix build)
- Run the Express API in a new thread as to not overload the main electron thread when the app gets bigger
- Add a logging and tracing framework to the API to assist in debugging
- Encapsulate data source specific access functions in a utility. i.e when a database data source is used
- Add a logging framework to the UI to allow client side errors to be captured
- Move the API port and host into build/runtime configuration
- Create UI automated tests
- Convert to a typing system
- Introduce a more fully featured state management framework like Redux in the UI when the app becomes more complex