graphdb-workbench

Architecture & package boundaries

How the microfrontend repo is laid out and the rules for crossing package lines. Read this before touching more than one package.

Contents

Package map

Package Framework Role
packages/api Framework-agnostic TypeScript Shared API/services, consumed via the @ontotext/workbench-api alias
packages/root-config single-spa + TypeScript Root bootstrap/wiring of the microfrontend app
packages/workbench Angular 21 (standalone, signals) Main modern workbench frontend
packages/shared-components Stencil.js (Web Components, TSX) Reusable UI components
packages/legacy-workbench AngularJS Legacy workbench code
e2e-tests Cypress End-to-end and security tests
plugins / wb-plugins — Generated/bundled plugin artifacts

Package-boundary rules

API package import rule

Everything in the API package must be imported through the alias:

import { ServiceProvider, RepositoryContextService } from '@ontotext/workbench-api';

Never import API internals via relative or absolute filesystem paths across packages. The api module is a separate package loaded via import maps where the alias is defined.

ServiceProvider and the service() helper

API services are singletons shared across all micro-frontends via ServiceProvider:

const repoService = ServiceProvider.get(RepositoryContextService);
// `service()` is an exported convenience alias for the same thing:
const repoService = service(RepositoryContextService);

Use ServiceProvider.get() / service() for API-layer services everywhere (Stencil components, root-config, and Angular components when Angular DI is unavailable). For Angular services registered through Angular DI (@Injectable), use inject() as normal.

State ownership

Deployment under a context path

GraphDB can run behind a reverse proxy under a path prefix (https://example.com/graphdb/, with graphdb.external-url set to that URL). Every page, asset and REST call must then stay under the prefix. Changes to routing, navigation or URL building break this most often.

See also