Please read the CONTRIBUTING.md prior to opening a PR.
First, get the node stuff you need:
yarnCreate .env.local file in the project root, copy the contents of .example.env and uncomment the API URLs to use a local skyviewer-api instance
Then run the development server:
yarn devOpen http://localhost:3000 with your browser to see the result.
By default, embargoed survey tiles (e.g. sv225p11) are served from a private GCS
bucket (gs://skyviewer-comcam) via the authproxy in the cluster. To access these
locally you need a GCP service account key.
-
Get the key file: ask a team admin to generate a key for
edc-dev-skyviewer@skyviewer.iam.gserviceaccount.com:gcloud iam service-accounts keys create skyviewer-dev-sa-key.json \ --iam-account=edc-dev-skyviewer@skyviewer.iam.gserviceaccount.com \ --project=skyviewer
Place
skyviewer-dev-sa-key.jsonin the repo root. Never commit it. It is already covered by.gitignore(*-sa-key.json). -
Start the app via Docker Compose: the
docker-compose.ymlmounts the key and setsGOOGLE_APPLICATION_CREDENTIALSautomatically:docker-compose up
The client is available at http://localhost:3000.
-
Verify: navigate to the Explorer page and confirm that
sv225p11/color_grisurvey tiles load without 403/404 errors.
Tip: the survey properties file (RA/Dec starting coordinates) is at
https://storage.googleapis.com/skyviewer-comcam/hips-data/sv225p11/color_gri/properties
Security: this key is for local dev only. Rotate/revoke it once a permanent solution (ADC / Workload Identity Federation) is in place.
Lint your code:
yarn lintFix your code styles:
yarn fixyarn bs