This repo contains the IDP-ARC frontend, scaffolded with Vite + React, and wired up to deploy using Cloudharness + Codefresh pattern The frontend lives here:
applications/idp-arc/frontend
The app image is built here:
applications/idp-arc/Dockerfile
Cloudharness generates the Helm chart into:
deployment/helm
applications/
idp-arc/
frontend/ # Vite + React app
Dockerfile # Builds frontend with Cloudharness frontend-build
deployment/
codefresh-dev.yaml # Codefresh pipeline (dev)
deployment/helm/ # Generated by harness-deployment
From repo root:
cd applications/idp-arc/frontend
yarn install --frozen-lockfile
yarn devThen open:
http://localhost:5173
Build:
yarn buildPreview production build locally:
yarn previewUnit tests (no browser, no backend):
yarn test:unitUploads go to one of two places, chosen at build time by VITE_UPLOAD_BACKEND: bucket, or
EMBER-DANDI for any other value, including when it isn't set (the default). If the chosen backend
lacks what it needs (VITE_EMBER_CLIENT_ID for EMBER-DANDI, VITE_UPLOAD_BUCKET_URL for the
bucket), the rest of the site works, and signing in to EMBER-DANDI or uploading says uploads aren't
set up; the console names the missing variable. Either way, OSB imports the file into the
researcher's workspace from there.
ember(default): EMBER-DANDI, into the researcher's own dandiset and the protocol's MAABCD dandiset (maabcdAggregateDandisetIdinsrc/data/protocols.json). Needs both logins (EMBER-DANDI and OSB),VITE_EMBER_CLIENT_ID, an EMBER-DANDI OAuth application (public client, PKCE) with<this app's origin>/ember-callbackas a redirect URI, and, for the MAABCD copy, theDANDI_API_KEYattribute on the OSB user named byMAABCD_EMBER_USERNAME(container.ts).bucket: a public bucket open for anonymous writes, named byVITE_UPLOAD_BUCKET_URL. Its CORS must allow PUT from this app's origin. Needs only the OSB login.
This project builds the frontend using the Cloudharness builder image and serves the output using nginx (unprivileged).
From repo root:
git clone https://github.com/MetaCell/cloud-harness.git
cd cloud-harness
git checkout develop
cd ..docker build \
-f cloud-harness/infrastructure/base-images/cloudharness-frontend-build/Dockerfile \
-t cloudharness-frontend-build:local \
cloud-harnessdocker build \
-f applications/idp-arc/Dockerfile \
-t idp-arc:local \
--build-arg CLOUDHARNESS_FRONTEND_BUILD=cloudharness-frontend-build:local \
applications/idp-arcdocker run --rm -p 8080:8080 idp-arc:localOpen:
http://localhost:8080
The dev pipeline is defined here:
deployment/codefresh-dev.yaml
It follows the same Cloudharness flow used in virtual-fly-brain and other MetaCell apps.
- clones this repo
- clones
cloud-harnessat${CLOUDHARNESS_BRANCH} - installs Cloudharness tooling
- runs
harness-deploymentto generatedeployment/helm - renders the chart (
helm template) for debugging
-
builds:
idp-arc/cloudharness-frontend-build:${CF_BUILD_ID}idp-arc/idp-arc:${CF_BUILD_ID}
-
installs/upgrades the Helm release using:
deployment/helmdeployment/helm/values.yaml
- pushes the images to the publish registry when
${DEPLOYMENT_PUBLISH_TAG}is set