Developer Getting Started
Introductionβ
CargoXplorer is a low-code TMS platform where most customization is done without changing the platform source code. As a developer, you typically extend and modify the system using:
- π§© App Modules: UI screens, dialogs, routing, permissions, localization, client-side behavior (actions), and configuration surfaces.
- π Workflows: server-side automation, orchestration, validation gates (before-save), notifications, and integrations (webhooks, GraphQL tasks, utility tasks).
This page is a practical βdeveloper onrampβ that explains:
- What to change first (App Modules + Workflows)
- What requires platform source changes (new external libraries/frameworks, new primitives)
- How to structure your app repository and YAML
What you can implement with App Modules (typical)β
- UI screens and navigation
- New menu items, list/detail pages, dialogs, dashboards
- Custom routes and nested routes
- User interactions and UI behavior
- Buttons and action sequences (navigate, query, mutation, workflow execution)
- Conditional rendering, validation, and form behavior
- Security and user experience
- Permissions, role access to actions and routes
- Localization of labels, titles, and help text
- Configuration and data surfaces
- Organization-level configuration pages
- Default/reference data shipped with the module
Quick start procedure (repository-first)β
- Create a Git repository for your app (one app per repo).
- Add
app.yamlat the repository root (name, version, repository URL, etc.). - Create
modules/andworkflows/folders to separate UI from automation. - Add your first App Module in
modules/:- Define
module:metadata - Add a minimal
components:entry (screen) androutes:entry (navigation) - Add
permissions:to control access
- Define
- Add your first Workflow in
workflows/:- Define
workflow:metadata - Add at least one
activities:block with one step
- Define
- Commit and push changes so the platform can consume the updated YAML.
- Deploy/sync the app into your CargoXplorer environment using your organizationβs standard app delivery process.
- Iterate safely:
- Small commits
- One feature per module/workflow change where possible
- Use
fileNameand meaningful naming for traceability
π End-to-end reference for steps and structure: Building Apps
Who this guide is forβ
This guide targets technical developers who:
- Can read/write YAML
- Understand basic TMS concepts (entities, events, triggers, validations, integrations)
- Are comfortable with Git and repository-based delivery
Development model (what goes where)β
| Goal | Best mechanism | Why |
|---|---|---|
| Add/modify screens, dialogs, lists, forms, widgets | π§© App Modules | UI is declarative; changes are isolated and reviewable |
| Add button behaviors, validations, navigation, data fetch | π§© App Module Actions | Actions provide consistent patterns for UI-driven behavior |
| Add business processes (approval flows, automation, orchestration) | π Workflows | Centralized, event-driven, testable execution |
| Integrate external systems (REST endpoints, webhook-driven flows) | π Workflows (+ UI actions if needed) | Workflows can run async, handle retries/logging/auditing |
| Add new component types, new workflow task types, or new runtime capabilities | π οΈ Platform source changes | Requires new framework-level building blocks |
When source modification is requiredβ
Most work should stay in App Modules and Workflows. You usually need platform source changes when you must introduce new primitives, for example:
- External libraries/frameworks support
- Adding a brand-new UI framework component not supported by the existing component catalog
- Adding a new charting/mapping SDK integration that requires compiled/bundled frontend code
- New integration runtime capabilities
- Adding a new workflow task type (e.g., a specialized connector) that is not available as a built-in task
- Core behavior changes
- Modifying backend validation rules that must apply system-wide and cannot be expressed as a workflow βBeforeβ trigger
If youβre unsure, start with App Modules + Workflows and only escalate to source changes when you hit a hard limitation.
YAML Structureβ
CargoXplorer apps are delivered as a Git repository that contains an app manifest plus YAML files for modules and workflows.
Recommended repository layoutβ
my-app-repository/
βββ app.yaml
βββ README.md
βββ icon.png # optional
βββ modules/
β βββ my-feature-module.yaml
β βββ ...
βββ workflows/
βββ my-workflow.yaml
βββ ...
π For the canonical structure, see: Building Apps
App manifest (app.yaml) structureβ
app.yaml describes the app package metadata (name, version, repository, etc.).
name: "@cargox/my-app"
description: "My app extends CargoXplorer with custom screens and automation."
author: "My Company"
version: "1.0.0"
repository: "https://github.com/my-org/my-app.git"
icon: "icon.png" # optional
App Module YAML structure (high-level)β
App Modules are defined in YAML files under modules/. The typical top-level sections are:
module:
components:
configurations:
entities:
permissions:
routes:
defaultData:
π Deep dives:
- π App Modules overview
- π Components catalog
- π Routing
- π Permissions
- π Variables (UI expressions)
- π Actions reference
Workflow YAML structure (high-level)β
Workflow YAML files live under workflows/. A common structure looks like:
workflow:
inputs:
outputs:
variables:
triggers:
schedules:
activities:
events:
π Deep dives:
- π Workflows overview
- π Workflow YAML (manifest)
- π Triggers
- π Workflow variables
- π Workflow tasks
- π Webhook workflows
Attribute Descriptionβ
This section summarizes the most-used attributes you will touch when building apps. It does not replace the full reference pages; instead it helps you quickly pick the right file/section.
App manifest (app.yaml)β
| Attribute | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique app package name (recommended: scoped name like @cargox/...) |
description | string | Yes | Human-readable description of the app |
author | string | Yes | Organization or individual maintaining the app |
version | string | Yes | App version (SemVer recommended) |
repository | string | Yes | Git repository URL used to source the app |
icon | string | No | Relative file path to an icon (e.g., icon.png) |
π Full guide: Building Apps
App module definition (module:)β
| Attribute | Type | Required | Description |
|---|---|---|---|
appModuleId | string (UUID) | Yes | Unique ID of the module |
name | string | Yes | Internal module name (used in identifiers) |
displayName | object | No | Localized display names (e.g., en-US) |
description | object | No | Localized descriptions |
application | string | Yes | Target application area (e.g., TMS) |
fileName | string | No | Repo-relative path for UI linking (defaults to modules/{name}-module.yaml) |
π Full reference: App Modules
Workflow definition (workflow:)β
| Attribute | Type | Required | Description |
|---|---|---|---|
workflowId | string (UUID) | Yes | Unique workflow identifier |
name | string | Yes | Workflow display name |
description | string | No | What the workflow does |
isActive | boolean | No | Enable/disable the workflow (default true) |
workflowType | string | No | Workflow type (e.g., Webhook for webhook workflows) |
executionMode | string | No | Sync or Async (default Async) |
logLevel | string | No | Logging level (use Debug during development) |
enableTransaction | boolean | No | Execute within a transaction (default true) |
runAs | string | No | User context (default is current user; use system when appropriate) |
fileName | string | No | Repo-relative path for UI linking (defaults to workflows/{id}.yaml) |
π Full reference: Workflow YAML
Examplesβ
This example shows a minimal end-to-end flow:
- A module adds a screen with a button
- The button triggers a workflow
- The workflow performs server-side work (example uses an Action Event for visibility/auditing)
Example 1: Minimal app manifestβ
app.yaml:
name: "@cargox/dev-getting-started-example"
description: "Example app: UI button triggers a workflow."
author: "CargoXplorer Docs"
version: "0.1.0"
repository: "https://github.com/example/dev-getting-started-example.git"
Example 2: Minimal module (screen + button)β
modules/dev-getting-started-module.yaml:
module:
appModuleId: "2c4f77c5-5a57-4c1f-9f55-1a5e1c2a0f11"
name: "DevGettingStarted"
application: "TMS"
displayName:
en-US: "Dev Getting Started"
fileName: "modules/dev-getting-started-module.yaml"
permissions:
- name: "DevGettingStarted/Run"
displayName:
en-US: "Run Dev Getting Started Workflow"
roles:
- "Administrator"
components:
- name: "DevGettingStarted/Screen"
displayName:
en-US: "Dev Getting Started Screen"
layout:
component: "layout"
children:
- component: "text"
props:
value:
en-US: "This screen is provided by an App Module."
- component: "button"
permission: "DevGettingStarted/Run"
props:
label:
en-US: "Run workflow"
options:
variant: "primary"
size: "md"
onClick:
- workflow:
workflowId: "6ee9fd9f-0fa1-4f1d-b5cd-09f75c79b9c4"
inputs:
source: "ui-button"
routes:
- name: "DevGettingStarted/Home"
path: "dev-getting-started"
component: "DevGettingStarted/Screen"
props:
title:
en-US: "Developer Getting Started"
π References used in this example:
- π Button component
- π Actions reference (workflow action)
- π Routing
Example 3: Minimal workflow (creates an Action Event)β
workflows/dev-getting-started-workflow.yaml:
workflow:
workflowId: "6ee9fd9f-0fa1-4f1d-b5cd-09f75c79b9c4"
name: "Dev / Getting Started / Example"
description: "Example workflow triggered from an App Module button."
isActive: true
executionMode: "Async"
logLevel: "Info"
fileName: "workflows/dev-getting-started-workflow.yaml"
inputs:
- name: "source"
type: "text"
props:
required: true
displayName:
en-US: "Trigger Source"
activities:
- name: "record"
description: "Create an action event for traceability."
steps:
- task: "ActionEvent/Create@1"
name: "createEvent"
inputs:
action:
eventName: "dev.gettingStarted.run"
eventData:
source: "{{ source }}"
workflowId: "{{ workflow.workflowId }}"
workflowName: "{{ workflow.name }}"
π References used in this example:
- π Workflow YAML
- π Workflow variables
- π ActionEvent entity
Best Practicesβ
-
Start with the platform extension points
- Use π§© App Modules for UI, routing, permissions, and client-side actions.
- Use π Workflows for server-side business logic, validations, and integrations.
-
Keep repositories organized
- Put all module YAML under
modules/and all workflows underworkflows/. - Use meaningful file names and set
fileNameso the UI can link to your repo paths.
- Put all module YAML under
-
Prefer declarative composition over source changes
- If you can implement something with existing components/actions/tasks, do that first.
- Escalate to platform code changes only when you need a new primitive.
-
Design for observability
- During development, use
workflow.logLevel: "Debug"selectively. - Emit Action Events for important integration points and failures.
- During development, use
-
Use βBeforeβ triggers carefully
- βBeforeβ entity triggers are synchronous and can block persistence on error.
- Use them for validation/gates; use βAfterβ for notifications and downstream integrations.
- π Triggers
-
Be explicit with permissions
- Add module permissions for screens/actions and assign them to roles.
- Keep permission names consistent and predictable.
Related Topicsβ
- π Platform Overview
- π Building Apps
- π App Modules
- π App Module Components
- π Actions
- π Workflows Overview
- π Workflow YAML
- π Workflow Variables
- π Workflow Tasks
- π GraphQL API Overview
- π API Credentials
- π Security