ai-editor/ai-text-editor

Laravel 12+ AI-Powered Text Editor with Multi-Stack Support - Blade+Livewire, Vue.js SPA, React+Next.js

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ai-editor/ai-text-editor

v1.19.0 2025-09-27 23:35 UTC

This package is auto-updated.

Last update: 2025-09-27 23:36:02 UTC


README

A comprehensive Laravel 12+ package that provides AI-powered text editing capabilities with multi-stack support for modern web development. Choose between Blade+Livewire, Vue.js SPA, or React+Next.js with intelligent content generation and editing features.

๐Ÿš€ Features

๐Ÿค– AI-Powered Features

  • AI Text Generation: Generate content with OpenAI, Anthropic, Google
  • Smart Editing: AI-powered text editing and rewriting
  • Content Summarization: Automatic content summarization
  • Text Completion: Intelligent text completion
  • Memory System: Version control and content history
  • Multi-Provider Support: OpenAI, Anthropic, Google, HuggingFace, OpenRouter

๐ŸŽฏ Interactive Installation

  • CLI Installer: php artisan ai-editor:install
  • Web Installer: php artisan ai-editor:web-installer
  • Stack Selection: Choose your preferred frontend stack
  • Theme Selection: Multiple built-in themes
  • Dependency Management: Auto-install Composer and NPM packages

๐Ÿ“ฆ Four Frontend Stacks

0. Laravel Default ๐Ÿš€

  • Standard Laravel with Blade templates
  • Minimal frontend dependencies
  • Server-side rendering with Blade
  • Tailwind CSS for styling
  • Simple and lightweight

1. Livewire โšก

  • Real-time updates with Livewire
  • Server-side rendering with Blade
  • Alpine.js for interactivity
  • Tailwind CSS for styling
  • No JavaScript required

2. Vue.js ๐Ÿ’š

  • Vue 3 with Composition API
  • Vue Router for navigation
  • Pinia for state management
  • Axios for API calls
  • Vite for fast development

3. React + Next.js โš›๏ธ

  • Next.js 14 with App Router
  • React 18 with hooks
  • TypeScript support
  • SSR and static generation
  • API routes integration

๐ŸŽจ Theme System

  • Default: Clean and modern
  • Dark: Dark theme with modern aesthetics
  • Minimal: Minimalist design
  • Colorful: Vibrant theme with multiple colors
  • Glassmorphism: Modern frosted glass effects with blur
  • Custom: Create your own themes

๐Ÿ”ง Built-in Features

  • Authentication: Laravel Breeze integration
  • User Management: Roles and permissions
  • Dashboard: Analytics and quick actions
  • API Endpoints: RESTful APIs for all stacks
  • Security: CSRF, rate limiting, validation
  • Performance: Caching, optimization

๐Ÿ“ฆ Installation

1. Install via Composer

composer require ai-editor/ai-text-editor

2. Run Post-Installation Setup

php artisan ai-editor:post-install

This command automatically:

  • โœ… Detects Laravel 12+ and applies compatibility fixes
  • โœ… Publishes configuration files
  • โœ… Runs package discovery
  • โœ… Sets up everything needed for the package

3. Install AI Text Editor

php artisan ai-editor:install

Web Installer

php artisan ai-editor:web-installer
# Visit http://localhost:8001/multi-stack/installer

๐ŸŽฏ Quick Start

Basic Installation

# Install with default settings
php artisan ai-editor:install

# Choose your stack:
# 1 โ†’ Blade + Livewire
# 2 โ†’ Vue.js SPA  
# 3 โ†’ React + Next.js

Advanced Installation

# Install specific stack
php artisan ai-editor:install --stack=vue-spa --theme=dark

# Skip dependencies
php artisan ai-editor:install --no-deps

# Skip migrations
php artisan ai-editor:install --no-migrate

Web Installer

# Start web installer
php artisan ai-editor:web-installer

# Visit http://localhost:8001/multi-stack/installer
# Select stack, theme, and options
# Click "Install Laravel Multi-Stack"

๐Ÿ—๏ธ Architecture

Core Services

  • InstallerService: Handles installation process
  • StackService: Manages frontend stacks
  • ThemeService: Handles theme management

