Development
This guide provides basic information for software development using the checkout starter kit.
Prerequisites
Before you begin, make sure you've completed the initial setup of the starter kit.
See Initial configuration for more details.
Running locally
The starter kit consists of two main parts, as defined in app.config.yaml
:
application
: The main app builder actions and event handlers of the starter kit.commerce/backend-ui/1
: UI-specific components and related actions for the Adobe Commerce Admin UI.
Note that only one extension can be run locally or deployed to a given runtime environment at a time.
To run the project locally, use the following commands:
Copied to your clipboard# Run the project locallyaio app dev -e applicationaio app dev -e commerce/backend-ui/1# Run the project locally but deploy to the runtime environmentaio app run -e applicationaio app run -e commerce/backend-ui/1
See aio app dev vs. aio app run to understand the differences between the two modes.
Deploy the application
To deploy the app using the Adobe I/O CLI, use the following commands:
Copied to your clipboardaio app deploy -e application --force-deployaio app deploy -e commerce/backend-ui/1 --force-deploy
Undeploy the application
To remove the app and clean up all deployed resources from Adobe I/O Runtime and web resources, use the following commands:
Copied to your clipboardaio app undeploy
Linting and formatting
The starter kit uses Prettier and ESLint to enforce code style and formatting. The following commands are available for linting and formatting:
Fix linting
Copied to your clipboardnpm run lint:fixFix format
Copied to your clipboardnpm run format:fixFix both linting and format
Copied to your clipboardnpm run code:fix
Use the following links to configure formatting for your IDE:
Debugging
For debugging applications created with the starter kit, refer to the App Builder debugging documentation.
Testing
The testing framework is in Jest and execution is based on the aio
CLI.
Run unit tests for the UI and actions:
Copied to your clipboardaio app test
Run end-to-end tests:
Copied to your clipboardaio app test --e2e