These instructions help AI coding agents work productively in this repository.
- Prefer small, focused changes and preserve existing module boundaries.
- Do not move features between modules unless explicitly requested.
- Link to canonical docs in this repo instead of duplicating long guidance.
- Install project dependencies:
box recipe workbench/setup.boxr
- Start local server (default is port
8589):box server start
- Build frontend assets after clone and after asset changes:
npm run build-dev
- Format code:
box run-script formatbox run-script format:checkbox run-script format:watch
- Test runners:
http://127.0.0.1:8589/tests/runner.cfmhttp://127.0.0.1:8589/tests/runner-api.cfm
- Migrations:
box run-script contentbox:migrate:create name=YourMigrationbox run-script contentbox:migratebox run-script contentbox:migrate:upbox run-script contentbox:migrate:downbox run-script contentbox:migrate:fresh
- Frontend builds:
npm run devnpm run watchnpm run prodnpm run build-devnpm run build-prod
- ContentBox uses CFML ORM backed by Hibernate (
this.ormEnabled = true) configured inApplication.cfc. - Keep ORM settings and entity locations compatible with existing mappings in
Application.cfc. - Do not bypass migration scripts with ad hoc schema changes; use CommandBox migrations for DB evolution.
- When schema behavior changes, update migrations and tests together.
- Keep changes compatible with the 3 supported engines:
- Lucee
- Adobe ColdFusion
- BoxLang
- Use the existing server config files in repo root (
server-lucee@*.json,server-adobe@*.json,server-boxlang@*.json) as the compatibility reference.
- Root app (
/) is the host ColdBox application and local development shell. modules/contentbox/is the core ContentBox engine and should remain self-contained.modules_app/contentbox-custom/is the customization layer for user-owned content/themes/widgets/modules.modules/contentbox-installer/is installation workflow code.
When implementing features/fixes:
- Keep core logic in
modules/contentbox/unless it is customization-specific. - Keep user/theme customizations in
modules_app/contentbox-custom/. - Avoid editing generated asset output directories under
includes/.
- Target Lucee 5+ and Adobe ColdFusion 2018+ compatibility.
- Follow project formatting in
/.cfformat.json. - Run formatter before finalizing changes.
- Maintain DocBox-style CFC documentation for new public functions/components.
- Add or update tests with all behavioral changes.
- Prefer existing test patterns in:
tests/resources/BaseTest.cfctests/resources/BaseApiTest.cfc
- Keep tests scoped to impacted area (
tests/specs/contentbox-web/ortests/specs/contentbox-api/). - Follow the current test layout:
- API specs in
tests/specs/contentbox-api/ - Web/unit/integration specs in
tests/specs/contentbox-web/ - Shared fixtures/seeds/sql in
tests/resources/
- API specs in
- If DB-backed tests are involved, verify test DB prerequisites from
tests/readme.mdand engine-specific DB scripts intests/resources/sql/.
- Asset outputs in
modules/contentbox/modules/contentbox-admin/includes/and themeincludes/are generated and can be overwritten by builds. - After asset/source changes, rebuild assets instead of manually editing compiled output.
- If tests require DB-backed integration behavior, verify local datasource prerequisites from test docs.
- Target PRs to
development, notmaster. - Include tests for fixes/features.
- Follow the repository PR template.
- Contributor workflow:
CONTRIBUTING.md - Project overview/setup:
readme.md - Test setup details:
tests/readme.md - UI/asset workflow:
workbench/Developer.md - PR template:
.github/PULL_REQUEST_TEMPLATE.md
- Prefer
rgfor file/text search. - Read nearby code before editing to preserve local conventions.
- Avoid broad refactors unless explicitly requested.
- If command/tooling assumptions are unclear, verify in
box.jsonandpackage.jsonfirst.