bluefly/gov_compliance

Government compliance module for security policies and regulatory requirements

0.1.0 2025-07-27 17:47 UTC

README

"navtitle": "gov_compliance" "shortdesc": "Part of the LLM Platform ecosystem" "source": "Last updated: 2025-08-01"

"outputclass": "concept"

API-First Integration for gov_compliance Drupal Module {#topic-api-first-integration-for-gov-compliance-drupal-module-1 .concept}

Repository Information {#topic-repository-information-2}

  • Type: Drupal Module (Git Submodule)
  • GitLab URL: https://gitlab.bluefly.io/llm/gov_compliance
  • Submodule Path: web/modules/custom/gov_compliance
  • Local Path: /Users/flux423/Sites/LLM/llm-platform/web/modules/custom/gov_compliance

Integration Steps {#topic-integration-steps-3}

  1. Navigate to Individual Repository

    # This module is a git submodule, work in its individual repo
    cd /path/to/individual/gov_compliance/repository
    
  2. Copy OpenAPI Specification

    cp openapi.yaml ./
    
  3. Create Contract Testing Structure

    mkdir -p tests/src/Functional
    mkdir -p tests/features
    
  4. Add PHPUnit Configuration

    <!-- phpunit.xml -->
    <testsuite name="gov_compliance API Contract Tests">
      <directory>tests/src/Functional</directory>
      <file>tests/src/Functional/*ApiContractTest.php</file>
    </testsuite>
    
  5. Configure JSON:API Entities

    # JSON:API is built into Drupal 10 core, just needs configuration
    drush en rest restui serialization hal -y
    drush cr
    
  6. Update GitLab CI

    include:
      - component: gitlab.bluefly.io/llm/gitlab_components/components/ci-cd/drupal/template@latest
      - component: gitlab.bluefly.io/llm/gitlab_components/components/testing/comprehensive-testing@latest
       
    drupal_api_validation:
      extends: .drupal_base
      script:
        - drush en rest restui serialization hal -y
        - drush cr
        - vendor/bin/phpunit tests/src/Functional/*ApiContractTest.php
    
  7. Commit Changes

    git add .
    git commit -m "feat: implement API-first architecture for Drupal module
       
    - Add OpenAPI 3.1 specification with JSON:API endpoints
    - Implement PHPUnit contract tests
    - Configure REST and JSON:API endpoints
    - Enable API-first development workflow
       
    🤖 Generated with API-First Transformation
       
    Co-Authored-By: Claude <noreply@anthropic.com>"
    git push origin main
    

JSON:API Endpoints {#topic-json-api-endpoints-4}

  • Entities: /jsonapi/gov_compliance/gov_compliance
  • Custom API: /api/v1/gov_compliance/*
  • Health Check: /api/v1/gov_compliance/health

Production Deployment {#topic-production-deployment-5}

Local Development {#topic-local-development-6}

Quality Assurance {#topic-quality-assurance-7}

TDDAI Audits

This module is regularly audited using TDDAI for Drupal compliance and best practices.

Latest Audit Status: ✅ Passed (No violations found)
Audit Report: docs/gov_compliance_audit.json

Run TDDAI Audit:

npx tddai drupal audit web/modules/custom/gov_compliance --json

Audit Coverage:

  • Drupal 10/11 compliance
  • Security best practices
  • Code quality standards
  • API contract validation
  • Test coverage analysis