Skip to content

v1.5.0 — Nx Monorepo + NestJS API + Quality Profiles

Choose a tag to compare

@marcelo-davanco marcelo-davanco released this 21 Feb 05:00

What's new in v1.5.0

🏗️ Nx Monorepo

The project is now an Nx workspace with three apps:

  • apps/scanner — Docker-based 10-step quality pipeline
  • apps/api — NestJS REST API with TypeORM + PostgreSQL
  • apps/dashboard — Next.js results dashboard

✨ NestJS REST API

New dedicated API service on port 3001 with full Swagger docs at /api/docs.

Entities and endpoints:

  • ProjectsPOST/GET /projects · GET/PATCH/DELETE /projects/:id
  • ScansPOST /projects/:id/scans · GET/PATCH /scans/:id
  • Phase ResultsPOST/GET /scans/:id/phases
  • Quality ProfilesPOST/GET /quality-profiles · GET/PATCH/DELETE /quality-profiles/:id
  • Config ItemsPOST/GET /quality-profiles/:id/configs · PATCH/DELETE /quality-profiles/configs/:itemId
  • Scanner ConfigGET /projects/configs/:key

🗃️ Liquibase schema management

Replaced TypeORM synchronize with versioned Liquibase changelogs. A dedicated liquibase Docker service runs migrations automatically before the API starts.

  • v1.0.0 — Initial schema (projects, scans, phase_results)
  • v1.1.0 — Quality profiles (quality_profiles, quality_config_items, FK on projects)

✨ Quality Profiles

Define reusable sets of config files and assign them to projects.

When a scan runs, the scanner calls GET /api/projects/configs/:key, overwrites the static config files in the container, then executes the phases. Falls back to static quality-configs/ files when no profile is assigned or API is unavailable.

🎨 Dashboard → API integration

All dashboard pages now fetch live data from the API:

Page Description
/projects List all registered projects
/projects/:id Project detail + scan history + profile assignment
/projects/:id/scans/:scanId Scan detail with per-phase results
/quality-profiles List and create quality profiles
/quality-profiles/:id Manage config items, link/unlink projects

🔧 ENABLE_* phase toggles

All 10 scanner phases can now be individually enabled/disabled via ENABLE_GITLEAKS, ENABLE_TYPESCRIPT, ENABLE_ESLINT, ENABLE_PRETTIER, ENABLE_AUDIT, ENABLE_KNIP, ENABLE_JEST, ENABLE_SONARQUBE, ENABLE_API_LINT, ENABLE_INFRA_SCAN.

🔗 Scanner → API integration

The scanner now reports all activity to the API in real time: registers scan on start, reports each phase result, finalizes scan with status + metrics.

📝 Documentation

All 6 READMEs updated (EN, PT-BR, ES, ZH-CN, HI, RU) to reflect the new architecture.


New docker compose services

Service Description Port
api-db PostgreSQL for the API 5433
liquibase Runs DB migrations on startup
api NestJS REST API 3001

Migration from v1.4.0

  1. Add API_DB_PASSWORD to your .env (see .env.example)
  2. Run docker compose up -d — Liquibase will create the new tables automatically
  3. All existing scanner functionality is preserved — JSON file reports still generated as fallback