Skip to content

fix(build): make wheels-starter-app installable and bootable from ForgeBox - #3199

Merged
bpamiri merged 1 commit into
developfrom
peter/forgebox-starter-app-deps
Jun 13, 2026
Merged

fix(build): make wheels-starter-app installable and bootable from ForgeBox#3199
bpamiri merged 1 commit into
developfrom
peter/forgebox-starter-app-deps

Conversation

@bpamiri

@bpamiri bpamiri commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

The published wheels-starter-app ForgeBox package was unusable end-to-end:

(a) box install wheels-starter-app FAILED. box.json declared a dependency on slug wheels-authenticateThis, which does not exist on ForgeBox, aborting the entire install:

× | Installing package [forgebox:wheels-authenticateThis]
ERROR  Error getting ForgeBox entry [wheels-authenticateThis]
The entry slug sent is invalid or does not exist

The authenticateThis() mechanism the app actually uses (app/models/User.cfc:34) is supplied by the plugin already vendored at plugins/authenticateThis/. The ForgeBox dependency was redundant and broken.

(b) Even when installed, the app booted HTTP 500 key [DB_CLASS] doesn't exist at config/app.cfm:14 — the datasource read this.env.DB_CLASS, but no .env ships or is scaffolded (only .env.example), so this.env was an empty struct.

Both reproduced in CommandBox docker before fixing (verify-first).

Fix

  • box.json — drop the bogus wheels-authenticateThis dependency + installPath. Keep wheels-core so the framework still lands in vendor/wheels/. box install now succeeds (wheels-core only); the auth plugin is already bundled.
  • config/app.cfm — replace the .env-driven MySQL datasource with a zero-config H2 embedded database (org.h2.Driver, bundled with Lucee — no extra JDBC driver). MODE=MySQL keeps MySQL-compatible SQL. Adds a starterApp_test datasource for the app test suite.
  • server.json — declare the H2 Lucee extension in an env block so box server start auto-installs it. No manual LUCEE_EXTENSIONS or .env needed.
  • db/h2/.keep + .gitignore — ship the H2 data directory; ignore the runtime .db files.
  • .env.example / README.md.env is now optional and documented as such; server-based-DB instructions (incl. the original MySQL example) preserved in comments. README Quick Start rewritten to the real flow.

Note: wheels-core ships the SQLite adapter but not the SQLite JDBC driver — the driver only exists on the Wheels CLI's bundled Lucee, not on a stock box install / CommandBox Lucee. H2 is the only embedded engine that loads zero-config on stock Lucee (via the bundled extension), so it is the correct default for the ForgeBox/CommandBox path.

Verification (CommandBox docker, ortussolutions/commandbox:latest, against prepare-starterApp.sh build output)

  1. box installSUCCEEDS (only wheels-core; no slug error)
  2. box server start → boots; H2 extension auto-installs; datasource loads (/wheels/cli ping returns "success":true, no cannot load class, no DB_CLASS error)
  3. wheels migrate latest → creates all tables + seeds default roles/users/settings/permissions
  4. GET / after fresh app-scope restart → HTTP 200, renders <title>Example App</title> (seeded general_sitename) and the navbar/login link

Fixes #3181

🤖 Generated with Claude Code

…geBox

The published ForgeBox starter app was unusable end-to-end:

(a) `box install wheels-starter-app` FAILED. box.json declared a dependency
    on slug "wheels-authenticateThis" which does not exist on ForgeBox
    ("entry slug invalid or does not exist"), aborting the whole install.
    The authenticateThis() mechanism the app uses is the plugin already
    vendored under plugins/authenticateThis/ — the ForgeBox dependency was
    redundant. Drop the bogus dependency + installPath; keep wheels-core so
    the framework still lands in vendor/wheels/.

(b) Even when installed, the app booted HTTP 500 "key [DB_CLASS] doesn't
    exist" at config/app.cfm:14 — the datasource read this.env.DB_CLASS but
    no .env shipped or scaffolded (only .env.example). Replace the
    env-driven MySQL datasource with a zero-config H2 embedded database
    (org.h2.Driver, bundled with Lucee). The H2 Lucee extension is declared
    in server.json so `box server start` auto-installs it — no manual
    LUCEE_EXTENSIONS or .env needed. Add a starterApp_test datasource for the
    app test suite and a db/h2/ data directory.

.env is now optional and documented as such (server-based DB instructions
preserved in .env.example comments + README). README Quick Start rewritten
to the real flow: box install -> box server start -> wheels migrate latest.

Verified in CommandBox docker (ortussolutions/commandbox:latest) against the
prepare-starterApp.sh build output: box install succeeds (wheels-core only),
the server boots and the H2 datasource loads, `migrate latest` creates the
schema + seeds, and GET / returns HTTP 200 with the seeded site title.

Fixes #3181

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <petera@pai.com>
@bpamiri
bpamiri enabled auto-merge (squash) June 13, 2026 03:46
@github-actions github-actions Bot added docs dependencies Pull requests that update a dependency file labels Jun 13, 2026
@bpamiri
bpamiri merged commit 66c2ce2 into develop Jun 13, 2026
6 checks passed
@bpamiri
bpamiri deleted the peter/forgebox-starter-app-deps branch June 13, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

box install wheels-starter-app is broken: declared dependency wheels-authenticateThis does not exist on ForgeBox

1 participant