The Platform UI for the Medical Informatics Platform (MIP). An Angular 21 standalone frontend application for composing, running, and analyzing data science experiments, featuring algorithmic configurations. It integrates with a backend over /services (proxied in dev) and uses Keycloak for robust OAuth2 authentication.
- Experiment Studio (
src/app/pages/experiment-studio): select data models/datasets, pick variables and filters (QueryBuilder), configure algorithms, run jobs, view charts/tables. - Experiments Dashboard (
src/app/pages/experiments-dashboard): list/search/paginate, share links, compare results side by side, export to PDF. - Auth: Keycloak-based session via
/services/activeUser; guard protects routes and redirects to login if unauthenticated.
- Node 20+ and npm 10+
- Backend reachable at
http://localhost:8080/services(adjustable in proxy/Docker env). - Keycloak endpoints exposed at
/services/oauth2/authorization/keycloakand/services/logout.
- Install dependencies:
npm ci - Start dev server with proxy:
npm start- Serves at
http://localhost:4200/ - Proxies
/servicestohttp://localhost:8080viasrc/proxy.conf.json
- Serves at
- Ensure backend is running and you can authenticate with Keycloak.
npm start– dev server (ng serve) with proxy.npm run build– production build todist/fl-platform.npm run watch– development build in watch mode.npm test– unit tests via Karma.
See src/app/core/algorithm-result-enum-mapper.md for detailed mapping behavior.
GET /services/activeUser– current user/session.GET /services/algorithms– algorithm catalog.GET /services/data-models– available data models (used to build variable tree and datasets).POST /services/experiments– run experiment (polls for results).POST /services/experiments/transient– quick previews (histograms, descriptive stats).GET /services/experiments/:id– fetch experiment (and results).PATCH /services/experiments/:id– update name/description/shared flag.DELETE /services/experiments/:id– delete experiment.
- Routes are guarded (
AuthGuardinsrc/app/guards/auth.guard.ts). - Login redirects to
/services/oauth2/authorization/keycloak?frontend_redirect=<current or target>. - Logout calls
/services/logoutthen returns to dashboard.
src/main.ts– bootstraps app with router, HTTP client, credentials interceptor, ECharts.src/app/app.component.*– shell with header/footer.src/app/services/– auth/session/error handling, experiment studio orchestration, dashboard data, PDF export, label resolver, HTTP interceptor.src/app/models/– experiment, algorithm, data-model, filters, user interfaces.src/app/core/algorithm-mappers.ts– backend → UI algorithm config and output schemas.src/app/pages/experiment-studio/– variables panel, filter modal, algorithm panel, visualisations (charts/histograms/bubble).src/app/pages/experiments-dashboard/– list/search, detail, compare, mapper.src/app/pages/account-page/– basic profile view.src/app/pages/shared/– header/footer/navbar/accordion/spinner utilities.src/styles.css– global styles and QueryBuilder theming; assets insrc/assets/.Dockerfile/nginx.conf.template– container build and runtime proxy (PLATFORM_BACKEND_SERVER,PLATFORM_BACKEND_CONTEXTenvs).
Build and serve with nginx:
docker build -t fl-platform .
docker run \
-e PLATFORM_BACKEND_SERVER=platform-backend-service:8080 \
-e PLATFORM_BACKEND_CONTEXT=services \
-p 80:80 fl-platformNginx always proxies /${PLATFORM_BACKEND_CONTEXT}/ to the backend.
- Unit:
npm test(Karma). - Manual: run
npm start, authenticate, and exercise Experiment Studio and Dashboard against a running backend.
- Many features require authenticated backend access; unauthenticated calls will trigger login redirect.
- Algorithm availability depends on selected variables/datasets; some algorithms are transient-only (
histogram,describe).