Read-only mirror of https://github.com/swiyu-admin-ch/swiyu-ecosystem-portal-scs — Bundesamt für Justiz. Issues & pull requests at the source.
  • TypeScript 61.9%
  • Java 18.3%
  • HTML 15.8%
  • SCSS 3.3%
  • Shell 0.4%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-04 04:05:12 +00:00
.git-hooks Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
.github/workflows Snapshot import from 2026-10-01T10:20:40Z 2026-10-01 10:20:40 +00:00
.mvn Snapshot import from 2026-11-24T04:06:19Z 2026-11-24 04:06:19 +00:00
.run Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
assets Snapshot import from 2026-12-03T04:06:55Z 2026-12-03 04:06:55 +00:00
swiyu-ecosystem-portal-service Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
swiyu-ecosystem-portal-ui Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
.gitignore Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
.snyk Snapshot import from 2026-12-02T04:07:44Z 2026-12-02 04:07:44 +00:00
AGENTS.md Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
CHANGELOG.md Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
Dockerfile Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
mvnw Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
pom.xml Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
README.md Snapshot import from 2026-12-02T04:07:44Z 2026-12-02 04:07:44 +00:00
renovate.json Snapshot import from 2026-06-25T05:22:00Z 2026-06-25 05:22:00 +00:00
setVersions.sh Snapshot import from 2026-07-16T05:02:49Z 2026-07-16 05:02:49 +00:00

SWIYU Service Portal

Getting Started

To start the application locally run the following command:

mvn install # will also build the ui
mvn spring-boot:run -Dspring-boot.run.profiles=local

Add the mock-registration-service profile as well, if you wish to mock the communication with the core business service for the registration.

Spring Profiles

The backend uses a combination of Spring profiles to control which external services are used. IntelliJ run configurations for common combinations are provided in .run/.

Profile combination IntelliJ config When to use
local start:backend Default. All external service URLs point to localhost:8200 (no real services needed).
local,shared start:backend:shared Same as local for now — reserved for a future docker-compose/mock setup for shared dependencies.
local,shared,shared-dev start:backend:shared:dev Points external service URLs at the real DEV cloud environment (trust registry, identifier registry, core business service). Use this when you need to test against live DEV APIs.

The compound configs (start:app:shared, start:app:shared:dev) start both the Angular UI (npm run start, port 4501) and the backend (port 8501) together.

Why local and shared are separate: local is for personal/machine-specific overrides. shared is intended to hold team-wide configuration for a docker-compose-based mock infrastructure once that is set up. Until then it is empty and behaves identically to local.

PAMS API Proxy (for FOITT internal usage only)

To use/test the service navigation in local development please use the pams API proxy. see: https://bitbucket.bit.admin.ch/projects/EPORTAL/repos/pams-proxy/browse/readme.md?at=refs/heads/master

after install you can use the following command to start your local proxy:

$ pams-proxy --env=ref --level S2Plus --host \
  --uuid <YOUR_ePORTAL_UUID> 

Replace <YOUR_ePORTAL_UUID> with your users eportal id (see: https://eportal-r.admin.ch/profile/details) If you set the env variables you could use the following command:

$ pams-proxy --uuid $AUTH_PAMS_USER_ID --qa $AUTH_PAMS_QA --host https://portal-r.trust-infra.swiyu.admin.ch --level S2Plus --env=ref  

Translations

The UI uses @ngx-translate/core with the ICU MessageFormat compiler. The translations live in swiyu-ecosystem-portal-ui/src/assets/i18n/{de,fr,it,en}.json (one flat JSON per language).

  1. Extract the keys used in the code (adds missing keys as "", removes unused keys, sorts): cd swiyu-ecosystem-portal-ui && npm run generate:translations
  2. Verify the JSON files against the reference content sheet e-id_serviceportal_reference-content.xlsx (sheet Reference List, EID-7242) with the shared tool in the sibling swiyu-tools repository. Run it from this repository root; the project name selects the profile (details in ../swiyu-tools/translations/README.md): ../swiyu-tools/translations/translations verify The script resolves every de.json key by its Textkey MAIN, falls back to an exact match of the German text in DE Source/DE Target, asks the developer when several reference rows share the same German text, records the answer in translation-mapping.csv and lists the reference texts that are not used in the portal.
  3. Import the resolved texts (DE = DE Target, FR/IT/EN = FR/IT/EN Target): ../swiyu-tools/translations/translations import [--dry-run] --only-empty keeps the existing wording and only fills empty values. --help lists all options. Texts that the sheet delivers percent-encoded or with the mail merge fields of the e-mail templates are decoded and get their {handoverUrl}/{servicePortalUrl} parameters back; the run lists every repair. The tool needs no build step, it runs with the JDK 25 already required by the project.
  4. Verify: npm test (fails on empty translations) and npm run build (fails on missing translations).
  5. Document the result: ../swiyu-tools/translations/translations report renders translation-mapping.md with four tables: keys of the portal that have no entry in the sheet (with EN/DE text), sheet entries the portal does not use, keys that were remapped to another sheet key because the German text is identical, and texts that the sheet delivers url-encoded (the import decodes them and restores the {handoverUrl}/{servicePortalUrl} parameters).

Keys that are only used dynamically must be registered with translate.instant(...)/translate.get(...) in a translateSetup() method, otherwise --clean removes them again. Ctrl+Shift+K shows translation keys instead of the translated text.