VitamUI
June 12, 2026 · View on GitHub
Prerequisites
Tools
- Install JDK 21
- Install Maven
- Run this script to set it up
- Install Git
- Install Node.js and npm (with nvm)
- Configure default registry:
npm config set registry https://registry.npmjs.org/
- Configure default registry:
- Python version 3.9+
- Install Ansible (see Ansible)
Ansible
VitamUI is recommended for Ansible 2.14 and Python 3.9+, but remains functional with Ansible 2.9 and Python 3.8.
To automatically set up a Python VirtualEnv with the appropriate Ansible version, you can use the provided script:
./scripts/setup_ansible_venv.sh
Configuration
- Clone project and change ownership:
sudo chown -R $USER vitam-ui/ - Build project using the "right" profile (see Maven profiles and Build)
For Vitam internal developers
- Set up environment variables :
SERVICE_NEXUS_URLandSERVICE_REPOSITORY_URL - Build project using
vitamprofile (see Build for Vitam developers) - Copy files:
collect-external-client.conf,access-external-client.conf,ingest-external-client.conf,keystore_ihm-demo.p12andtruststore_ihm-demo.jksintoapi/api-(iam|referential)/(iam|referential)/src/main/config/dev-vitam/ - Redirect
dev.vitamui.comURL defined in code tolocalhost: add this line127.0.0.1 dev.vitamui.comto yourhosts(/etc/hosts) file
For non Vitam developers
Common errors
/bin/sh: 1: /usr/bin/python: not found
=> Create symlink, for instance:
sudo ln -s /usr/bin/python3 /usr/bin/python
PKI generation
By default we use a self signed certificates with 3 years duration on development environments.
To generate PKI, bellow the steps:
-
Generate CA, certs and stores for dev
cd deployment ./pki/scripts/generate_ca_dev.sh true && ./pki/scripts/generate_certs_dev.sh environments/hosts.local true && ./generate_stores_dev.shN.B.: The "true" value is used to force regenerate CA & certs.
-
Re-generate MongoDB
After regenerating CA, certs and stores, the MongoDB must be re-generated.
In
mongo/tools, run (make sure you enabled your python env):restart_dev.sh -
Add certificates in browser
In order for browsers (Chrome, Firefox) to recognize the certificates, add the following certificates in your browser:
- dev-deployment/environments/certs/vitamui-services/ca/ca-intermediate.crt
- dev-deployment/environments/certs/vitamui-services/ca/ca-root.crt
In Chrome:
- use certutil (install it from libnss3-tools package or equivalent if not already installed):
certutil -d sql:$HOME/.pki/nssdb -A -t "CT,c,c" -n "ca_root_server - vitamui" -i dev-deployment/environments/certs/vitamui-services/ca/ca-root.crt certutil -d sql:$HOME/.pki/nssdb -A -t "CT,c,c" -n "ca_intermediate_server - vitamui" -i dev-deployment/environments/certs/vitamui-services/ca/ca-intermediate.crt- or (deprecated) chrome://settings/certificates -> Authorities -> Import
In Firefox: about:preferences#privacy -> Certificates -> Show Certificates -> Authorities -> Import
Maven profiles
Without a profile, only Java projects are build.
dev
This profile is used to build the entire project for dev purposes, backend & frontend included.
- UI modules are packaged with both Java & Angular.
- Angular projects are built without optimization in order to reduce global build time.
- Jasmine Karma tests are launched with the headless chrome.
prod
This profile is used to build the entire project for prod purposes, backend/frontend included.
- UI modules are packaged with both Java & Angular.
- Angular projects are built with optimization.
- Jasmine Karma tests are launched with the headless chrome.
rpm
This profile is used to build rpm packages.
Only Maven modules with rpm.skip = false in their properties are eligible.
rpm-publish
This profile is used to push the generated rpm package.
Only Maven modules with rpm.skip = false in their properties are eligible.
skipTestsRun
This profile is automatically activated if the option -DskipTests is used during Maven execution in order to disable Jasmine Karma tests execution.
sonar
This profile is used to update sonar information.
webpack
This profile is used to build the entire project, backend & frontend included.
- Angular projects are build without optimization in order to reduce global build time.
- Jasmine Karma tests are launched with the headless chrome.
- Jenkins can use this profile.
swagger
This profile is used to generate the swagger.json draft file for swagger documentation. It's only needed for API modules.
swagger-docs
This profile is used to generate .html & .pdf swagger documentation in tools/swagger/docs/.
Only Maven modules with rpm.skip = false in their properties are eligible.
vitam
This is the profile to use for all Vitam internal developers.
Integration Tests Maven profiles
No integration test is launched during the “normal” build of the project.
Integration tests need a full running environment in order to launch API tests & few UI tests also.
Integration
This profile should be used to launch integration tests in Jenkins. The configuration used for the tests is available in integration-tests/src/test/resources/application-integration.yml
dev-it
This profile should be used to launch integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
iam
This profile should be used to launch API IAM integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
security
This profile should be used to launch API Security integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
front
This profile should be used to launch UI integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
Build
Build (only Java)
Execute this command to build the project with unit tests and without building our angular projects: mvn clean install
Build (only Java) without test
Execute this command to build the project without unit tests and without building our angular projects: mvn clean install -DskipTests
Build for Vitam internal developers
mvn clean install [-Ddependency-check.skip=true] -Denv.SERVICE_NEXUS_URL=... -Denv.SERVICE_REPOSITORY_URL=... [-DskipTests] -Pvitam
Build with IHM (JS) in dev mode
Use the dev maven profile to build the project with our angular projects.
For our angular projects, the build doesn't generate the sourcemap and doesn't optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pdev
Build with IHM (JS) for our Jenkins
Use the webpack maven profile to build the project with our angular projects.
For our angular projects, the build generate the sourcemap and doesn't optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pwebpack
Build with IHM (JS) for our Production environment
Use the prod maven profile to build the project with our angular projects.
For our angular projects, the build generate the sourcemap and optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pprod
If -DskipTests id added during the build of dev, webpack or prod, unit tests and karma tests are both ignored.
Build with integration tests for development environment
Use the dev-it maven profile to build the project with unit tests and integration tests.
mvn clean verify -Pdev-it
For more details see README in integration-tests module.
Build with integration tests for Jenkins
mvn clean verify -Pintegration
Package to RPM
Use the rpm and webpack maven profiles to build the project and package to RPM: mvn clean package -Prpm,webpack
Execute sonar report
mvn clean verify -Psonar
You can specify properties to change URL and login to sonar:
mvn clean verify -Psonar \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=<TOKEN AUTHENTICATION>
Deploy artifact
Use the rpm and webpack maven profiles to build all artifacts and deploy to NEXUS use: mvn clean deploy -Prpm,webpack
Swagger
To generate swagger.json: mvn test -Pswagger
ATTENTION: In case you change the model part of an object or an entity in one of the projects, it is not essential to regenerate the swagger.json file, you just have to modify it manually by adding the necessary information on the modifications we made on the model part.
To edit the file you can use this website.
To generate index.pdf and index.html from swagger.json: mvn generate-resources -Pswagger-docs
Run
Pour lancer VITAM en mode développement et permettre à VITAMUI d'accéder à ces APIs, voir la configuration suivante.
1 - Démarrage du Mongo VitamUI
├── tools
│ ├── docker
│ │ ├── mongo: './restart_dev.sh'
2 - Démarrage du docker smtp4dev (facultatif)
├── tools
│ ├── docker
│ │ ├── mail: './start.sh'
3 - Lancement de l'application SpringBoot Security
├── api
│ ├── api-security
│ │ ├── security: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'
4 - Lancement de l'application SpringBoot IAM
├── api
│ ├── api-iam
│ │ ├── iam: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'
5 - Lancement de l'application SpringBoot Collect
├── api
│ ├── api-collect
│ │ ├── collect: 'mvn clean spring-boot:run' ou './run.sh'
6 - Lancement de l'application SpringBoot Ingest
├── api
│ ├── api-ingest
│ │ ├── ingest: 'mvn clean spring-boot:run' ou './run.sh'
7 - Lancement de l'application CAS Server
La surcharge faite sur CAS nous empêche de lancer avec le plugin spring-boot
INFO: CAS-Server dépend de security & iam
├── cas
│ ├── cas-server: './run.sh'
Utilisation en dev
8 - Lancement de l'application Angular UI-Portal
└── ui
├── ui-frontend: 'npm run start:portal'
9 - Lancement de l'application Angular UI-Identity
└── ui
├── ui-frontend: 'npm run start:identity'
10 - Lancement de l'application Angular UI-Ingest
└── ui
├── ui-frontend: 'npm run start:ingest'
11 - Lancement de l'application Angular UI-Archive-Search
└── ui
├── ui-frontend: 'npm run start:archive-search'
12 - Lancement de l'application Angular UI-Collect
└── ui
├── ui-frontend: 'npm run start:collect'
13 - Lancement de l'application Angular UI-Pastis
└── ui
├── ui-frontend: 'npm run start:pastis'
14 - Les certificats sont auto-signés, il faut les accepter dans le navigateur pour
- UI-Frontend
- https://dev.vitamui.com:4200
- https://dev.vitamui.com:4201/user
- https://dev-vitamui.com:4208
- Ui-Back
- https://dev.vitamui.com:9000/
- https://dev.vitamui.com:9001/
- https://dev-vitamui.com:9008
Attention: Sans cette étape, le logout sur toutes les applications par CAS ne fonctionne pas.
15 - Se connecter sur le portail via
16 - Se connecter sur la page de réception des mails smtp4dev via
17 - Lancer l'application 'design-system' contenant des exemples de composants graphiques du design system
└── ui
├── ui-frontend: 'npm run start:design-system'