-
Notifications
You must be signed in to change notification settings - Fork 1
Vitality Architecture Overview
Hรฉla Ben Khalfallah edited this page Mar 3, 2025
·
15 revisions
Vitality is a modular system designed for scalability, maintainability, and seamless code auditing. It ensures a single source of truth for all code quality, performance, and security assessments.
v6y-apps
โโโ front # Main user interface (IHM)
โโโ front-bo # Back-office interface (BO)
โโโ bff # Backend for Frontend (GraphQL, Node.js)
โโโ bfb-main-analyzer # Central code analysis orchestrator
โโโ bfb-static-auditor # Static code analysis module
โโโ bfb-devops-auditor # DevOps metrics analyzer
โโโ bfb-url-dynamic-auditor # URL-based dynamic analysis (e.g., Lighthouse)
v6y-libs
โโโ core-logic # Reusable backend logic
โโโ ui-kit # Common UI components and hooks
ui-guide # Storybook documentation for ui-kit
persistence # Database layer (PostgreSQL)
- Purpose: User-facing interface for audit visualization, project tracking, and reporting.
- Technologies: React, Next.js, GraphQL
-
Guidelines:
- Use only components from ui-kit.
- No direct usage of UI librariesโcontribute missing components to ui-kit.
- No direct usage of CSS, inline styles, or any other type of style should be used. All needed styles should be implemented inside components exposed by ui-kit.
- All new components must include tests and Storybook documentation (ui-guide).
- Purpose: Admin and configuration interface for managing applications and audit settings.
- Technologies: React, Next.js, Refine, GraphQL
-
Guidelines:
- Use only components from ui-kit.
- No direct usage of UI librariesโcontribute missing components to ui-kit.
- No direct usage of CSS, inline styles, or any other type of style should be used. All needed styles should be implemented inside components exposed by ui-kit.
- All new components must include tests and Storybook documentation (ui-guide).
- Role: Orchestrates frontend-backend communication via GraphQL.
- Technologies: Node.js, GraphQL
-
Responsibilities:
- Data aggregation and transformation.
- Authentication and authorization.
- Rate limiting and caching.
- Role: Single source of truthโorchestrates auditing processes.
-
Functionality:
- Fetches applications configured in BO.
- Manages scheduled execution (every midnight).
- Determines which BFB Auditors to trigger.
- Purpose: Specialized analysis modules using various tools.
-
Existing Auditors:
-
bfb-static-code-auditor:
- Code complexity, duplication, modularity.
- Security vulnerabilities, dependency analysis.
-
bfb-devops-auditor:
- DevOps DORA metrics, CI/CD health.
-
bfb-url-dynamic-auditor:
- Lighthouse audits (Performance, SEO, Accessibility).
-
bfb-static-code-auditor:
- Database: PostgreSQL
-
Responsibilities:
- Stores audit results and historical data.
- Ensures data consistency and integrity.
Scheduled Scan (Triggered at Midnight)
โ
โโโโถ BFB Main Analyzer (Scheduler)
โ
โโโ Fetches Applications List (from BO Configuration)
โ โโโ Each application is linked to:
โ โ โโโ Git Repository (GitHub/GitLab)
โ โ โโโ Production URL
โ
โโโ Ensures Single Source of Truth:
โ โโโ Avoids multiple redundant checks on the same source code
โ โโโ Centralized orchestration of auditing tasks
โ
โโโ Triggers BFB Auditors (Child Analyzers)
โ โโโ Verifies if each child auditor is available before execution
โ โโโ Dispatches application analysis tasks
โ
โโโ Child Auditors Execution
โ โโโ Static Code Analysis:
โ โ โโโ Linting & Style Checks
โ โ โโโ Code Quality & Security
โ โ โโโ Dependencies Vulnerability Analysis
โ โ
โ โโโ Dynamic Analysis:
โ โ โโโ Lighthouse โ Performance, SEO, Accessibility
โ โ โโโ API Security Audit โ OWASP Compliance
โ โ
โ โโโ DevOps Metrics:
โ โ โโโ DORA Metrics โ Deployment Frequency, Lead Time, etc.
โ โ โโโ CI/CD Pipeline Health Monitoring
โ
โโโ Reporting & Data Persistence
โ โโโ Aggregates results from all auditors
โ โโโ Generates structured reports
โ โโโ Stores analysis data in PostgreSQL (Historical Tracking)
โ
โโโโถ Frontend Display (IHM & BO)
โ
โโโ IHM (Developer Insights)
โ โโโ Displays audit results per application
โ โโโ Provides interactive filtering & search
โ โโโ Allows issue tracking & resolution workflows
โ
โโโ BO (Admin & Configuration)
โ โโโ Manages applications & linked repositories
โ โโโ Configures audit rules & thresholds
โ โโโ Monitors scheduled execution & overall system health
โ
โโโโถ Users can view reports, export data, and track historical trends
- Shared logic goes to core-logic (backend) or ui-kit (frontend).
- All UI components should be documented in ui-guide using Storybook.
- Contributions should follow the design system principles established in ui-kit.
- Each module requires unit and integration tests.
- Use Storybook for visual testing of UI components.
Vitality is designed to provide scalable, efficient, and automated code auditing. By ensuring a clean, modular architecture, we maintain audit integrity, structured reporting, and developer-friendly visualization.
This system guarantees that code quality, security, and performance insights are accessible, actionable, and reliable. ๐ฏ