This boilerplate code simplifies setting up and managing ArcXP IFX in an imperative way. It comes with standard commands to manage your integrations, deliver your code, and utilities for faster development.
You can start a new project by forking this repository directly. Alternatively, copy the code into a new repo and later add this boilerplate as a remote to stay in sync. To sync changes from the boilerplate, run:
git remote add boilerplate https://github.com/code-store-platform/arcxp-ifx-boilerplate.git
git fetch boilerplate
git merge boilerplate/main./integrations/– All integrations live here../packages/commands– Command implementations../packages/shared– Shared utilities (logger, ArcAPI, etc)../packages/tsconfig– Centralized TypeScript configs.
- Node.js 22.x or higher.
- pnpm 8.x.
- Run
pnpm installto install all dependencies. - Create
.env.sandboxfrom.env.exampleand fill in required values - Create
.npmrcby duplicating.npmrc.exampleand updating the necessary values.
-
Run:
pnpm ifx init
- Creates a new integration folder under
./integrations/. - Installs dependencies and provisions it in IFX.
- Creates a new integration folder under
-
Add event handlers:
- Implement handlers in
eventsHandlers/and export them ineventsHandlers.ts. - Wire them up in
eventsRouter.json.
- Implement handlers in
-
Deploy:
pnpm ifx deploy
-
Update IFX definition:
pnpm ifx provision
Example handler:
./integrations/hello/src/eventsHandlers/example.ts.
-
Commands default to the sandbox environment. Use
--env productionfor production. -
Integration commands require
--integration:pnpm ifx <command> --integration my-integration
Initialize a new integration.
Create or update the integration in IFX using ifx-definition.yml.
Build and deploy the integration bundle to IFX.
Build the integration and validate with the health handler.
Promote a deployed bundle to LIVE.
Delete an integration.
Show latest logs for integrations.
Show detailed integration information (bundles, subscriptions, secrets, etc).
List all custom events.
List all webhooks.
List all event subscriptions.
Create a custom event.
pnpm ifx create_event --name my_event --description "My custom event"The custom: prefix is added automatically if omitted.
Create a webhook for a custom event.
pnpm ifx create_webhook --event my_event --description "My webhook"Returns the webhook URL generated by Arc XP. Use this URL with a restricted IFX token to trigger the webhook.
Run the integration locally in watch mode.
- Default: random port.
- Override with
PORTenv.
Example request:
curl --location 'http://localhost:54265/' \
--header 'Content-Type: application/json' \
--data '{
"key": "story:create",
"body": { "id": "test" }
}'- Always specify
--env(sandboxorproduction) when needed. - Use
--integration <name>for all integration commands (required).
This CLI streamlines the workflow for managing ArcXP IFX integrations.