Back-office services for Queen
REST API used for communication with Queen/Stromae UI
- queen-application: api module for queen
- queen-domain: business logic
- queen-domain-pilotage: business logic for habilitations/interviewer specific features
- queen-domain-depositproof: business logic for deposit proof generation
- queen-infra-db: db access to queen data
- queen-infra-depositproof: deposit proof generation
- queen-infra-pilotage: access to pilotage api (check habilitations, ...)
For building and running the application you need:
- Java 21
- Maven 3
Use the maven clean and maven install
mvn clean installOn queen-application module:
mvn spring-boot:runQueen-Back-Office uses postgresql as data source
mvn clean packageThe jar will be generated in /target repository
java -jar app.jarTo access the swagger-ui, use this url : http://localhost:8080/swagger-ui/index.html
A Dockerfile is present on this root project to deploy a container. You can get docker images on docker hub
Helm chart repository is available for the queen backoffice/db/frontend
Liquibase is enabled by default and run changelogs if needed.
On queen-infra-db module:
# Don't forget to edit configuration properties in pom.xml for this
mvn liquibase:diffMinimal configuration for dev purpose only (no auth, no habilitation checks on pilotage api) User is considered as authenticated admin user
application:
corsOrigins: https://test.com #mandatory
# define folder where temp files will be created
# /!\ do not use the OS default temp folder or java.io.tmpdir as it causes security issues
# give only access rights to this folder to the user executing the tomcat process
temp-folder: /opt/app/app-temp
spring:
datasource:
url: jdbc:postgresql://localhost:5432/defaultSchema
username:
password:
driver-class-name: org.postgresql.Driver
jpa:
show-sql: true
jackson:
serialization:
indent_output: true
logging:
file:
name: /path/to/log/folder/queen.log
level:
root: INFO
feature:
oidc:
enabled: false
# enable swagger
swagger:
enabled: true
# enable pilotage api
pilotage:
enabled: false
# enable cache
cache:
enabled: true
# enable comment endpoints
comments:
enabled: true
# enable interviewer features
interviewer-mode:
enabled: falseConfiguration example with OIDC/habilitations/interviewer features enabled
application:
corsOrigins: https://test.com #mandatory
# define folder where temp files will be created
# /!\ do not use the OS default temp folder or java.io.tmpdir as it causes security issues
# give only access rights to this folder to the user executing the tomcat process
temp-folder: /opt/app/app-temp
roles:
interviewer: interviewer_role
reviewer: reviewer_role
admin: admin_role
webclient: webclient_role
reviewer-alternative: reviewer_alternative_role
spring:
datasource:
url: jdbc:postgresql://localhost:5432/defaultSchema
username:
password:
driver-class-name: org.postgresql.Driver
logging:
file:
name: /path/to/log/folder/queen.log
level:
root: INFO
feature:
oidc:
enabled: true
auth-server-host: https://auth-server.host
auth-server-url: ${feature.oidc.auth-server-host}/auth
client-id: my-client-id
realm: my-realm
principal-attribute: id-claim
role-claim: role-claim
# enable swagger
swagger:
enabled: true
# enable pilotage api
pilotage:
enabled: true
url:
alternative-habilitation:
url: http://alternative.url
campaignids-regex: ((edt)|(EDT))(\d|\S){1,}
# enable cache
cache:
enabled: true
# enable comment endpoints
comments:
enabled: true
# enable interviewer features
interviewer-mode:
enabled: true-
Campaign
GET /campaigns: Retrieve the campaigns the current user has access toGET /admin/campaigns: Retrieve all campaignsPOST /campaigns: Create a new campaignPOST /campaign/context: Integrate a full campaign (campaign/nomenclatures/questionnaires. The results of the integration indicate the successful/failed integrationsDELETE /campaign/{id}: Delete a campaign
-
Questionnaire
GET /questionnaire/{id}: Retrieve the data structure of a questionnaireGET /campaign/{id}/questionnaires: Retrieve the data structure of all questionnaires linked to a campaignGET /campaign/{idCampaign}/questionnaire-id: Retrieve all the questionnaire ids for a campaignPOST /questionnaire-models: Create a new questionnaire
-
Interrogation
GET /interrogations: Retrieve all interrogations idGET /interrogations/{id}: Retrieve the interrogationGET /interrogations/{id}/deposit-prof: Generate and retrieve a deposit proof (pdf file) for an interrogationGET /campaign/{id}/interrogations: Retrieve all the interrogations of a campaignPUT /interrogations/{id}: Update an interrogationGET /interrogations/interviewer: Retrieve all the interrogations of the current interviewerPOST /campaign/{id}/interrogation: Create or update an interrogationDELETE /interrogations/{id}: Delete an interrogation
-
Data
GET /interrogations/{id}/data: Retrieve the data of an interrogationPUT /interrogations/{id}/data: Update the data of an interrogation
-
Comment
GET /interrogations/{id}/comment: Retrieve the comment of an interrogationPUT /interrogations/{id}/comment: Update the comment of an interrogation
-
Nomenclatures
GET /questionnaire/{id}/required-nomenclatures: Retrieve all required nomenclatures of a questionnaireGET /campaign/{id}/required-nomenclatures: Retrieve all required nomenclatures of a campaignGET /nomenclature/{id}: Retrieve the json value of a nomenclaturePOST /nomenclature: Create/update a nomenclatureGET /nomenclatures: Retrieve all nomenclatures ids
-
Personalization
GET /interrogations/{id}/personalization: Retrieve the personalization of an interrogationPUT /interrogations/{id}/personalization: Update the personalization of an interrogation
-
Metadata
GET /campaign/{id}/metadata: Retrieve campaign metadataGET /questionnaire/{id}/metadata: Retrieve campaign metadata
-
Paradata
POST /paradata: Create a paradata event for an interrogation
-
StateData
GET /interrogations/{id}/state-data: Retrieve the state-data of an interrogationPUT /interrogations/{id}/state-data: Update the state-data of an interrogationPOST /interrogations/state-data: Get state-data for all interrogations defined in request body
- spring-boot-data-jpa
- spring-boot-security
- spring-boot-web
- spring-boot-tomcat
- spring-boot-test
- spring-boot-starter-oauth2-resource-server
- liquibase
- postgresql
- junit
- springdoc
- caffeine (cache)
Please check LICENSE file