Skip to content

Amplify Portal

The portal is a Vite SPA hosted on AWS Amplify
AWS Amplify — hosts the Vite portal SPA. This walkthrough deploys via manual zip upload (no Git connection required).
. Terraform
HashiCorp Terraform — provisions all platform infrastructure through five modules in `terraform/`.
can build and zip-deploy it automatically on apply, or you can deploy manually when deploy_amplify_on_apply=false.

Use caseURLHow to get it
curl / scripts / Postman

API Gateway
Amazon API Gateway — REST API exposing `/catalog`, `/query`, and `/reprocess`. Browser CORS is locked to the Amplify hostname; CLI clients call the API Gateway URL directly.
stage

terraform -chdir=terraform output -raw api_url
Browser UI (portal)Amplify appterraform -chdir=terraform output -raw app_url

The hosted portal receives VITE_API_URL at build time, pointing to the same API Gateway URL. No Git connection is required — deployment uses manual zip upload.

When deploy_amplify_on_apply=true (default), a full terraform apply runs npm install, npm run build, and uploads web/dist/ to Amplify. Requires Node.js >= 20 on the machine running Terraform.

If you skipped Amplify during apply or need to ship UI changes:

Terminal window
export AMPLIFY_APP_ID="$(terraform -chdir=terraform output -raw amplify_app_id)"
export VITE_API_URL="$(terraform -chdir=terraform output -raw api_url)"
export WEB_SOURCE_DIR="$(pwd)/web"
./scripts/deploy-amplify.sh

Run from the demo repo root after a successful Terraform apply.

Terminal window
cd web
npm install
npm run build

Build output lands in web/dist/.

Terminal window
cd web && npm install && npm test
Terminal window
terraform -chdir=terraform output -raw app_url

Open the URL in a browser. You should see the station browser interface. See Portal verification and Portal Usage.

Lock down API Gateway
Amazon API Gateway — REST API exposing `/catalog`, `/query`, and `/reprocess`. Browser CORS is locked to the Amplify hostname; CLI clients call the API Gateway URL directly.
CORS with CORS Lockdown so the hosted portal can call the API.