This repository contains the code for both the offline desktop application and the frontend web application.
Note
The web app dev server is not able to run simulations. If you want to run simulations and plot results, you have three options.
- run the desktop application from this repository
- connect to the API server by cloning and running the api server, or
- change the
.env.development
files value ofVITE_API_URL
to'https://musicbox.acom.ucar.edu/musicbox'
which will allow you to use the deployed version of the API server.
git clone https://github.com/ncar/musicbox-interactive-client
brew install node
Go to https://nodejs.org/en/download and install node and npm
Open up a developer command prompt
winget install -e --id OpenJS.NodeJS
Once that installs, close and reopen the command prompt and then move to the directory where music-box-interactive-client
was cloned to
# verifies node is in the environment
node -v
# verifies npm is in the environment
npm -v
Ensure you are located in the musicbox-interactive-client
repo and run
npm install
This will take about 20 seconds.
The electron desktop application and the web application each have their own dev server.
npm run dev
npm run e:dev
We use feature flags to turn features on and off. You can change the values in the development file, but you can also build the files for production and use all of the values in .env.production
while pointing to the production version of the API server.
To do so, run
npm run build
npm run preview
Vite will build the files and then serve them as if this were a production build
The desktop application uses electron-forge (electron-packager, Squirrel.Windows) to build and package the app into distributable binaries.
Run the following to both build the application for the current OS/arch and package into .zip files for distribution.
npm run e:package
The outputted binaries should be located in ./out/make/
.