A collection of web applications and its resources for the Sirius Ophyd and blueskY utilitieS (SOphYS) project.
Note: This project is under development and is not yet ready for production use.
- spu-ui: A web application for the SAPUCAIA beamline at LNLS.
# Install dependencies
pnpm i
# Configure environment variables
# There is an `.env.example` in the root directory you can use for reference
cp .env.example ./apps/spu-ui/.envNote: One must copy the
.env.examplefile to.envand configure the environment variables accordingly for each app in theappsdirectory, because each app has its own environment variables and can be configured and deployed independently.
This project depends on having an external server running the bluesky http-server.
To run the development server, use the following command:
pnpm devThis will start the spu-ui app on http://localhost:3000.
To run the CI tests locally, use the following command:
pnpm local-ciTo build a new app from scratch and take advantage of the shared packages and utilities,
do the following:
This project requires node with version 22.14.0 or higher and pnpm with version 9.6.0 or higher.
If you don't have node and pnpm installed, go to the Node.js website and follow the instructions to install Node.js with pnpm for your operating system.
To run the app, you will need to have set up the following
First, set up a fork of this repository on GitHub and clone it to your local machine.
Then, install the dependencies:
pnpm iThis will install all the dependencies for the monorepo and the apps in the apps directory.
To scaffold a new app, use the turbo generate command:
pnpm turbo generate appThis will prompt you for the name of the app and create a new directory in the apps directory with the name of the app.
Note: The new app will generate a small set of default environment variables in a
.envfile, such asBLUESKY_HTTPSERVER_URLandAUTH_SECRET. Please make sure to set the correct values for these variables in the.envfile.
To run the app in development mode, use the following command:
pnpm dev --filter=@sophys-web/<new-app-name>This will start the app on http://localhost:3000 by default. > Note: The --filter flag is used to run only the app that you just created. If you want to run all the apps, you can use the pnpm dev command without the --filter flag.