The Problem
Developers who need to build Apache Camel integration routes spend most of their time writing XML/Java DSL, wiring containers, and managing deployment descriptors. The lack of a visual, low‑code front‑end makes onboarding slow and error‑prone, especially when teams must switch between IDEs, Docker, and Kubernetes.
What This Does
apache/camel-karavan supplies a web UI (karavan-app) and a VS Code extension (karavan-vscode) that let users draw routes, configure components, and generate the underlying Camel DSL in YAML or Java. The core model and API live in karavan-core, which defines the canonical CamelDefinition and IntegrationDefinition types used by both the UI and the generator (karavan-generator). Build and deployment helpers are in karavan-app/src/main/docker and the Helm/Kubernetes manifests under docs/install.
Key files:
karavan-app/src/main/webui/src/index.tsx– boots the React SPA.karavan-core/src/core/model/CamelDefinition.ts– the 3 682‑line type graph that drives the designer.karavan-generator/src/main/java/.../Generator.java(implicit from the Java sources) – converts the model to runnable Camel projects.
How It Is Wired
Execution starts at karavan-app/src/main/webui/src/index.tsx, which mounts the React root and loads App.tsx. App.tsx creates the DesignerStore (karavan-app/src/main/webui/src/karavan/features/integration/designer/DesignerStore.ts). This store is the most‑connected module (imports 32, exported to 1) and holds the in‑memory CamelDefinition tree.
When a user adds a component, the UI dispatches actions that mutate the CamelDefinition model. The model is persisted via karavan-core/src/core/api/CamelDefinitionYaml.ts, which serialises to YAML for storage in the Git repo (the source‑of‑truth). The same module also deserialises on load, but it contains an empty catch {} block (high‑severity resilience issue).
The VS Code extension mirrors this flow: its webview entry point karavan-vscode/webview/index.tsx creates a parallel DesignerStore (karavan-vscode/webview/integration-designer/DesignerStore). Both stores rely on the same core types, creating a circular import chain among CamelDefinition.ts, IntegrationDefinition.ts, and CamelDefinitionYaml.ts (18 import‑cycle members). The hub module karavan-core/src/core/model/CamelDefinition.ts is referenced by 33 other modules, giving it the largest blast radius for any change.
After a design is saved, karavan-generator reads the YAML files (via CamelDefinitionYaml) and emits a Maven/Quarkus project that can be built with the Dockerfile at karavan-app/src/main/docker/Dockerfile. The generated image is then pushed to the registry defined in docs/install/karavan-docker/docker-compose.yaml or the Helm chart under docs/install/karavan-helm.
How To Use It
# clone the repo
git clone https://github.com/moses-y/camel-karavan
cd camel-karavan
# build the web UI (npm is the package manager)
cd karavan-app/src/main/webui
npm ci # lockfile install per CI recommendation
npm run build # Vite produces a static bundle used by the Spring Boot app
# start the Spring Boot container (Dockerfile provided)
cd ../../..
docker compose -f docs/install/karavan-docker/docker-compose.yaml up -d
The UI is reachable at http://localhost:8080. To edit locally, install the VS Code extension from the marketplace and open a folder containing a Karavan integration project (YAML files under src/main/resources/integrations). No additional environment variables are required beyond the Docker compose defaults.
Real‑World Use
A fintech team can model a payment‑routing flow in the designer, export the YAML, and let karavan-generator produce a Quarkus‑based Camel microservice. The generated Docker image is then deployed to the company’s OpenShift cluster via the Helm chart in docs/install/karavan-helm. Because the source repository holds the YAML, version control and CI/CD can treat the integration as code.
Code Health & Issues
- High – Pin GitHub Actions –
.github/workflows/*.ymluses tag versions (@v3,@v5). Replace with commit SHAs. - High – CI never runs tests – Workflows lack a test step despite 93 test files. Add a step invoking
npm testor Maven test. - Medium – Least‑privilege GITHUB_TOKEN –
.github/workflows/app.ymldeclares no permissions. Addpermissions: contents: read. - Medium – Enable Dependabot – No
.github/dependabot.ymldespite three manifest files. Add one covering npm, Maven, and GitHub Actions. - Medium – Use lockfile in CI – Workflows run
npm install; switch tonpm ci. - Medium – Dependency‑vulnerability gate – No scan step. Add
dependency-review-actionorosv-scanner. - Medium – Checkout persist‑credentials –
vscode.ymlkeeps the token; setpersist-credentials: false. - Low – Job timeout – Workflows lack
timeout-minutes. Define a reasonable limit (e.g., 30). - Low – Repository conventions – Missing
.editorconfig,.gitattributes, formatter config. Add them to enforce consistency.
Additional static findings (381 total) include:
- Oversized files –
karavan-core/src/core/model/CamelDefinition.ts(3 682 lines) and related API files; split by responsibility. - Import cycles – Core model and API files form 18 circular dependencies; refactor shared types into a separate module.
- Deep nesting & high branching – Several API files exceed six indentation levels and contain >150 branch points; simplify with guard clauses or strategy tables.
- Hub module –
CamelDefinition.tsis depended on by 33 modules; keep it stable and extract volatile logic.
The Bottom Line
camel-karavan delivers a functional low‑code UI and VS Code tooling for Apache Camel, backed by a coherent core model and containerised build pipeline. The codebase works but suffers from large, tightly coupled files, import cycles, and several CI hygiene gaps that should be addressed before extending or deploying in production. Teams comfortable with Java, Maven, and React can adopt it quickly, provided they allocate effort to refactor the core model and tighten the CI configuration.