Skip to main content
This guide installs Flex Forms into your Laravel / Filament app with Composer. Unlocking Studio is a separate step — Activate license — after you have the Public API key from the portal. Flex Forms installation — Composer, License Portal, and panel plugin

After purchase: Lemon key vs portal keys (read this first)

Checkout happens on Lemon Squeezy. Lemon emails you a Lemon license key (also listed under My Orders). That Lemon key is never pasted into Filament and never used as a Composer password. What you do instead:
  1. Open the License Portal.
  2. Register with:
    • your email (same as Lemon checkout when possible),
    • a password for the portal,
    • your Lemon Squeezy license key.
  3. After registration, the portal generates two credentials for you:
    • Composer token (cmp_…) — only for composer config --auth / CI, so you can download the package.
    • Public API key (pk_forms_…) — only for Filament (Global Settings → License → License public key), so Studio unlocks on registered domains.
If you paste the Lemon Squeezy key into License public key, Studio will not activate. Re-copy Your Public API Key (pk_forms_…) from the portal instead.
Full portal reference: The License Portal.

Step-by-step installation

1. Buy and register on the License Portal

  1. Purchase from the Flex Forms store.
  2. Copy your Lemon Squeezy license key from the receipt email or My Orders.
  3. Go to license.bjanczak.com/flex-forms/panel.
  4. Create an account: email + password + paste the Lemon license key when asked.
  5. After signup, the portal shows your generated Composer token (cmp_…) and Public API key (pk_forms_…). Keep both; you will use cmp_… on this page and pk_forms_… in Activate license.
Lemon may show the purchase as inactive until you register the first domain in the portal. That means “valid purchase, zero domains activated,” not a failed payment.

2. Copy your Composer token

  1. In the portal, open Install via Composer.
  2. Copy the token starting with cmp_ (and the ready-made commands if shown).
  3. Store it in a password manager. You need it on every machine that runs composer install / composer update for this project (laptop, CI, Forge, etc.).

3. Point Composer at the private registry

From your Laravel project root:
Or add this to composer.json under "repositories":
The key name flex-forms is only a local label. You can keep other Composer repositories alongside it.

4. Authenticate to the registry

Username is always the literal word token (not your email):
Replace YOUR_COMPOSER_TOKEN with the full cmp_… value from the portal. This creates or updates auth.json. Add auth.json to .gitignore. Committing it publishes your download password. A wrong token typically shows as 401 Unauthorized when resolving janczakb/filament-flex-forms.

5. Require the package

Exact package name: janczakb/filament-flex-forms. You do not need to run npm install inside the package for normal use — Studio, fill, and embed assets ship prebuilt.

6. Publish assets and run migrations

What this does:
  1. Publishes Flex Forms assets (filament-flex-forms-assets)
  2. Optionally publishes translations with --translations
  3. Runs php artisan filament:assets
  4. Asks to run php artisan migrate (or runs them when non-interactive / --force)
Useful variants:
Or migrate alone:
Optional config publish:
Localization: Localization & RTL.

7. Register the plugin on your Filament panel

Open your panel provider (often app/Providers/Filament/AdminPanelProvider.php):
Reload the panel and confirm a Forms (or your custom label) entry appears. If you use multiple Filament panels, register the plugin on each panel that should host Studio. License checks use the hostname, not the panel id — register every hostname in the portal. Permissions for teams / Spatie: Studio permissions. Optional fail-closed: FLEX_FORMS_PERMISSIONS_STRICT=true.

8. Activate the license (required)

Composer install does not put pk_forms_… into Filament for you.
  1. Register every hostname you use in the License Portal.
  2. Paste the portal-generated Public API key (pk_forms_…) into Global Settings → License → License public key.
Do not paste the Lemon Squeezy key into that field. Full UI path and troubleshooting: Activate license. First visit without a key often opens the Setup Wizard.

Prerequisites

Confirm these before or while you install.

Which key goes where

Never put cmp_… or the Lemon key into Global Settings. Never commit auth.json. If a Composer token leaks, regenerate it in the portal — the old token is revoked immediately.

Production checklist after install

Run a queue worker in production. Integrations, some Insights work, and mail jobs expect the queue to process. Local QUEUE_CONNECTION=sync is acceptable for a first smoke test only.
Ensure php artisan schedule:run is cron’d every minute (Forge / Cloud / Kubernetes CronJob). Flex Forms relies on scheduled maintenance for Insights and related tasks.
Behind Cloudflare, AWS ALB, or nginx, configure Laravel Trusted Proxies so Request::ip() is the real visitor. Flex Forms uses IP for submission metadata, rate limits, and optional duplicate-by-IP. Misconfigured proxies make every visitor look like 10.x / 127.0.0.1.
After changing .env or published config: php artisan optimize:clear (or your usual deploy cache rebuild).

CI / CD (GitHub Actions, GitLab, Forge)

Never commit auth.json. Store cmp_… as a secret, for example FLEX_FORMS_COMPOSER_TOKEN. Example GitHub Actions fragment:
On Laravel Forge / Envoyer-style hosts, set the same auth on the server once (or inject during deploy) so composer install on release succeeds. When you regenerate a Composer token in the portal, update every secret and every server auth.json in the same change window.

Upgrading

Already installed? When a new Flex Forms release ships, run composer update janczakb/filament-flex-forms, migrate, and php artisan flex-forms:upgrade. License keys do not need a database upgrade. Full checklist, CI notes, dry-run, and troubleshooting: Upgrading.

Troubleshooting

The cmp_… token is missing, mistyped, or revoked. Re-copy the auth command from Install via Composer, run it again, and update CI secrets. Confirm the username is literally token.
Confirm the repository URL is https://composer.bjanczak.com and that composer require janczakb/filament-flex-forms uses that exact package name. Run composer clear-cache and retry.
Install succeeded; activation did not. Paste pk_forms_… and register the hostname — Activate license.
Dump autoload (composer dump-autoload), confirm the require succeeded, and clear opcache if you use it in production.
Ensure the DB user can create tables. Re-run php artisan migrate and read the failing migration name. Do not skip migrations permanently — Studio depends on them.
janczakb/filament-flex-forms

Last modified on September 7, 2026