Looking to hire Laravel developers? Try LaraJobs

laravel-content-bridge maintained by goodfellazz

Description
Universal Laravel bridge for external AI content generation SaaS
Author
Last update
2026/08/06 18:38 (dev-main)
License
Downloads
4

Comments
comments powered by Disqus

Laravel Content Bridge

Universal Laravel package that exposes configurable Eloquent entities to an external AI content generation SaaS (GoodFellazz AI).

Installation

Requires PHP 8.2+ and Laravel 10–13.

composer require goodfellazz/laravel-content-bridge
php artisan vendor:publish --tag=content-bridge-config

The package is published on Packagist. Source code lives on GitLab.

Local path (monorepo development)

When developing inside the GoodFellazz AI ecosystem:

{
    "repositories": [
        {
            "type": "path",
            "url": "../laravel-content-bridge",
            "options": {
                "symlink": true
            }
        }
    ],
    "require": {
        "goodfellazz/laravel-content-bridge": "@dev"
    }
}

GitLab Package Registry (optional)

Only needed if you cannot use Packagist (e.g. private mirror). GitLab Composer Registry requires a token even for public projects.

  1. Create a deploy token or PAT with read_api / read_package_registry.
  2. Add auth to ~/.composer/auth.json:
{
    "http-basic": {
        "gitlab.com": {
            "username": "<token-name-or-oauth2>",
            "password": "<gitlab-token>"
        }
    }
}
  1. Register the group Composer repository and require the package:
{
    "repositories": [
        {
            "type": "composer",
            "url": "https://gitlab.com/api/v4/group/<GROUP_ID>/-/packages/composer/"
        }
    ],
    "require": {
        "goodfellazz/laravel-content-bridge": "^1.0"
    }
}

Publishing new versions (maintainers)

One-time setup

  1. Create a public GitLab project: goodfellazz/laravel-content-bridge.
  2. Push main to GitLab.
  3. Submit the package on packagist.org/packages/submit with the GitLab clone URL: https://gitlab.com/goodfellazz/laravel-content-bridge.git
  4. In Packagist → package settings, enable GitLab webhook (or rely on Packagist auto-update) so tags sync automatically.
  5. Confirm the package page: https://packagist.org/packages/goodfellazz/laravel-content-bridge

Each release

  1. Update CHANGELOG.md.
  2. Commit and push to main.
  3. Tag and push:
git tag v1.0.0
git push origin v1.0.0

Packagist picks up the new tag. GitLab CI also mirrors the tag into the project Package Registry (optional secondary channel).

Environment

CONTENT_BRIDGE_ENABLED=true
CONTENT_BRIDGE_API_KEY=your-api-key
CONTENT_BRIDGE_API_SECRET=your-api-secret
CONTENT_BRIDGE_SITE_NAME="My Shop"

Generate keys:

php artisan tinker --execute="echo bin2hex(random_bytes(32));"

Use the same key in SaaS when registering the site (sites.api_key).

API

All endpoints require X-Content-Bridge-Key header or Authorization: Bearer {key}.

Method Endpoint Description
GET /api/content-bridge/v1/health Health check
GET /api/content-bridge/v1/schema Entity discovery for SaaS
GET /api/content-bridge/v1/entities/{type} List entities
GET /api/content-bridge/v1/entities/{type}/{id} Single entity
PATCH /api/content-bridge/v1/entities/{type}/{id} Update writable fields
POST /api/content-bridge/v1/entities/{type}/preview Count entities matching filters

Query parameters

  • filter[category_id]=5 — apply configured filter
  • filter[empty_description]=1 — only entities with empty field
  • include=context — include related context for templates
  • per_page=50 — pagination (max defined in config)

Example config

See examples/catalog-content-bridge.php for a typical catalog (products + categories). After install:

cp vendor/goodfellazz/laravel-content-bridge/examples/catalog-content-bridge.php config/content-bridge.php

Local development (package itself)

composer install --no-dev
composer validate --strict

License

MIT. See LICENSE.