Textstem: The AI-First Content Management Framework for Laravel

Textstem is a comprehensive Laravel package designed for developers building modern, scalable content management systems. It moves beyond traditional "blob-of-text" CMS patterns, offering a modular, component-based architecture with deep AI integration at its core.

Whether you are building a standard marketing site, a headless CMS, or a complex enterprise application, Textstem provides the building blocks to "wrangle" your content efficiently.


Key Concepts

1. Wrangler Pages & Components

Textstem replaces the traditional "page body" with a flexible Page & Component model.

  • Wrangler Pages: The structural container for a URL, defining metadata (SEO, JSON-LD) and its layout template.
  • Wrangler Components: Modular blocks of content (Prose, Hero, Gallery, AI-Widgets) that are assigned to specific Slots (e.g., main, sidebar, footer) within a page.
  • Slots & Regions: Templates define "Regions" where components can be dynamically placed, allowing for highly flexible layouts without hardcoding.

2. AI-Native Workflow

AI is not an afterthought in Textstem; it is baked into the content lifecycle:

  • Prompt Library: A curated collection of permission-scoped prompt templates mapped to your business objects.
  • Contextual Intelligence: AI actions are executed with full awareness of your page state, record IDs, and field values.
  • Schema Validation: Textstem validates LLM outputs against defined JSON schemas before applying changes to your database.

3. Asset Management (The "Asset Wrangler")

A robust media manager that handles more than just storage:

  • Processing Status: Real-time tracking of image/video processing via background queues.
  • Auto-Metadata: AI-powered generation of captions, descriptions, and alt-text for uploaded assets.
  • Focal Points & Thumbnails: Advanced image manipulation and fingerprinting for deduplication.

4. Snapshots & Versioning

Every change to a Wrangler Page or Component is automatically "snapshotted."

  • Audit Trails: Track exactly who changed what and when.
  • Point-in-Time Recovery: Roll back content to any previous state with a single click or command.

Developer Features

  • Artisan Scaffolding: Generate new modules, components, and dashboard widgets instantly using php artisan textstem:make:*.
  • Headless Ready: A full REST API provides JSON representations of your Wrangler Pages, complete with nested component data.
  • Real-time Interaction: Built-in support for WebSockets (Pusher/Soketi) for live content updates and background task notifications.
  • Extensible Service Pattern: Clean, decoupled logic using a Service-layer architecture that is easy to override or extend in your host application.

Architecture Overview

  • Frontend: Supports Vanilla Blade, Livewire (Jetstream), and Inertia.js.
  • Database: Uses standard Eloquent models with advanced traits for Slugging, Tagging, and Searching.
  • Search: Built-in integration for Scout (Algolia/Typesense) with pre-configured searchable schemas.

Getting Started

# Install via Composer
composer require medialight/textstem-laravel

# Run the interactive installation wizard
php artisan textstem:post-install

For detailed implementation guides, visit our Installation Guide or explore the API Reference.

esc