Skip to content

Create Mock APIs for All Services in Documentation and Demo Pages #419

Open
0 of 7 issues completed

Description

@anuragxxd

Description:

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:

  1. 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
  2. Implement mock data generators with realistic response structures for each service
  3. Update all demo pages across packages to use mock APIs
  4. Configure documentation site (apps/documentation/) to use mock endpoints
  5. Add environment variable to toggle between mock and live APIs
  6. Create documentation for adding/updating mock data
  7. Consider using tools like MSW (Mock Service Worker) or json-server

Sub-issues

Sub-issues

0 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. uniqueg commented on Nov 17, 2026

    @uniqueg
    Member

    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.

  2. added
    type: feature
    priority: low
    workload: weeks
    on Nov 17, 2026
  3. self-assigned this
    on Nov 17, 2026
  4. added
    status: triage
    on Nov 17, 2026
  5. moved this from In progress to Tracking in ELIXIR On-Cloud: Low Priorityon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: lowstatus: triagetype: featureworkload: weeks

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions