Files
hub/app/Http/Controllers/Admin
kelly 486e6864b6 feat: AI Copilot integration with Claude API
Add AI-powered content generation and improvement capabilities for product and brand content using Anthropic's Claude API.

## Core Services
- AiClient service: Claude API integration with rewrite modes (rewrite, shorten, expand, professional)
- AiSetting model: Encrypted API key storage, provider configuration
- Configuration caching for performance (5-minute cache)

## Controllers
- AiCopilotController: General AI preview endpoint for products/promotions/menus/templates
- BrandCopilotController: Brand-specific AI content generation
- Admin AiSettingsController: Super admin AI configuration management

## Admin Interface
- Filament AI Settings page: Configure provider, model, API key
- Settings stored encrypted in database
- Enable/disable AI features globally

## Features
- Generate new content from scratch
- Improve existing content
- Apply brand voice consistency
- Context-aware suggestions (product/promotion/menu/template)
- Character limit enforcement
- Stub responses for testing (full API integration ready)

## Security
- API keys encrypted at rest using Laravel's encrypt()
- Business-level module gating (hasAiCopilot())
- Admin-only configuration access
2025-11-23 00:55:01 -07:00
..