Commands

  • InstallCommand: CLI installer
  • WebInstallerCommand: Web installer server
  • StackCommand: Stack management
  • ThemeCommand: Theme management

Controllers

  • InstallerController: Web installer interface
  • StackController: Stack management API
  • ThemeController: Theme management API

๐Ÿ”ง Configuration

Environment Variables

# Multi-Stack Settings
MULTI_STACK_DEBUG=false
MULTI_STACK_AUTO_INSTALL=true
MULTI_STACK_INSTALL_NPM=true
MULTI_STACK_INSTALL_COMPOSER=true
MULTI_STACK_RUN_MIGRATIONS=true
MULTI_STACK_SEED_DATABASE=true
MULTI_STACK_SETUP_AUTH=true
MULTI_STACK_CREATE_ADMIN=true
MULTI_STACK_SETUP_THEME=true

Configuration File

// config/multi-stack.php
return [
    'stacks' => [
        'blade-livewire' => [
            'name' => 'Blade + Livewire',
            'description' => 'Traditional Laravel with Blade templates and Livewire',
            'dependencies' => [
                'composer' => ['livewire/livewire', 'spatie/laravel-permission'],
                'npm' => ['alpinejs', 'tailwindcss', '@tailwindcss/forms']
            ]
        ],
        // ... other stacks
    ],
    'themes' => [
        'default' => [
            'name' => 'Default',
            'colors' => [
                'primary' => '#3b82f6',
                'secondary' => '#6b7280',
                // ... more colors
            ]
        ],
        // ... other themes
    ]
];

๐ŸŽจ Frontend Stacks

Blade + Livewire

php artisan ai-editor:install --stack=blade-livewire

Features:

  • Real-time updates with Livewire
  • Server-side rendering
  • Blade components
  • Alpine.js integration
  • Tailwind CSS

Dependencies:

  • livewire/livewire
  • spatie/laravel-permission
  • alpinejs
  • tailwindcss

Vue.js SPA

php artisan ai-editor:install --stack=vue-spa

Features:

  • Vue 3 with Composition API
  • Vue Router for navigation
  • Pinia for state management
  • Axios for API calls
  • Vite for fast development

Dependencies:

  • laravel/sanctum
  • vue@3
  • vue-router@4
  • pinia
  • axios

React + Next.js

php artisan ai-editor:install --stack=react-nextjs

Features:

  • Next.js 14 with App Router
  • React 18 with hooks
  • TypeScript support
  • SSR and static generation
  • API routes

Dependencies:

  • laravel/sanctum
  • next@14
  • react@18
  • typescript

๐ŸŽจ Theme System

Available Themes

# List all themes
php artisan ai-editor:themes --list

# Apply theme
php artisan ai-editor:themes --apply=dark

# Show theme details
php artisan ai-editor:themes dark

Custom Themes

// config/multi-stack.php
'themes' => [
    'custom' => [
        'name' => 'Custom Theme',
        'description' => 'Your custom theme',
        'colors' => [
            'primary' => '#your-color',
            'secondary' => '#your-color',
            // ... more colors
        ]
    ]
]

๐Ÿ”ง Commands

Installation Commands

# CLI installer
php artisan ai-editor:install

# Web installer
php artisan ai-editor:web-installer

# With options
php artisan ai-editor:install --stack=vue-spa --theme=dark --no-deps

Stack Management

# List available stacks
php artisan ai-editor:stacks

# Show stack details
php artisan ai-editor:stacks vue-spa

# Switch stack (future feature)
php artisan ai-editor:stacks --switch=react-nextjs

Theme Management

# List themes
php artisan ai-editor:themes --list

# Apply theme
php artisan ai-editor:themes --apply=dark

# Show theme details
php artisan ai-editor:themes dark

๐ŸŒ Web Installer

Starting the Web Installer

php artisan ai-editor:web-installer
# Visit http://localhost:8001/multi-stack/installer

Web Installer Features

  • Interactive UI: Beautiful web interface
  • Stack Selection: Visual stack comparison
  • Theme Preview: Live theme previews
  • Progress Tracking: Real-time installation progress
  • Options Configuration: Customize installation options

