You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create Mock APIs for All Services in Documentation and Demo Pages #419
Currently, our documentation and demo pages are using live API deployments (TRS, DRS, WES, TES, Service Registry, etc.), which causes issues with rate limiting, downtime, unreliable data, and dependencies on external services. We should create mock APIs for all GA4GH and ELIXIR services to provide consistent, predictable data for documentation and testing purposes.
Expected Behaviour:
Mock API endpoints for all services (TRS, DRS, WES, TES, Service Registry, etc.)
Consistent, reliable data for all demo scenarios
No dependencies on live deployments for docs and demos
Faster page loads in documentation site
Ability to showcase edge cases, error states, and loading states
Works offline for local development
Easy to update mock data for different scenarios
Approach:
Create centralized mock API server or static JSON responses for all services:
GA4GH TRS (Tool Registry Service)
GA4GH DRS (Data Repository Service)
GA4GH WES (Workflow Execution Service)
GA4GH TES (Task Execution Service)
GA4GH Service Registry
ELIXIR Cloud Registry
ELIXIR DRS/TRS Filers
Implement mock data generators with realistic response structures for each service
Update all demo pages across packages to use mock APIs
Configure documentation site (apps/documentation/) to use mock endpoints
Add environment variable to toggle between mock and live APIs
Create documentation for adding/updating mock data
Consider using tools like MSW (Mock Service Worker) or json-server
Scope proposal for this issue, which becomes the parent of the sub-issues
linked below.
Why
The previews on the docs site still break wherever no public, anonymous
instance exists: all WES previews, the TRS-Filer form, submitting the Cloud
Registry form and the single-service preview. The TRS previews depend on a
third-party instance. Demos need predictable data that we control.
Plan
A minimal stub server in this repo (apps/mock-server) that answers exactly
the requests the docs previews send, with deterministic fixture data:
Only the endpoints the docs previews use (Service Registry/Cloud
Registry, TRS/TRS-Filer, WES). TES and DRS have no live previews and stay
out until they get one.
No auth; CORS open for reads and writes.
In-memory state (e.g. created services, runs), reset on restart.
Integration tests in CI, covered by the CI passed gate.
Its own image and release (tags mock-server-v<version>, separate from
the component releases), deployed on CSC Rahti; the docs previews point
to it by default.
Alternative for the tech decision
Mock Service Worker in the docs site instead of a
deployed server: the browser intercepts the previews' requests, so there is
nothing to deploy, release or keep running, and the docs work offline. Costs:
the mocks only exist inside the docs site (no URL for local component
development or for integration tests of other apps), a service worker must be
registered by the static docs build, and the code samples on the pages can't
point readers at a real URL to try. @anuragxxd, which do you prefer? The
sub-issues assume the deployed server; with MSW, B–D move into the docs app
and E–F are dropped.
Activity
uniqueg commentedon Nov 17, 2026
Scope proposal for this issue, which becomes the parent of the sub-issues
linked below.
Why
The previews on the docs site still break wherever no public, anonymous
instance exists: all WES previews, the TRS-Filer form, submitting the Cloud
Registry form and the single-service preview. The TRS previews depend on a
third-party instance. Demos need predictable data that we control.
Plan
A minimal stub server in this repo (
apps/mock-server) that answers exactlythe requests the docs previews send, with deterministic fixture data:
Registry, TRS/TRS-Filer, WES). TES and DRS have no live previews and stay
out until they get one.
CI passedgate.mock-server-v<version>, separate fromthe component releases), deployed on CSC Rahti; the docs previews point
to it by default.
Alternative for the tech decision
Mock Service Worker in the docs site instead of a
deployed server: the browser intercepts the previews' requests, so there is
nothing to deploy, release or keep running, and the docs work offline. Costs:
the mocks only exist inside the docs site (no URL for local component
development or for integration tests of other apps), a service worker must be
registered by the static docs build, and the code samples on the pages can't
point readers at a real URL to try. @anuragxxd, which do you prefer? The
sub-issues assume the deployed server; with MSW, B–D move into the docs app
and E–F are dropped.