Reescrita dos geradores: biblioteca IGenerator, minimal API e novo frontend

- GeradoresService: cada tipo passa a ser um IGenerator (NIF, NIPC, NISS, CC,
  passaporte, IBAN, NIB, cartões, referência MB, pessoa, telefone, código postal,
  email, matrícula, EAN, UUID) registado em GeneratorRegistry; remove DAL/EF
- GeradoresWS: minimal APIs em /api/v1 com OpenAPI + Scalar e health check
- UnitTest: testes de ida e volta, valores conhecidos, detecção e API
- geradoresfe: UI construída a partir dos metadados da API, validador livre,
  exportação CSV/JSON/TXT, nginx com API_UPSTREAM configurável
- Docker, docker-compose e Jenkinsfile actualizados

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 23:51:39 +01:00
parent 0f764b1239
commit d7ea8a9b9e
119 changed files with 7764 additions and 2502 deletions

18
Jenkinsfile vendored
View File

@@ -6,8 +6,6 @@ pipeline {
DOCKER_TAG = "${env.BUILD_ID}"
REACT_DIR = 'geradoresfe'
SERVICE_DIR = 'GeradoresService'
API_DIR = 'GeradoresWS'
REACT_IMAGE = "${DOCKER_REGISTRY}/geradores/fe:${DOCKER_TAG}"
WS_IMAGE = "${DOCKER_REGISTRY}/geradores/ws:${DOCKER_TAG}"
@@ -36,21 +34,19 @@ pipeline {
}
}
stage('Build .NET Services') {
stage('Testes .NET') {
steps {
dir("${SERVICE_DIR}") {
sh 'dotnet build -c Release'
}
dir("${API_DIR}") {
sh 'dotnet build -c Release'
}
// Compila Service + WS e corre os testes (requer .NET 10 SDK no agente).
sh 'dotnet test UnitTest/UnitTest.csproj -c Release'
}
}
stage('Build React App') {
stage('Testes e Build React') {
steps {
dir("${REACT_DIR}") {
sh 'npm install'
sh 'npm ci'
sh 'npm run lint'
sh 'npm test'
sh 'npm run build'
}
}