Scaffolding

Scaffold and deploy revenexx Apps and Blokkli themes from the CLI — create app, create theme, create site, the apps codegen, and one-command deploy, with the validation rules and the capabilities workflow explained.

The create and deploy command groups turn an empty directory into a working revenexx App or Blokkli theme and ship it to the platform. create stamps the full contract — manifest, schema, capabilities, tests, a typed data client — so a fresh app is npm test-green out of the box, and deploy runs the upload → build → publish → install pipeline.

These commands come from a CLI plugin, so they are present when the CLI is built with that plugin. They replace the old @revenexx/app-sdk-cli package — everything that tool did (capability and client codegen) now lives in revenexx apps generate and revenexx apps capabilities. See the Create and Deploy command references for the exhaustive flag lists.

Create an app

Scaffold an app
revenexx create app locations --entity locations

create app writes the whole platform-app contract and runs the codegen in-process. What lands on disk:

FileWhat it is
manifest.jsonApp identity, permissions, events (capabilities live next door)
manifest.capabilities.jsonGenerated capability register — never edit by hand
schema.jsonEntity definitions → platform tables
billing.jsonMarketplace listing + pricing
cockpit.jsonAdmin UI: navigation + list views
package.jsonOne dependency: @revenexx/app-sdk
src/main.jsThe function entrypoint
src/*The generated, typed data client (never hand-edit)
scripts/capabilities.jsRegenerates the capability register from schema.json
test/<name>.test.jsnode --test suite against an in-memory store
README.md, .gitignoreDocs and ignores

Pass --entity once per entity, or comma-separate them (--entity products,prices). Other flags set the marketplace metadata: --title, --description, --vendor, and --dir to scaffold somewhere other than the current directory.

Then:

Verify locally
cd locations
npm install && npm test

Interactive vs non-interactive

Run create app <name> with no other flags and the CLI prompts for the details it needs. For CI or repeatable setup, make it non-interactive:

  • -y, --yes — accept every default and never prompt.
  • --json — emit a machine-readable result (also silences prompts).
Non-interactive
revenexx create app locations --entity locations --yes

Validation rules

Scaffolding fails fast rather than stamp something the platform will reject:

  • App name^[a-z][a-z0-9-]*$ (lowercase, digits, dashes; starts with a letter).
  • Entity name^[a-z][a-z0-9_]*$ (lowercase snake_case; plural by convention).
  • Event name — two dot-separated segments, ^[a-z][a-z0-9_]*\.[a-z][a-z0-9_]*$.
  • Reserved words — names that collide with SQL/JS/PHP/TS keywords (public, order, user, select, table, function, …) are refused for both apps and entities.
  • Summaries — capped at 255 characters.
  • Target directory — must not already exist with contents; a non-empty target aborts the scaffold.

The capabilities workflow

Three commands keep an app's generated artifacts in step with its schema.json, and all three are idempotent — re-running them on an unchanged schema produces no diff:

  1. scripts/capabilities.js (npm run capabilities) — the script the scaffold stamps into the app. It regenerates manifest.capabilities.json from schema.json and strips the capability register out of manifest.json.
  2. revenexx apps capabilities — the same capability codegen, from the CLI. It prints a dry run by default; --write updates manifest.capabilities.json and strips the register from manifest.json exactly as the script does.
  3. revenexx apps generate — regenerates the typed data client under src/ from schema.json + manifest.json.

Because the scaffolded script and apps capabilities emit identical output, running one after a fresh create app is a no-op. The loop after any schema change:

After editing schema.json
npm run capabilities        # or: revenexx apps capabilities --write
revenexx apps generate      # refresh the typed client
npm test

apps capabilities

Capabilities
revenexx apps capabilities              # dry-run: print what would be generated
revenexx apps capabilities --write      # write manifest.capabilities.json
revenexx apps capabilities --no-prefix  # plain entity shape, not the app contract

By default capabilities follow the platform app contract — {app}.{entity}.{op} operations over /{app}/{entity} routes, with pagination and a detailed-page envelope. --no-prefix restores the plain entity shape (the original app-sdk-cli output). --cap-version sets the capability contract version.

apps generate

Generate the client
revenexx apps generate

Reads schema.json + manifest.json and writes the typed data client into src/ (override with --schema, --manifest, --out). It targets JavaScript and PHP; --runtime, --namespace, --vendor, and --app override the emitted module and identity.

Create a theme

Scaffold a theme
revenexx create theme storefront

create theme stamps the Blokkli theme contract — theme.json + billing.json plus a minimal Nuxt SSR storefront with production defaults, a .env.example listing credential names only (never values), and an executable deploy.sh. The same --title, --description, --vendor, --dir, and --yes flags apply.

Create a site

Create a site
revenexx create site my-site

create site creates a Site on the platform — the deployment target for themes and storefronts. Tune the build with --framework, --adapter, --build-runtime, --install-command, --build-command, and --output-directory.

Deploy

deploy registers (if new), uploads, builds, publishes, and installs — for apps, themes, and sites.

Deploy
revenexx deploy app          # from an app directory (needs manifest.json)
revenexx deploy theme        # from a theme directory (needs theme.json)
revenexx deploy site         # deploy any directory as a Site
  • deploy app registers a first-time app (--runtime, --specification), or targets an existing one with --function-id. --owner picks the tenant to install on; --no-publish / --no-install skip the marketplace steps.
  • deploy theme runs a site deploy plus automatic registry registration, then publish + install.
  • All three accept --timeout <seconds> for the platform build.
Was this page helpful?