Local development
API toolchain
Section titled “API toolchain”The api directory is a TypeScript/Express application using Yarn and Node.js. Its container mounts the local api directory into /usr/src/app; the image startup script installs dependencies and runs nodemon -L.
cd apiyarn installyarn devUse yarn start to compile with tsc and run dist/app.js. The package currently has no build script and its test script is only a failing placeholder.
Required dependencies
Section titled “Required dependencies”The patient endpoint requires a reachable FHIR_URL, HEALTHTAG_API_URL, and Harmony RPC in addition to the Express process. Use .healthtag-api.env for local Compose values and never commit tokens or keys.
Smoke tests
Section titled “Smoke tests”curl --fail http://localhost:9000/api/health-checkcurl --fail http://localhost:8080/fhir/metadataFor patient tests, use synthetic FHIR records and mock or isolated authorization dependencies. Required automated coverage includes missing fields, failed upstream validation, owner self-access, allowed third-party access, denied third-party access, no matching patient, and FHIR failure.
[!IMPORTANT] Fix the risks listed in Security hardening before treating patient endpoint results as valid authorization tests.

