Aggregate Line Inspector / Collaborative Editor
A front end tool allowing reviewing and editing of Zooniverse transcription data.
Production: https://alice.zooniverse.org
Staging: https://alice.preview.zooniverse.org
Please refer to the wiki for more detailed information.
This project is currently in beta testing.
This project uses Yarn or Docker to get the app up and running
Yarn
yarn install
to install package dependenciesyarn test
to run all tests within the repoyarn storybook
to open a Storybook viewer athttp://localhost:6006
to view components in isolationyarn start
to open a staging version of the site athttps://localhost:3000
. Usehttps://local.zooniverse.org:3000
to log in via the Panoptes API (instructions.)
Docker
docker-compose up
to run the development app athttp://localhost:3000
and start storybook athttp://localhost:6006
docker-compose down
to stop the dev containersdocker-compose run --rm dev test
to run the tests
Deployment is handled by Github Action. Both staging and production deployment can be run ad hoc in the actions tab as needed if you have the appropriate permissions on the repository.
React scripts (aka Create-React-App or CRA) handles the NODE_ENV
for us:
There is also a built-in environment variable called NODE_ENV. You can read it from process.env.NODE_ENV. When you run npm start, it is always equal to 'development', when you run npm test it is always equal to 'test', and when you run npm run build to make a production bundle, it is always equal to 'production'. You cannot override NODE_ENV manually. This prevents developers from accidentally deploying a slow development build to production.
Because of this, if we want to deploy a staging app that builds like production, but uses the Panoptes API staging server, then we would either have to eject and manually manage the NODE_ENV
or somehow set to use the staging API by another means. Ejecting is undesirable because its impact would mean we would have to manually configure additional things that CRA handles for us and this would defeat the benefit of using CRA.
Instead, another environment variable, REACT_APP_ENV
set to development
is used when doing a staging deployment. The panoptes-javascript-client
was updated to check for this environment variable in addition to what its already set to do and give preference to it before NODE_ENV
. This enables us to set the client to use the staging API and not have to manage NODE_ENV
and eject this app.
On merge to master, a Github Action is triggered to deploy to staging to https://alice.preview.zooniverse.org
.
Production deployments are triggered by an update to which commit the production-release
tag is pointed to. This tag should be updated via chat ops and then a Github Action will run that builds and uploads the files to our cloud provider found at https://alice.zooniverse.org
.