How ekino/v6y works
Main Components and Their Purposes
• Frontend Applications:
• There are multiple front-end apps. For example, “front” (likely the public-facing application) and “front-bo” (a back-office dashboard). They provide user interfaces (login, dashboards, report pages) for monitoring code quality, performance, etc.
• Backend API Layer (BFF):
• The “bff” directory hosts the backend-for-frontend service where GraphQL resolvers are organized by domain (account, application, audit, dependency, etc.). This service exposes APIs consumed by the frontends.
• Auditor and Analyzer Services:
• Multiple auditor apps exist (devops auditor, dynamic auditor, static auditor, and main analyzer) that encapsulate logic for performing static analysis, runtime monitoring, and generating detailed code quality reports.
• Each auditor service has its own domain (e.g., “dora-metrics”, “lighthouse”, “code-security”) and is structured with dedicated workers, routes, and managers.
• Core Libraries:
• The “v6y-libs” folder contains important libraries such as “core-logic” (with helpers, database providers, APIs, models, and configuration) and “ui-kit”/“ui-guide” (which support the UI development).
• Infrastructure and Configuration:
• Configuration files (docker-compose, Dockerfile, environment templates) indicate containerized deployment and a robust CI/CD setup (see GitHub workflows, husky hooks, etc.).
• “v6y-database” and “v6y-config” hint at dedicated database management and configuration layers.
• Cross-Cutting Concerns:
• Logging, monitoring, and worker management (e.g., Workers under auditor apps and in “core-logic”) are crucial elements that integrate with the backend and services.
Relationships and Interactions
• User Interaction Flow:
• Users interact with the frontends (both “front” and “front-bo”) which communicate with the backend BFF.
• API Communication:
• The BFF service (in “bff/src/resolvers” and “bff/src/types”) handles requests from the UI and, in turn, communicates with auditor services.
• Auditors and Workers:
• Auditor applications (such as “bfb-devops-auditor”, “bfb-dynamic-auditor”, “bfb-static-auditor”) are designed with clear modules for analysis. Their workers (e.g., “DevOpsAnalysisWorker”, “LighthouseAnalysisWorker”) process tasks (like analysis or report generation) asynchronously.
• Shared Libraries:
• The core-logic library provides functions and database model definitions used by auditor services and probably by the backend to persist or fetch data.
• Data Flow:
Architectural Patterns and Design Principles
• Monorepo Structure:
• The entire project is managed using pnpm and Nx, indicating a shared dependency and modular design.
• Separation of Concerns:
• Clear segregation between UI (front, front-bo), API (bff), and multiple auditor/analysis services.
• Microservice-style Modules within the Monorepo:
• Each auditor service is self-contained, with dedicated configuration, worker processes, and domain-specific logic. The BFF acts as an aggregator.
• Use of Containerization and CI/CD:
• Docker configurations (docker-compose files, Dockerfile in v6y-config) and GitHub workflows are present to manage deployments and tests.
Relevant Technologies and Frameworks
• Frontend: Next.js (reference to next.config.mjs), React components, and Vite/Vitest setup.
• Backend: Node.js (with GraphQL resolvers), TypeScript (based on .ts and .tsx files), and Express-like servers.
• Libraries: Core-logic involves database ORM and utility functions; UI-kit/ui-guide provides a component library.
• Deployment: Docker and docker-compose, plus CI/CD configuration files under .github/workflows.
• Testing: Vitest and Jest configurations across apps.