Skip to Content
Module developmentPublishing

Packaging and publishing

Which checks a module archive goes through when installed from a ZIP and from the platform, how the engine verifies the package signature and ionCube, what to put into module.json, and how a module learns about its licence.

By the end, your module is packed into an archive that passes the engine's checks both when a ZIP is uploaded in the admin and when it is installed from the platform, and you know which checks the engine runs and which of them depend on module.json. The archive layout itself and the pre-release checklist are in Modules and are not repeated here.

Minimal example

An archive with the Example module. module.json sits at the archive root or one folder down, as here:

example-1.2.0.zip
└── Example/
    ├── module.json
    ├── Providers/ExampleProvider.php
    ├── Services/BoostShop.php
    ├── Resources/lang/ru/example.php
    ├── Resources/lang/en/example.php
    └── database/Migrations/
app/Modules/Example/module.json
{
    "name": "Example",
    "version": "1.2.0",
    "description": "example.description",
    "providers": ["Flute\\Modules\\Example\\Providers\\ExampleProvider"],
    "dependencies": {
        "flute": "^2.0",
        "php": ">=8.2",
        "modules": {
            "Shop": "^2.0"
        }
    }
}
cd app/Modules && zip -r ../../example-1.2.0.zip Example -x 'Example/Tests/*'

Without dependencies.flute the module will not install: the engine treats it as a Flute 1.x module. Leave the Tests/ folder out of the archive, since a site has nothing to run it with.

How it works

A module reaches a site in three ways, and each runs different checks. What they share: the module is installed disabled, install and enable refuse a module with needsAdaptation() (no dependencies.flute, an empty value, an unreadable constraint, or a constraint that Flute 1.99.99 satisfies), and the dependencies are checked before installing.

PathWho starts itWhat the engine checks
ZIP in the admina user with admin.bossthe archive, extraction, module.json, PHP and Flute versions, dependencies. A ZIP has no signature
platform catalogthe owner of a site connected to the platformthe package's Ed25519 signature, archive hash and size, slug and version, manifest requirements, ionCube
old marketplace catalogthe owner of a site not connected to the platformthe address against trusted hosts, the checksum, a signature with the key from modules.marketplace_public_key

ZIP in the admin

The extracted archive is at most 100 MB. An archive with a suspiciously high compression ratio is treated as a zip bomb and refused, as are paths with ../, a leading / or anything escaping the extraction folder.

module.json must have name and version. The module key is key, or name without it, using only Latin letters, digits and _, starting with a letter. The module goes into app/Modules/<key>.

Platform catalog

The platform signs the package, so the author signs nothing. The engine verifies the signature with the packages-2026-11 key built into it. The signed string holds the slug, version, channel, SHA-256 and size of the archive, and the SHA-256 of the manifest.

Then the engine compares the manifest's slug and version with what it asked for, and only after that extracts the archive. The module folder is named after name in module.json if it matches the slug case-insensitively, otherwise after the slug.

When it asks for the manifest and the download link, the engine sends the platform the site's PHP version and thread safety (php_version, thread_safety). If the package manifest (flute-release.json at the archive root) sets encryption.encoder to ioncube, the engine requires ionCube Loader and refuses FrankenPHP worker mode. It puts a .flute-ioncube marker into the module folder, and with it the module enables only where the loader is present.

Publish a module or theme in the catalogue

You can publish a free module or theme of your own in the platform catalogue, and site owners will install it from the admin panel like any other module. Every version is reviewed before it appears: the code is read automatically, and the catalogue owner makes the decision. What you may publish and which rights you grant is set out in the author terms.

First reserve the resource. In the platform account open the catalogue, press "Publish your own module or theme", accept the terms and create the resource. Its slug is the folder name in lower case: the module app/Modules/BoostShop needs the slug boostshop. Issue a token on the same page and save it to a file outside the repository. Versions are accepted only from an account with a confirmed email.

Then build the package and send it. The module folder must be a git repository of its own with nothing uncommitted; a theme has no such requirement.