Web Installer Routes

  • /multi-stack/installer - Main installer page
  • /multi-stack/installer/select-stack - Stack selection API
  • /multi-stack/installer/install - Installation API
  • /multi-stack/installer/progress/{id} - Progress tracking
  • /multi-stack/installer/complete - Installation complete

๐Ÿ”’ Security

Built-in Security Features

  • CSRF Protection: All forms and API endpoints
  • Rate Limiting: Configurable limits for API calls
  • Authentication: Laravel Breeze integration
  • Authorization: Role-based permissions
  • Input Validation: Sanitize all user inputs
  • XSS Protection: Built-in XSS prevention

Security Configuration

'security' => [
    'csrf_protection' => true,
    'rate_limiting' => [
        'enabled' => true,
        'max_attempts' => 60,
        'decay_minutes' => 1,
    ],
    'input_validation' => true,
    'xss_protection' => true,
],

๐Ÿš€ Performance

Optimization Features

  • Asset Optimization: Minified CSS/JS
  • Caching: File-based caching
  • Database Optimization: Efficient queries
  • Queue Processing: Background jobs
  • CDN Support: Static asset delivery

Performance Configuration

'performance' => [
    'caching' => [
        'enabled' => true,
        'driver' => 'file',
        'ttl' => 3600,
    ],
    'asset_optimization' => true,
    'database_optimization' => true,
],

๐Ÿ“š API Documentation

Stack Management API

# Get available stacks
GET /multi-stack/stacks

# Switch stack
POST /multi-stack/stacks/switch
{
    "stack": "vue-spa"
}

# Get stack status
GET /multi-stack/stacks/status

Theme Management API

# Get available themes
GET /multi-stack/themes

# Apply theme
POST /multi-stack/themes/apply
{
    "theme": "dark"
}

# Preview theme
GET /multi-stack/themes/preview/dark

Installation API

# Start installation
POST /multi-stack/installer/install
{
    "stack": "vue-spa",
    "theme": "dark",
    "options": {
        "install_composer": true,
        "install_npm": true,
        "run_migrations": true
    }
}

# Get installation progress
GET /multi-stack/installer/progress/{id}

๐Ÿงช Testing

# Run tests
php artisan test

# Run stack tests
php artisan test --filter=StackTest

# Run installer tests
php artisan test --filter=InstallerTest

๐Ÿ“ˆ Monitoring

Built-in Analytics

  • Installation statistics
  • Stack usage metrics
  • Performance monitoring
  • Error tracking
  • User activity logs

Custom Metrics

// Track stack usage
$stackService->trackUsage($stack);

// Track installation metrics
$installerService->trackInstallation($stack, $theme);

๐Ÿ”„ Updates & Maintenance

Stack Updates

# Update all stacks
php artisan ai-editor:stacks update-all

# Update specific stack
php artisan ai-editor:stacks update vue-spa

Theme Updates

# Update all themes
php artisan ai-editor:themes update-all

# Update specific theme
php artisan ai-editor:themes update dark

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿ†˜ Support

๐ŸŽ‰ What's Included

Complete Stack Scaffolding

  • Models: User, Role, Permission models
  • Controllers: API controllers for all stacks
  • Views: Blade templates for Blade+Livewire
  • Components: Vue/React components
  • Routes: Web and API routes
  • Migrations: Database migrations
  • Assets: CSS, JavaScript, images

Authentication System

  • Laravel Breeze: Complete auth scaffolding
  • User Management: Registration, login, logout
  • Password Reset: Email-based password reset
  • Email Verification: Email verification system
  • Role Management: Spatie Laravel Permission

Dashboard & UI

  • Dashboard: Analytics and quick actions
  • User Profile: Profile management
  • Settings: Application settings
  • Navigation: Responsive navigation
  • Components: Reusable UI components

API Integration

  • RESTful APIs: Complete API endpoints
  • Authentication: Sanctum API authentication
  • Rate Limiting: API rate limiting
  • CORS: Cross-origin resource sharing
  • Validation: Request validation

๐Ÿš€ Ready to build amazing Laravel applications with multiple frontend stacks? Get started today!