Publishing

Once your product is built or updated, you’ll want your users to receive updates automatically.

Chaos MVC includes a native update system that allows your installations to check your domain for new versions and apply updates seamlessly.


How it works

Each installed module has a version number (e.g. 1.0.0) visible in:
Admin → Modules
The system periodically checks your update endpoint for new versions.

Admin
 ↓
Modules
 ↓
Request → https://yourdomain.com/updates/product.json
 ↓
If version is newer → show "Update" button
 ↓
Download → https://yourdomain.com/packages/product-1.0.1.zip
 ↓
Extract + replace files
 ↓
Version updates in Admin

Required Structure (on YOUR domain)

  • On your domain
    1. public/updates/product.json
    2. public/releases/package-1.0.1.zip


Example Product JSON

public/updates/<$type><$name>/your-product.json
{
  "version": "1.0.1",
  "update_url": "https://mydomain.com/updates/my-product.json",
  "description": "Some information about my product.",
  "update_url": "https://yourdomain.com/updates/modules/example.json",
    "creator": "Your Initials",
    "domain": "www.yourdomain.com",
    "certified": "No",
    "signing": {
        "sha256": "SHA-256",
        "key_id": "Your-keys-id",
        "public_key": "your base64 public key from public.pem"
    },
    "files": [
        "controllers/example.php",
        "models/example_model.php",
        "views/index.php",
        "views/admin/index.php",
        "sql/schema.sql",
        "sql/patches/1.8.9-to-1.9.0.sql",
        "docs/README.md",
        "docs/CHANGELOG.md"
    ],
    "routes": [
        "index"
    ],
    "database_tables": [
        "example_records"
    ],
    "migrations": {
        "1.8.9-to-1.9.0": "sql/patches/1.8.9-to-1.9.0.sql"
    }
}
}

You are now the source of truth for your product.

A fully structured module is available in the Example Module documentation and Downloads. All modules should follow this structure.

If your module behaves unexpectedly, compare it against the official example module before seeking support.

By noting Certified: Yes, you are stating that you have been awarded a Chaos Developer Certification. Without that credential, use "certified": "No". Learn about the requirements in the Chaos Certified Program.