php scripts/release/build-module.php app/Modules/BoostShop
php scripts/release/publish-package.php \
    storage/release/packages/boostshop-1.0.0.zip \
    storage/release/packages/boostshop-1.0.0.manifest.json \
    --api=https://api.flute-cms.com --token-file=$HOME/.flute-author-token --author

The version goes to review and shows in the account with its status. The decision arrives at the account email: a refusal carries the reason, and you can send the same version again once it is fixed.

The platform runs some of the checks right at upload. In that case the script prints the reason and the file that caused the refusal. A version is refused when:

What the package hasWhy
encoded or obscured code, .phar, binary filesthe code has to be readable
a key in module.json that differs from the sluga resource installs only into its own folder
files in package.remote outside market/the platform keeps only the catalogue page of an author's resource
a version that is not newer than the published onesites only update forward
a module that repeats the purpose of a paid module in the cataloguethe terms forbid it

The platform builds the catalogue page of the resource from the market/ folder at the module root. The folder never reaches a site: the build takes it out of the archive and sends it along with the version. It holds market.json and the images or short clips it names:

app/Modules/BoostShop/market/market.json
{
    "games": ["cs2", "rust"],
    "locales": {
        "ru": {
            "name": "Бусты",
            "summary": "Игроки покупают буст опыта на сервере за баланс сайта.",
            "about": "Буст включается сразу после покупки и сам выключается по окончании срока.",
            "features": [
                { "title": "Покупка в один клик", "text": "Срок и сервер выбираются прямо на странице буста.", "media": "buy.webp" }
            ]
        },
        "en": {
            "name": "Boosts",
            "summary": "Players buy an XP boost on a server with their site balance.",
            "about": "A boost starts right after the purchase and ends on its own.",
            "features": [
                { "title": "One-click purchase", "text": "The term and the server are picked on the boost page.", "media": "buy.webp" }
            ]
        }
    }
}

The account and the catalogue site show the page in Russian, Ukrainian and English, so ship all three: uk repeats ru with the same files. summary is one line of up to 160 characters, about up to 1500, and there are at most 12 features. Images are png, jpg or webp up to 5 MB at 16:10; clips are mp4 or webm up to 30 MB with a still image in poster. The author name you gave when creating the resource is shown to everyone next to the title.

Reference

module.json keyWhat the engine checks
namerequired. The module key when there is no key. The interface title comes from the <key>.title, <key>.name or <key>.menu translation, otherwise from name
keyoptional. The key for the folder and namespace, ^[A-Za-z][A-Za-z0-9_]*$
versionrequired for a ZIP. Updater steps depend on it
dependencies.fluterequired. A Composer constraint (^2.0, >=2.1); a bare version reads as >=
dependencies.phpthe site's PHP version, incompatible_version on a mismatch
dependencies.modules, extensions, composer, themedependencies, dependency_missing when one is missing

Read the module's licence from the core: app(ModuleEntitlements::class)->for('example') returns a ModuleEntitlement with the licensed, until, features, limits and stale fields and the has(string $feature): bool and limit(string $key): ?int methods. Short forms: has('example', 'export'), limit('example', 'servers'). The module stores no licence key and never calls the platform itself; the FluteAi module works this way.

Common mistakes

The admin shows these messages when a ZIP is uploaded.

What you seeCause
"This module was written for Flute 1.x and needs adaptation for Flute 2.0, so it wasn't installed."no dependencies.flute, or the constraint lets 1.x in, for example >=1.0
"module.json is invalid: it needs name and version, and the key may only use Latin letters, digits and _."no version, or a space, hyphen or Cyrillic in name
"There is no module.json or theme.json in the archive, so it is neither a Flute module nor a theme."module.json is deeper than one folder
"The archive is damaged or cannot be opened. Download it again."not a ZIP, more than 100 MB extracted, or looks like a zip bomb
"This module needs :requirement or newer; you have :current. Upgrade and try again."dependencies.php or dependencies.flute does not fit the site
"A dependency is missing: :detail Install and enable it, then try again."a module from dependencies.modules is not installed or disabled
"Module ":name" is already installed. You can update it from this archive."a module with this key exists. Never change the key, or the update becomes a second module

See also

On this page