No description
Find a file
2026-11-01 14:50:34 +01:00
.mvn/wrapper feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
brunoCollection feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
config feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
Uml feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-application feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-cli feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-domain feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-infrastructure feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-shared feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-statistics-domain feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
z3-statistics-infrastructure feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
.dockerignore feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
.gitignore feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
.gitlab-ci.yml feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
CHANGELOG.md feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
Dockerfile feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
mvnw feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
mvnw.cmd feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
pom.xml feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00
README.md feat: initial commit - Z3 backend (Clean Architecture / DDD) 2026-11-01 14:50:34 +01:00

Z3 – A link to the path

Z3 est un raccourcisseur d'URL.

Z3 s'inspire dans la forme des principes de clean architecture et de DDD. On trouve ainsi quatre modules Maven :

  • z3: module parent ;
  • z3-domain : contient les entités, les objets-valeur, les use cases et les ports ;
  • z3-infrastructure : contient les implémentations des ports (adapters) ;
  • z3-application : contient les services applicatifs.

Le nom Z3 est un clin d'œil à Zelda 3 : A Link to the Past, un jeu vidéo sorti en 1991 sur Super Nintendo.

GENARATE CHANGELOG

  • Package node à util https://github.com/conventional-changelog/conventional-changelog
  • Commande à utiliser conventional-changelog -p conventionalcommits -i CHANGELOG.md -s

SCHEDULED TASKS

Liste des taches planifiés :

  • Envoyer les rapports de liens invalides -> APP_REPORT_INVALID_LINKS

CLI

  • Pour lancer la cli en DEV : `mvn quarkus:dev -Dquarkus.args=seed
  • Ou java -jar target/z3-cli-1.1.0-SNAPSHOT-runner.jar seed

Configuration

BDD supportées

  • Postgres

LOG

  • Le loglevel peut être set avec APP_LOG_LEVEL -> APP_LOG_LEVEL=DEBUG

UPLOADS

! Cette valeur dois être raccord avec la partie front (Sveltekit pas exemple) !

  • La taille max des uploads peut être définie APP_MAX_UPLOAD_SIZE -> APP_MAX_UPLOAD_SIZE=100M

SECURITE

! Toutes les informations de configuration de cette partie doivent être sauvegardés pour conserver des données exploitables !

JWT

Usage :

APP_JWT_ISSUER=http://localhost:8080/issuer
APP_JWT_PUBLIC_KEY=publicKey.pem
APP_JWT_PRIVATE_KEY=privateKey.pem

Génerer des clés :

openssl genrsa -out rsaPrivateKey.pem 2048
openssl rsa -pubout -in rsaPrivateKey.pem -out publicKey.pem
openssl pkcs8 -topk8 -nocrypt -inform pem -in rsaPrivateKey.pem -outform pem -out privateKey.pem

ENCRYPTION

example :

AES_KEY="password"
AES_SALT="salt"
AES_KEY_LENGTH=256

Notes :

  • KEY Est une valeur texte quelconque
  • SALT Est une valeur texte quelconque
  • KEY_LENGTH Devrais être laissée à 256

MAIL

Exemple (pour mailpit) :

APP_MAIL_FROM=z3@example.net
APP_MAIL_HOST=127.0.0.1
APP_MAIL_PORT=1025
APP_MAIL_START_TLS=OPTIONAL
APP_MAIL_TLS=false
APP_MAIL_USERNAME=null
APP_MAIL_PASSWORD=null
APP_MAIL_DEV_SIMULATE=false

Notes :

  • APP_MAIL_FROM Est l'adresse email qui est inscrite dans le mail dans la partie FROM:
  • MAIL_DEV_SIMULATE Permet de simuler l'envoie de mails et donc de se passer d'un serveur SMTP.

Création d'un compte initial

! Cette partie nécessite un serveur SMTP, en local il est possible d'utiliser Mailpit par exemple !

Mailpit :

podman run -d \
--name=mailpit \
--restart unless-stopped \
-p 8025:8025 \
-p 1025:1025 \
axllent/mailpit

Exemple :

APP_CREATE_USER_ON_START=toto@example.net

Notes :

  • CREATE_USER_ON_START Peut etre vide, s'il ne l'est pas un nouvel utilisateur Administrateur sera crée. Les informations de connexion seront envoyés par email.

TESTS

mvn clean verify

Reports for each modules can be found under target dirs.

SECURITY

Checking

Check for vulnerabilities

First time running requires downloading a list of CVE.

You can request an API key from here to accelerate downloading theses. They are stored in ~/.m2/repository/org/owasp/dependency-check-data/.

You can find more information form the plugin Github repository.

mvn org.owasp:dependency-check-maven:check

To pass an api key you can use, or replace $ENV_API_KEY_VAR directly with the api key.

mvn verify -Ddependency-check-maven.api_key=$ENV_API_KEY_VAR

Report

You may find report after ward in target/dependency-check-report.html

They are several reports configured but you can add more looking at the documentation.

Available are HTML, XML, CSV, JSON, JUNIT, SARIF, JENKINS, GITLAB, ALL.

Now Z3 has enabled HTML, JSON, SARIF and GITLAB.