sphoenixai
AI-powered content generation and optimization module for Drupal 10+ with advanced chatbot interface, field mapping, and comprehensive analytics.
Table of Contents
- Overview
- Features
- Requirements
- Installation
- Configuration
- Permissions
- Troubleshooting
- Contributing
- License
Overview
The SPhoenix AI Content Assistant module integrates powerful AI tools directly into Drupal's content editing workflow. It provides a chatbot interface that helps content creators generate, optimize, and analyze content using advanced AI models.
Features
- AI-Powered Content Generation: Create articles, blog posts, and other content types
- Content Optimization: SEO analysis and content improvement suggestions
- Image Generation: AI-generated thumbnails and graphics
- Data Visualization: Charts, graphs, and tables
- Multi-language Support: Generate content in multiple languages
- Field Mapping: Intelligent mapping of AI responses to Drupal fields
- Usage Analytics: Comprehensive tracking and reporting
- CKEditor Integration: Seamless integration with Drupal's rich text editor
- Subscription Management: Built-in usage tracking and plan management
Requirements
- Drupal: 10.x or 11.x
- PHP: 8.0 or higher
- Dependencies:
drupal:nodedrupal:fielddrupal:userdrupal:system
- SPhoenix AI Account: Active API subscription
Installation
Composer Installation (Recommended)
composer require drupal/sphoenix_ai
drush en sphoenix_ai
drush cr
Manual Installation
- Download the module to
modules/contrib/sphoenix_ai - Enable the module:
drush en sphoenix_ai - Clear cache:
drush cr
Post-Installation Setup
- Configure permissions at
/admin/people/permissions#module-sphoenix_ai - Configure module settings at
/admin/config/content/sphoenix-ai - Enable content types at
/admin/config/content/sphoenix-ai/content-types - Configure field mappings at
/admin/config/content/sphoenix-ai/field-mapping
Configuration
Configuration Routes
Route URL Purpose Main Settings/admin/config/content/sphoenix-ai
Core module configuration
Content Types
/admin/config/content/sphoenix-ai/content-types
Enable/disable for content types
Field Mapping
/admin/config/content/sphoenix-ai/field-mapping
Configure field mappings
Usage Statistics
/admin/reports/sphoenix-ai
View usage analytics
Permissions
Configure permissions at /admin/people/permissions#module-sphoenix_ai:
use ai content assistant
Access AI features
Content Creator, Editor
administer sphoenix ai
Configure settings
Site Administrator
view ai content assistant usage
View analytics
Content Manager, Administrator
Troubleshooting
Common Issues
Chatbot Not Appearing
- Check content type configuration at
/admin/config/content/sphoenix-ai/content-types - Verify user permissions
- Clear cache:
drush cr - Check browser console for JavaScript errors
Authentication Problems
# Clear Drupal cache
drush cr
# Check module status
drush pml | grep sphoenix_ai
# Rebuild registry
drush rr
Content Not Inserting
- Configure field mappings at
/admin/config/content/sphoenix-ai/field-mapping - Check CKEditor compatibility
- Verify field permissions
Error Codes
Code Description SolutionNOT_AUTHENTICATED
User not logged in
Redirect to login
SUBSCRIPTION_REQUIRED
No active subscription
Show upgrade options
USAGE_LIMIT_EXCEEDED
Monthly limit reached
Plan upgrade needed
INVALID_REQUEST
Malformed request
Check request format
VALIDATION_ERROR
Missing parameters
Verify required fields
Logs
Check logs for debugging:
- Drupal logs:
/admin/reports/dblog - Browser console for JavaScript errors
- Server logs:
/var/log/apache2/error.logor/var/log/nginx/error.log
Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Follow Drupal coding standards
- Submit a pull request
Development Setup
# Clone repository
git clone https://github.com/yourusername/sphoenix_ai.git
# Install dependencies
composer install
# Run tests
./vendor/bin/phpunit
# Code standards check
./vendor/bin/phpcs --standard=Drupal,DrupalPractice .
Coding Standards
- Follow Drupal coding standards
- Use PHP 8+ features appropriately
- Write comprehensive documentation
- Include unit tests for new features
License
This project is licensed under the GPL-2.0+ License - see the LICENSE file for details.
Support
- Issue Queue: Drupal.org Issue Queue
- Documentation: Module Documentation
- Community: Drupal Slack #ai-content-assistant
Changelog
Version 1.0.0
- Initial release
- Core AI chat functionality
- Field mapping system
- Usage tracking
- CKEditor 5 integration
- Multi-language support