Monorepo

CVEScan Web source code is organized inside a monorepo, which consolidates all its services, libraries, and tools into a single repository. This approach promotes consistency, simplifies dependency management, and streamlines development workflows. By sharing code between frontend and backend services through common libraries, the monorepo ensures that both parts of the application can leverage the same utilities, types, and business logic, reducing duplication and improving maintainability.

The monorepo is managed using NX, a powerful build system and development tool that provides advanced features like dependency graph visualization, task orchestration, and caching, further enhancing productivity and maintainability.

The monorepo structure is as follows:

├── apps                        # Applications
   ├── api                     # API server
   ├── api-e2e                 # End-to-end tests for the API server
   ├── db-postgres             # Database image
   └── webui                   # Frontend WebUI application
├── docs                        # Documentation files
├── libs                        # Shared libraries
   ├── common                  # Shared utilities that can be used by any typescript application regardless of the runtime
   ├── cvescan-nest            # NestJS-specific libraries
   └── cvescan-ng              # Angular-specific libraries
└── tools                       # Custom tools
    └── keycloak-configurator   # Tool for automating Keycloak setup

This structure separates concerns by grouping related components, making it easier to maintain and scale the project. Shared libraries in the libs directory reduce code duplication, while the tools directory contains custom utilities to support development and deployment.