Skip to content

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

6 watching

Forks

Repository files navigation

CVE Data Registry Client

The CVE Data Registry Client is a frontend for the CVE Services API (https://github.com/CVEProject/cve-services.)

The app can connect to one or more CVE Services API instances. In static builds, available login instances are selected at build time with VITE_AVAILABLE_INSTANCES. In Docker, the same list can be supplied at runtime with AVAILABLE_INSTANCES.

Use a comma-separated list of instance keys:

AVAILABLE_INSTANCES=test,prod

Run Locally

Running locally will allow you to log into all instances in app/src/config.js given you have credentials for remote APIs or a local version running.

cd app
npm i
npm run dev

The app runs at http://localhost:5173.

Testing from the repository root

Use Node.js 24 and install each application's dependencies:

npm ci --prefix app
npm ci --prefix backend

The root package has no dependencies and needs no separate install. Run tests from the repository root:

npm run test:unit
npm run test:integration
npm run test:end_to_end
npm run test:all

Unit and integration commands run the corresponding scripts in both app/ and backend/, returning a failure if either configured suite fails. Backend unit tests cover error utilities and middleware. Backend integration tests are not configured yet; the runner reports this explicitly. See backend test layout for where to add them.

Frontend tests and their configs remain in app/, and existing commands run from that directory still work. The root test:end_to_end and test:list commands delegate to the frontend scripts. Existing frontend integration and end-to-end tests that call CVE Services still require a running API and the credentials described in app/.env.test.local_example.

The Unit Tests GitHub Actions workflow runs the root unit command on pull requests targeting main, test, dev, or v* branches. It installs both applications' dependencies and runs both frontend and backend unit suites.

Run with Docker

Run the app from the repository root:

docker compose up --build

The app runs at http://localhost:8080.

Limit the available login instances at runtime:

AVAILABLE_INSTANCES=test,prod docker compose up --build

The app can connect to any number of backend service APIs depending on the build command or runtime environment variable. Use a comma-separated list of instance keys.

Check container health:

curl http://localhost:8080/health-check

If you need to build or run the image without Compose:

docker build -t cve-user-registry-client .
docker run --rm -e AVAILABLE_INSTANCES=test,prod -p 8080:8080 cve-user-registry-client

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages