Setup

Installation

Install ccast/tagixo-primix, publish assets, and verify the baseline.

Installing the Tagixo–Primix Adapter

ccast/tagixo-primix is the Primix adapter for the Tagixo visual builder. It registers Primix resources for Pages, Layouts, Menus, Global Variables, and Forms, and wires the admin panel into the builder iframe.


Prerequisites

Before installing the adapter you need both of the following in your project:

Requirement Why
primix/primix The adapter's Primix resources, actions, and table/form components extend Primix base classes.
ccast/tagixo (core) The adapter depends on the core's models (Page, Layout, Menu, FormSchema, GlobalVariable) and its service providers.

Install the core first (see Core Installation for the private VCS setup). The adapter itself is on public Packagist — no GitHub token is required for it.


Installing the Adapter

composer require ccast/tagixo-primix

Because this package is on public Packagist, no COMPOSER_AUTH or github-oauth entry is needed for it. Only the core (ccast/tagixo) requires the PAT.

The service provider is auto-discovered via extra.laravel.providers in the package's composer.json. No manual registration in bootstrap/providers.php is needed.


Publishing Assets

After installing (and after every upgrade), re-publish the builder assets:

php artisan vendor:publish --tag=tagixo-assets --force

With Sail:

./vendor/bin/sail artisan vendor:publish --tag=tagixo-assets --force

What gets published

Path Contents
public/vendor/tagixo/builder.js Main builder bundle (Vue 3 application, all modules).
public/vendor/tagixo/chunks/ Dynamic import chunks (code-split from builder.js).
public/vendor/tagixo/css/ Builder UI styles (tagixo.css, tgx-layout.css).
public/vendor/livue/primix/support/ LiVue Primix support scripts and styles.

Why published files must be committed

The production Docker image is built with composer install --no-scripts and does not run vendor:publish. Portainer pulls the pre-built image and serves whatever is already in public/vendor/. If you do not commit the published assets, the production builder will load stale or missing JS/CSS.

Commit the entire public/vendor/tagixo/ and public/vendor/livue/ directories after every publish.

Do not add a ?v= query string to the builder script tag. builder.js uses native ES module imports. Adding a query parameter forks the ES module graph, causing Pinia to be instantiated twice — the builder will break silently. Cache-busting is handled by nginx-proxy-manager's asset-cache setting (which must be disabled for the builder routes).


LiVue as the Reactivity Layer

The Primix admin panel uses LiVue (not Livewire) as its frontend reactivity layer. This distinction matters when debugging or extending the admin.

Concern LiVue (Primix) Livewire
Component dispatch window.dispatchEvent(new CustomEvent('livue:…')) $wire.dispatch() / Livewire.dispatch()
DOM morphing LiVue morphs its own component tree on response Livewire morphs the whole page
wire: attributes Not used — do not add them to Primix views Native Livewire mechanism
<style> tag survival LiVue morphs may strip <style> tags injected into the panel Use PrimixFormStyles::scriptFrom() to re-inject via <script> (survives morphs)

PrimixFormStyles morph-strip workaround

When a Primix form field needs to inject CSS (e.g. the form element builder), inline <style> tags are removed by LiVue's morph pass. The workaround is to emit the CSS as a <script> that writes a <style> tag, registered via a render hook:

// In a Primix resource's form schema
->afterStateHydrated(function () {
    PrimixFormStyles::scriptFrom($css);
})

Do not rely on <style> tags injected directly into Primix panel HTML — they will not survive LiVue morphs.


Version Compatibility Matrix

ccast/tagixo-primix ccast/tagixo (core) primix/primix PHP
^1.2 ^1.0.50 ^1.0 8.2 – 8.3
^1.1 ^1.0.40 ^1.0 8.2 – 8.3
^1.0 ^1.0.0 ^1.0 8.2

Always run composer update ccast/tagixo ccast/tagixo-primix together so the constraint resolver picks compatible versions of both packages.


Clearing Caches After Install

Octane caches the application container in memory. After installing or upgrading, clear all caches and reload Octane:

php artisan optimize:clear
php artisan octane:reload

With Sail:

./vendor/bin/sail artisan optimize:clear
./vendor/bin/sail artisan octane:reload

If you skip this step, the old service provider bindings and view cache remain active. Symptoms include: builder iframe loads a blank canvas, admin resources return 404, or the panel fails to discover the ccast/tagixo-primix provider.


Verifying the Install

1. Check for 404s in the network tab

Open /admin in the browser and open DevTools → Network. Filter by JS/CSS. Look for:

  • public/vendor/tagixo/builder.js — must return 200
  • public/vendor/tagixo/chunks/*.js — must return 200 for each chunk loaded
  • public/vendor/livue/primix/support/primix-support.js — must return 200

Any 404 here means assets were not published, or published files were not committed and the image is stale.

2. Scaffold a builder page resource

The package ships an Artisan command to generate a skeleton Primix builder page resource:

php artisan make:primix-builder-page MyPageResource

This creates app/Primix/Resources/MyPageResource.php with the correct base class and the loadStructure / saveStructure stubs. Confirm the file was created and that the admin panel auto-discovers it (resources in app/Primix/Resources/ are discovered automatically by AdminPanelProvider).

3. Console error lookup table

Error Cause Fix
Pinia is already installed ?v= query string on builder.js Remove the query string from the script tag
[LiVue] component not resolved: TagixoBuilder Assets not published or 404 Re-publish and commit; check nginx cache
Class "Ccast\Tagixo\Models\Page" not found Core not installed or autoload not dumped composer require ccast/tagixo + composer dump-autoload
Builder canvas is blank (no error) loadStructure returns null instead of [] Return an empty array, not null, when no data exists
Admin routes 404 (/admin/pages etc.) optimize:clear not run after install Run php artisan optimize:clear && php artisan octane:reload

Upgrading

When upgrading either package:

  1. composer update ccast/tagixo ccast/tagixo-primix
  2. php artisan vendor:publish --tag=tagixo-assets --force
  3. php artisan optimize:clear && php artisan octane:reload
  4. Commit public/vendor/tagixo/ and public/vendor/livue/ in full
  5. Run php artisan migrate if the release notes mention new migrations
  6. Run the test suite: ./vendor/bin/sail composer test

Do not skip step 4 — the production image is built from the committed tree and does not re-publish at boot.