bluefly/alternative_services

DDEV service orchestration and environment management for Drupal AI platform.

Installs: 98

Dependents: 1

Suggesters: 2

Security: 0

Type:drupal-module

0.1.0 2025-07-27 15:37 UTC

README

DDEV service orchestration and environment management for Drupal AI platform.

Description

Alternative Services provides comprehensive service discovery, health monitoring, and environment management for AI-driven platforms. It integrates with DDEV for local development and supports production deployment with full service orchestration capabilities.

Features

  • Service Discovery: Automatic detection of Docker, DDEV, and Kubernetes services
  • Health Monitoring: Real-time health checks with configurable intervals
  • Environment Management: Switch between production, local, and development environments
  • Unified Dashboard: Web-based interface for managing all services
  • Bluefly Services Import: One-click import of predefined service configurations
  • API Endpoints: RESTful APIs for service management and monitoring
  • Drush Integration: Command-line tools for service management

Requirements

  • Drupal 10.3+ or Drupal 11+
  • PHP 8.1+
  • ECK module for entity storage
  • Docker or DDEV (recommended for local development)

Installation

  1. Install via Composer:

    composer require drupal/alternative_services
    
  2. Enable the module:

    drush en alternative_services -y
    
  3. Import Bluefly services (if applicable):

    drush as:import-bluefly
    

Configuration

Navigate to Configuration > Services > Alternative Services (/admin/config/services/alternative-services) to:

  • View the unified dashboard
  • Configure health monitoring settings
  • Manage DDEV stacks
  • Import/export service configurations

Usage

Drush Commands

# List all services
drush as:list

# Check service health
drush as:health [service_id]

# Import Bluefly services
drush as:import-bluefly

# Discover services
drush as:discover

# Deploy DDEV stack
drush as:deploy [stack_id]

# Show service statistics
drush as:stats

API Endpoints

  • GET /api/services/status - Service status overview
  • GET /api/services/health - Health check data
  • GET /api/services/dashboard - Dashboard data
  • POST /api/services/{service_id}/action/{action} - Service actions

Service Management

Services are managed as Drupal config entities, allowing:

  • Full CRUD operations via Drupal UI
  • Export/import capabilities
  • Environment-specific configurations
  • Integration with Drupal's permission system

Supported Service Types

  • AI Models: Ollama, OpenAI, Anthropic, HuggingFace
  • Vector Databases: Qdrant, Pinecone
  • Monitoring: Grafana, Prometheus
  • Analytics: MLflow
  • Web Services: Custom APIs, documentation portals
  • Development Tools: DDEV, Docker containers

Quality Assurance

TDDAI Audits

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

Audit Reports:

  • docs/alternative_services-violations.json - Comprehensive audit report
  • docs/alternative_services_focused.json - Focused analysis

Run TDDAI Audit:

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

Audit Coverage:

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

Permissions

  • administer alternative services - Full administrative access
  • view alternative services - Read-only access to service data
  • edit alternative services - Edit service configurations
  • delete alternative services - Remove services

Development

This module follows strict Drupal 10 coding standards:

  • PSR-4 autoloading with proper namespacing
  • Dependency injection for all services
  • Comprehensive configuration schema
  • Security best practices (input validation, output escaping)
  • Event-driven architecture where applicable

Testing

Run tests with PHPUnit:

./vendor/bin/phpunit modules/custom/alternative_services/tests/

Contributing

  1. Follow Drupal coding standards
  2. Include tests for new functionality
  3. Update documentation as needed
  4. Use semantic versioning for releases

Support

  • Issue queue: [Drupal.org project page]
  • Documentation: [Module README and inline docs]

License

GPL-2.0-or-later