Skip to main content

Frontend

This section is for contributors working on the Angular frontend workspace behind Federated Learning Net.

The workspace lives in the Frontends repository and contains two applications and one shared library:

  • local-app: the frontend of the Client, which talks to the local-learning-api
  • global-app: the frontend of the Platform, which talks to the global-learning-api and, forwarded through it, the datamodeler-api
  • shared-lib: components, services, styles, and assets used by both apps

Both apps log in through their learning API (backend-for-frontend, see Authentication) and never hold a token. The auth code lives in shared-lib:

FileContent
services/auth.tslogin, logout, route guards, provideBffAuth
services/auth.helper.tsrealm roles, the X-Requested-With BFF header, getBffUrl, account management URL
services/auth-state.service.tsAuthStateService, loads the user and roles from /bff/me
utils/url.helper.tsgetAppUrl and other URL helpers

keycloak-js and keycloak-angular are no longer used.

Report an issue opens a prefilled issue on FedLearnNet/.github, which the user submits with their own GitHub account. No backend call or token is involved.

The prerequisites and the commands to start the apps are in Local setup and the README; the checks to run before a review are in Testing and review.

Most frontend changes come down to two questions:

  • which app owns the feature: local-app, global-app or is it a shared model in shared-lib? Sometimes your change might involve all three.
  • How can I confirm that my changes work?

Start here​

If you need to...Read this page
boot the right frontend variant locallyLocal setup
understand the workspace layoutWorkspace map
decide which folder should own the changeWhere to change what
avoid wiring mistakes around buildsBuilds and environments
follow implementation and UI guardrailsImplementation guidelines
jump straight to a feature areaSystems overview
run the right checks before reviewTesting and review

Operating assumptions​

The pages here focus on:

  • which folder owns what
  • which scripts actually start the app you need
  • which environment files get swapped during builds
  • which checks are worth running before you hand off a change

When in doubt, start with the narrowest change that fixes the problem, then widen the scope only if both apps or multiple brands genuinely need the same solution.