Help Test environment

For engineers

Technical details that testers don't need.

How staging is wired

PieceWhere
APIhttps://api.orvana.health (Render, Singapore DB on Neon). Health check should return {"ok":true,"db":true}
Web appsVercel team orvana: orvana-app, orvana-dashboard, portal, orvana-status
This siteVercel project orvana-docsdocs.orvana.health (CNAME at Porkbun). Built from docs/manual/staging-guide/ by bun scripts/staging-guide.ts --deploy
PaymentsStripe test mode
MailResend, from no-reply@orvana.health
PipelineIn-process worker (ORVANA_PIPELINE_INPROCESS=1)
AIOpenRouter (real model, not a mock)

The test sample files are served from https://docs.orvana.health/fixtures/. That origin, and the orvana-docs.vercel.app fallback, are in the staging API's ORVANA_FASTQ_ORIGINS. Never carry them into production.

Adding another team tester

There's no role screen. The person signs in once on the customer app to create their account, then either:

  • An ops session calls POST https://api.orvana.health/auth/staff with { "email": "…", "role": "curator" }. Clinicians need "licenceNumber": "…" as well.
  • Or, with the staging DATABASE_URL:
# Run from a clean checkout of the DEPLOYED commit (orvana-health/orvana main), not a working tree:
# the script applies every migration in packages/db/drizzle to the database it connects to.
DATABASE_URL=… bun --no-env-file scripts/grant-staff-role.ts --email person@example.com --role curator
DATABASE_URL=… bun --no-env-file scripts/grant-staff-role.ts --email doctor@example.com --role clinician --licence SMC-12345

Current test staff: joel.balang@orvana.health (ops), joel.balang+clinician@orvana.health (clinician, licence TEST-STAGING-0001), joel.balang+curator@orvana.health (curator).

Automated checks

From the repo root, with Joel's Render and Vercel CLI logins. Run run-e2e.mjs from a checkout of the deployed commit: its staff bootstrap applies that checkout's migrations to staging.

node .unlazy/staging-deploy/run-e2e.mjs        # full order-to-released-report flow over HTTPS
node .unlazy/staging-deploy/verify-api.mjs     # API deploy, migrations, CORS, pipeline mode
node .unlazy/staging-deploy/verify-web.mjs     # web apps deployed and wired to the API
node .unlazy/staging-deploy/verify-stripe.mjs  # Stripe test webhook delivery
node .unlazy/staging-deploy/verify-mail.mjs    # mail from no-reply@orvana.health

Adding the tutorial videos

  1. Save each recording as docs/manual/staging-guide/videos/<id>.mp4. The ids are in docs/manual/staging-guide/RECORDING-CHECKLIST.md, and in each page's video: HTML comments.
  2. Run bun scripts/staging-guide.ts --deploy. Each slot with a matching file turns from "Video coming soon" into a player.
  3. Keep each file under 50 MB: 1080p, H.264 MP4.