concept24/nova-ai-pagebuilder

AI Page Builder tool for Laravel Nova — conversational agent that builds landing pages (Page + blockText bands) with product selection, generated copy and images.

Maintainers

Package info

bitbucket.org/concept24/nova-ai-pagebuilder

pkg:composer/concept24/nova-ai-pagebuilder

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

v0.1.1 2026-08-26 06:30 UTC

This package is auto-updated.

Last update: 2026-08-26 06:30:56 UTC


README

AI Page Builder tool for Concept24 CMS — conversational multi-model agent that turns a natural-language brief into a complete draft landing page (Page + blockText bands, product selection, multi-locale copy, generated images), built on Laravel Nova.

Requirements

  • PHP >= 8.1
  • Laravel 12
  • Laravel Nova 4.12+ / 5.x
  • OpenRouter API key
  • A C24CMS application — the package writes into the host app's Page / BlockText models and product catalog (not portable to other Laravel apps, same tradeoff as nova-ai-report)

Installation

composer require concept24/nova-ai-pagebuilder

The service provider is auto-discovered. Migrations run automatically via loadMigrationsFrom. Publish config manually:

php artisan vendor:publish --tag=nova-ai-pagebuilder-config

Register the tool in NovaServiceProvider::tools() and add a MenuSection pointing to /nova-ai-pagebuilder.

Configuration

config/nova-ai-pagebuilder.php:

KeyEnv varDefault
openrouter.api_keyOPENROUTER_API_KEY
models.coordinatorNOVA_AI_PB_MODEL_COORDINATORopenai/gpt-5.4
models.sqlNOVA_AI_PB_MODEL_SQLanthropic/claude-sonnet-5
models.copyNOVA_AI_PB_MODEL_COPYopenai/gpt-5.4
models.imageNOVA_AI_PB_MODEL_IMAGEgoogle/gemini-3.1-flash-image
model_options.*per-role allowlists for the UI dropdowns
max_tool_iterations30
page_defaultsdraft (is_public=0, is_active=1), layout_default
localesnullconfig('app.allowed_languages')
layouts.excludenon-content bands excluded from the AI palette
images.max_per_page12
rate_limitNOVA_AI_PB_RATE_LIMIT30,1

Minimum .env:

OPENROUTER_API_KEY=sk-or-...

Features

  • Conversational flow with consent gates: short interview → live layout catalog → proposed band structure (requires explicit user approval) → generation → data entry → links.
  • Per-agent model dropdowns in the chat UI (Coordinator / DB queries / Copy / Images), config defaults + per-conversation override stored on the conversation (models json), validated server-side against per-role allowlists.
  • Product selection agent (select_products): read-only SQL sub-agent (sanitized SELECT/WITH only, LIMIT cap, sensitive-column masking, session execution timeout). Supports curated pinned SKU selections (incl. best/worst-sellers via site_orders_items) and dynamic filter specs (categories/brands/in_promo/last_added) consumed by the existing BlocktextRepository pipeline.
  • Copy generation in all active locales (native per-locale writing, strict JSON, SEO meta limits enforced).
  • Image generation via OpenRouter multimodal chat (modalities: ['image','text']), persisted per-conversation to tmp storage and attached to bands via Spatie MediaLibrary by the applier.
  • Deterministic data entry (LandingPageApplier): validates the full plan before any write (layouts on disk, min/max items, image refs, SKU existence), then creates the draft Page + bands + translations + media in one pass and flushes catalog/media cache tags. Draft pages are previewable on the frontend by logged-in admins (Page::scopePublic).
  • Composition canvas (drag & drop): split view next to the chat — a layout palette (thumbnails + badges), band cards with per-band instructions, image toggle, variant select and product drop-zones; product chips from chat research are draggable onto bands; the agent's numbered structure proposals render as an importable card (layout choice stays with the user); "Generate page from composition" builds exactly the user's canvas (1:1 validation in the applier, pinned-product specs auto-filled from the canvas).
  • Multi-conversation chat UI (SSE streaming, tool-call cards with image thumbnails, final page-result card with frontend + Nova links), per-phase cost logging (coordinator/sql/copy/image).

Architecture

  • PageBuilderOrchestrator — coordinator tool loop (OpenAI-style function calling over OpenRouter, SSE).
  • Tools: get_layout_catalog, select_products (modes: research/pinned/dynamic), generate_copy, generate_image (img2img with real product photos via product_skus), create_landing_page, get_page_links, get_composition, propose_structure.
  • LayoutCatalog — bands discovered from resources/views/layouts_text/ intersected with curated metadata (layout_catalog_meta.php).
  • SqlToolRunner + QuerySanitizer — read-only SQL sub-loop.
  • CopyGenerator, ImageGenerator — single-call sub-services with their own cost logging.
  • LandingPageApplier — validation + transactional Page/BlockText creation.
  • Tables: nova_ai_pagebuilder_conversations (incl. composition json — the canvas state, shared across users), nova_ai_pagebuilder_messages, nova_ai_pagebuilder_logs.

Changelog

VersionDateNotes
0.1.12026-08-26No functional changes — release de verificare pentru auto-update-ul Packagist (webhook Bitbucket)
0.1.02026-08-26Composition canvas: split view with layout palette, drag&drop band cards (instructions, image kind, variants, product drop-zones), draggable product chips from chat research, importable numbered structure proposals (propose_structure), get_composition tool + MODUL COMPOZIȚIE prompt stage, GET/PUT conversations/{id}/composition, 1:1 canvas↔plan validation with auto-filled pinned-product specs, single-hero guard (page banner dropped when the first band is a hero with image). Fixes: SSE client dropped streaming tokens equal to "0" (PHP empty()), copy generator delta retry for missing band keys, interrupted tool-calls get synthetic results on replay (conversations stay resumable). Coordinator default moved to GPT (gpt-5.4, gpt-5.5 in allowlists); 45 feature tests
0.0.12026-08-25Initial release: conversational landing-page agent with a two-stage flow — research/analysis turns (analytical product questions answered as markdown tables via mode=research, iterative proposals) and build stage (interview → structure consent → generation → data entry → links); per-agent model dropdowns (Coordinator/SQL/Copy/Image) with per-conversation override; read-only SQL product selection (pinned SKU + dynamic filters, best-sellers); multi-locale copy; image generation with img2img composition integrating the selected products' real photos (media read through the media disk, S3/spaces included); deterministic applier with full pre-write validation; draft-only pages with admin frontend preview; conversations shared across all tool users (owner shown in sidebar); per-phase cost logging; 31 feature tests