Karyo

Implementing a Karyo warehouse

Karyo 2.1.1rendered at build time
On this page

This is the Core implementer playbook: the route from a clone to a proven, live inbound-to-outbound flow with manual shipping. Use synthetic data until installation, access boundaries and workflows have been verified. The extension reference at the end is separate from Core commissioning.

Core needs no real carrier connection, ERP connection, Loci configuration or agent enablement. The built-in manual carrier adapter supports the first shipping flow. Describe the workflows Karyo provides, not the size or maturity of the business using them.

Core commissioning schedule (estimate, not a measured commitment)

Allow 1-2 weeks of calendar time for one Facility with prepared master data and available staff. The synthetic proof may take 2-3 hours on a prepared host, including access commissioning; allow more time for unfamiliar infrastructure. These are planning estimates, not product performance claims.

When Implementer's work Evidence needed before continuing
Before day 1 Collect location labels or a location list, item numbers/names/units/weights, user identities and required actions. Prepare scanners that can open /m/; a printer endpoint is optional. Review data, access scope, the isolated rehearsal target and the production origin.
Day 1 morning Follow Install and establish access, with KARYO_DEMO off. Check deployment probes, then real desktop and floor sign-in. Smoke probes alone are insufficient.
Day 1 afternoon Sign in as System, create the first Company Administrator and Manager, and finish setup. Create the Business Unit, Facility, time zone and reviewed user grants. Confirm Manager and Viewer access, and that System is disabled and recorded on its user page.
Day 2 Follow Configure one synthetic warehouse. Create or load the reviewed items and print or prepare scannable labels. Verify receiving, storage, packing and shipping locations and item weights.
Day 3 Follow First inbound and outbound flow and Run browser acceptance. Keep evidence of the scanned unit load, dispatched manual shipment, reconciled shortage and Viewer rejection.
Days 4-5 Train staff on floor WORK and MENU, task claims, scans and recovery. Receive and ship with the old process as a comparison. Reconcile stock and shipments before ending the comparison.
Days 6-10 Move to Karyo as the execution record after accepting the proof and resolving applicable go-live blockers. Check the Tasks board's Needs location chip, Exceptions and a count of a frequently moved item each day.

Install with KARYO_PROFILE=core, the default. Core hides every Extended capability - Waves, Streaming, Monitors, Forecasting, the Slotting view, Simulation, Document templates, Integrations, the SPI catalogue, cartonization, cross-dock and 3PL billing - so the console and the floor app show only what this playbook uses. Nothing is greyed. When the site needs one Extended capability, a Company administrator switches it on in Admin > Capabilities, which previews what appears and asks for confirmation (engine capabilities).

After go-live, agent access remains optional and off by default. A Company administrator may enable it after the Core proof, without Extended or implementer attendance. See connecting an agent; enabling it grants no warehouse authority.

What you are installing

Karyo is one Quarkus modular monolith, PostgreSQL and nginx, with either optional managed Keycloak or a separately operated standards-based OIDC provider. The same backend serves the React desktop application and floor PWA at /m/. There is no message broker. The engine capabilities are part of the distribution; the installation's profile decides which of them show (see engine capabilities).

Included workflows cover products/layout, receiving and quality holds, inventory and putaway, delivery orders, discrete picking, packing/shipping, replenishment, counting, work allocation, goods-owner/user administration, reporting, webhooks and the document archive. Leave KARYO_DEMO off in a real warehouse.

Public *-api modules are Apache-2.0, including the engine seams. See engine capabilities for capabilities, prerequisites and current limits. Ordinary document generation and one-to-one pack-out are in the core modules. An interface or a menu entry cannot make an engine act; each engine acts once its own configuration allows it.

Build and schema closure

The supplied settings.gradle.kts owns the module graph; services/karyo-app/build.gradle.kts owns application assembly. Build that graph intact, including its supporting API modules and shared libraries, alongside both frontends. Optional demo/example sources do not imply activation.

The supplied schema is intentional support, not a list of installed engines. Keep all supplied migrations and their registered locations. Every build registers the engine migration bands too, so every installation creates their tables and leaves them empty until a capability acts on them. Order/fulfillment contracts carry wave, batch, streaming and consolidation columns; demo/reset paths also use supporting tables. A table whose name resembles a capability does not activate that capability.

Karyo installs into an empty database. Keep released migration checksums and versions unchanged on subsequent upgrades, including comments. Interleaved module version bands require out-of-order application. Do not repair, rebaseline or renumber a database to hide a mismatch.

Install and establish access

  1. Install a JDK 21 compiler, Node.js and Docker with Compose or Podman with podman-compose. Deploying Karyo owns the exact minimum versions and what each is needed for. Use the checked-in wrapper. Set JAVA_HOME to a JDK, not a JRE.
  2. Follow deploying Karyo for the supported environment file, exact public origin, HTTPS, selected identity profile, service secrets and bootstrap procedure. Set KARYO_SHIP_FROM_NAME, KARYO_SHIP_FROM_STREET, KARYO_SHIP_FROM_CITY, KARYO_SHIP_FROM_ZIP_CODE and KARYO_SHIP_FROM_COUNTRY to the physical shipper address. The ship-from settings are installation-wide, environment-only and restart-bound. Production validation refuses omitted fields and retained demo identifiers; never enable KARYO_DEMO to bypass it. Ordinary clone files must remain readable by bind-mounted containers; use umask 022 for source/build inputs. Keep the enclosing private evidence directory private and secret files mode 0600.
  3. No production profile contains a human Karyo principal. With managed Keycloak, a fresh installation creates System, the setup account: sign in as system with the one-time password the deploy script wrote to scripts/.karyo-setup-password, and set a new password. System's job is to create the first Company Administrator and Manager (and any Operators) and grant their profiles, then to confirm Setup is complete on the Users page, which disables it for good. An Administrator can grant only the profiles whose actions it holds, so once System is gone nobody can grant Manager or Operator who does not hold them: grant them now to everyone who needs them. It stops by itself after 14 days, is console only, and everything it does is recorded as "System (setup)" (provisioning the first administrator). Retire the Keycloak bootstrap credentials and delete the password file afterwards. With an external provider, create the first provider account, then use the identity principal upgrade to review and apply its exact issuer/subject binding, OPS affiliation and reviewed Company grant before first login.
  4. In managed mode, create later users through Karyo's provider-capable principal surface. An authentication-only provider has no runtime create/bind operation, so plan a reviewed enrollment procedure before commissioning. Keep provider administration and audit service identities separate; neither is a warehouse principal.
  5. Confirm desktop login/logout, a protected /inventory deep link and a protected /m/ deep link. Reaching /q/health/live is not an authentication or warehouse-workflow test. Before shipping real goods, dispatch a synthetic order using the manual carrier path and open its bill of lading. Verify all five Ship From fields, not only the customer's destination. If the startup log warns about a demo ship-from field, correct the environment and restart. Per-tenant ship-from overrides are not available; all goods owners and Facilities share this address.

Do not deploy over an existing stack without identifying its project, ports, storage and credentials. Do not reset shared volumes. An initialized database retains its credentials; changing the env file is not a database-password reset. Deploying Karyo owns rotation and realm maintenance.

For an isolated rehearsal on a shared runtime, select a separate deployment as deploying Karyo describes. Retain that target's exported values and matching environment file for every deploy/restart/test invocation below.

For local development and container-backed tests, use the developer onboarding guide. The build and deterministic suites can be exercised from a clean clone with:

./gradlew assemble test --no-build-cache
(cd frontend/web && npm ci && npx vitest run && npm run build)
(cd frontend/mobile && npm ci && npx vitest run && npm run build)
(cd tests/e2e && npm ci && npm run test:helpers)

Podman-backed tests need its user socket enabled, DOCKER_HOST pointing to that socket and TESTCONTAINERS_RYUK_DISABLED=true. Parallel worktrees need no extra setting: the test profile isolates each test JVM. Read the executed and skipped counts, not only Gradle's exit status. Live provider, printer, receiver and deliberately augmented-image checks are separate from the default test suite.

Configure one synthetic warehouse

Use a unique suffix for each rehearsal. Do not load these examples into an operating warehouse. Work as a user granted the required actions (for example the Manager standard profile) in the intended goods owner.

Order Configure Example and observable result
1 Goods owner and identities A synthetic owner and its operator/manager; verify exact provider bindings and reviewed grants. Verify sibling isolation through the scope boundary.
2 Units and products Choose an existing item unit; create GUIDE-WIDGET-<suffix>, with weight and packaging definitions appropriate to the exercise.
3 Location/unit-load types Create a shelf type and pallet/cart type with realistic dimensions and carrying limits.
4 Location Classes and locations Open /warehouse/setup, choose the Facility explicitly (there is no default; its Business Unit follows from it), and either type a label range or paste an existing location list. Create receiving, storage, pick, pack-staging and ship-staging locations with the correct Location Class usages and scannable names this way rather than one at a time.
5 Strategies Choose the receiving, storage and order strategy deliberately; inspect flags rather than assuming every strategy is identical.
6 Count setup Retain part of the received stock at storage for the shortage reconciliation. Configure fixed pick-face replenishment separately when the site uses it.

business_unit_id identifies the goods owner inside an instance, not a permission to impersonate that owner. Identity and tenancy owns the legacy and grant-backed scope rules. Validate ordinary ownership and shared system-master-data behavior before importing real stock. Do not use a privileged account to conceal missing operator permissions. The HTTP API surface and the API error contract cover JSON, errors and pagination.

Warehouse setup

/warehouse/setup is a server-owned Preview/Check/Create flow, reached from Home, Locations, the sidebar and the command palette. Preview and Check never write; Create writes every new location in one transaction, or none. A create carries a client-generated idempotency key, so retrying an interrupted create (a lost response, a page reload) replays the original outcome instead of creating the labels twice or reporting a 500 on the resulting name collision. Re-submitting a plan that names a label another Facility holds creates that label in this Facility, because a name is unique only within its Facility; overlapping an aisle the Facility already holds instead extends it in place - see ADR 0035 for exactly how a repeated or extended aisle is identified and how its stored run and position are preserved. Ranged letter names (e.g. the A in A-01) are capitalized and matched case-insensitively; a pasted standalone name is created exactly as typed. Floor arrangement (goods flow and dock doors) is a separate step from the same page and updates the existing warehouse drawing and 3D view; the drawing is schematic until locations carry a rack and field, never presented as measured.

First inbound and outbound flow

Use one Manager and one Viewer in one Business Unit and one Facility. Follow this connected route through the console and floor app, checking the expected state after each step. The minimum proof uses one scanned synthetic unit load. Lot, expiry, multi-Facility operations and real carriers need additional proof only when the site uses them.

The Core proof: receive a scanned unit load, put it away, create and release an order, pick, pack, manually manifest and dispatch, then reconcile a count shortage and verify a Viewer read and a Viewer dispatch rejection.

The Core proof includes shipping, a reconciled stock shortage and an authenticated permission rejection. Derived from the route steps below; source docs/diagrams/09-first-inbound-outbound-flow.mmd.

  1. Receive: create and release an ASN for ten units of the synthetic item. On the floor, choose MENU > 3 Receive and select the ASN. Scan the receiving dock (a location in a goods-in Location Class), select the line, scan the unit-load label, review ten units and confirm receiving. No console receipt or claim is needed. Confirm one received line, its stock quantity and its unit-load identity.
  2. Put away: claim the automatically generated PUTAWAY work. On the floor, scan the unit load and the suggested storage location, then complete the move. Confirm the completed task and the unit load's actual location. If no eligible destination exists, stop and inspect layout and strategy configuration; do not bypass a safety lock. Finish the receipt in the console workbench. Unheld INCOMING stock becomes ON_STOCK only when the receipt finishes.
  3. Order: create a delivery order for four of the ten unlocked units. Release it to allocate stock. Check reservations, zero shortage and availableAmount = amount - reservedAmount.
  4. Pick: release the delivery order to picking and claim its PICK work. On the floor, scan the storage location and item, then confirm four units onto the pick container. POST /api/v1/pick-orders returns an array, not a single object.
  5. Pack and ship: select the order under Packing > Ready to pack, then pack with a weight. In Shipments, manifest with carrier MANUAL, then dispatch. The built-in adapter uses supplied tracking or generates MAN-{shipmentNumber}; it contacts no carrier. Confirm SHIPPED shipment, FINISHED order, remaining six units at storage and attributed journal entries. Inspect the bill of lading and packing slip, subject to the document limitation below. Manifest alone is not dispatch. A downloaded label is not proof that a hardware printer received it.
  6. Reconcile a shortage: in Cycle Count > New count, start a blind cycle count for that storage location only. Claim COUNT work and scan location and item on the floor. Enter five units, submit, then review and Accept as the Manager. Confirm five units remaining, zero reservation, released stock/location locks and an attributed COUNTED journal entry. Do not use Full inventory for this single-location exercise.
  7. Reject unauthorized access: sign in as the Viewer. Verify an allowed inventory read and GET /api/v1/shipments succeed, then call POST /api/v1/shipments/{id}/dispatch for the dispatched shipment with that Viewer's bearer token and require 403, not 401. The Viewer reads fulfillment and holds no fulfillment.write; the console disables Dispatch for it, so an API call supplies the server-side evidence. Keep the label, record ids, journals, documents and rejection result as private acceptance evidence.

Only accept the Core configuration after both the shortage reconciliation and permission rejection succeed. Also test quality holds, over-demand, lot/expiry and other site-specific controls when used.

The picking, allocation and reservation and putaway and location finding documents explain the decision rules. The connected UI proof is core-proof.spec.ts. It receives stock rather than seeding stock or replacing workflow operations with state changes. The reproducible API-driven worked dataset is in scenario helpers, which the E2E specs under tests/e2e/tests/ use for their setup. Those helpers create unique synthetic records, drive real public endpoints and check resulting state; they are not a production importer.

Known limitations on the Core path

These are limitations of today's code, not steps this playbook repairs. Recheck their linked issues against the version being commissioned. A synthetic proof does not waive a production blocker.

Limitation Safe commissioning boundary
Putaway suggestions count resting and reserved weight, but a load with no weight counts zero, a task that is cancelled or finished stops holding its weight at once, and stock that moves after the search is not covered (putaway and location finding). Record weights on items before commissioning; cancel or finish tasks that will not run, because an open task holds its weight. Final validation can still reject a suggestion, so check the location if it does.
#159: unit-load movement can accept an unknown destination id. Use an existing, verified location through the scanned task interface; do not use invented ids.
#6: the bill of lading contains a demo address. PDF generation is not proof of a usable shipment document. Resolve this before using Karyo bills of lading for real shipments.

Floor work, counts and replenishment

Sign in at /m/ as the operator, with its real grants. Claim ordinary work, scan the required identity, complete it and verify the desktop result. Menu transactions are online-only; do not assume all work can be queued offline. Sort and cross-order Pack-out belong to the Waves capability: Core leaves them off the menu, and with Waves switched on they have work once a wave is released.

For a blind count, create a count session for the prepared location, record the observed physical quantity, then have the authorized user accept or recount the difference. Verify stock, locks and the journal afterward. For replenishment, reduce a configured pick face below its minimum, invoke a scan, execute the resulting transport and confirm source/destination quantities. Automatic scans are opt-in. See replenishment for whole-load versus top-up behavior.

Run browser acceptance

Use an isolated target with unique storage/ports and a commissioned single Facility. Supply KARYO_E2E_MANAGER_USER, KARYO_E2E_MANAGER_PASSWORD, KARYO_E2E_VIEWER_USER and KARYO_E2E_VIEWER_PASSWORD for its already enrolled test identities with reviewed grants. Load them from private evidence or a secret manager, never from a committed file. Leave KARYO_E2E_PROVISION and KARYO_E2E_IDENTITY_BOOTSTRAP unset for this commissioned-target run; creating replacement provider users would not preserve their exact enrolled subjects.

cd tests/e2e
npm ci
# Load the four named credentials, then use the rehearsal's exact HTTPS public origin:
BASE_URL=https://warehouse-test.example.com npx playwright test core-proof.spec.ts --reporter=list

Replace the example origin with the isolated target's public origin from deploying Karyo. The production application requires an HTTPS issuer; the browser and API client must trust the rehearsal's certificate. Do not reuse a failed initialized database with new credentials.

The Core proof requires the Manager and Viewer personas. It needs the Day 2 layout: at least one unlocked storage location that is not fully allocated, at least one pack-staging location, at least one ship-staging location and one location type. If any is missing, the proof stops before it writes anything and names the missing item. It never creates a storage area or storage location. The proof creates a unique product and a receiving dock through the API, then creates the ASN and order through the console. It receives from floor MENU > 3 Receive, scanning the dock, and scans putaway, pick and count work through the floor app; packing, manual manifest, dispatch and count approval use the console. It checks actual persisted results and attaches record ids, journals and the Viewer's read of shipments and its 403 on a dispatch as JSON acceptance evidence. Playwright types into the real scan fields and presses Enter to simulate barcode input; it does not prove a physical scanner, printer, external carrier or ERP connection. The proof completes putaway at whichever unlocked storage location the system suggests. If that location already holds other stock, the proof fails before the move and never counts or changes unrelated stock. A passing run leaves five synthetic units of its e2e-core- item at the suggested location. That location stays occupied until you remove or reconcile that stock, so do this before the stock reconciliation on Days 4-5.

A site creates its layout on Day 2 and never runs a layout script. The repository's own test stack starts with an empty Facility, so npm run commission:core-layout in tests/e2e sends the same Warehouse setup request as /warehouse/setup. It creates six storage locations and one receiving, packing and shipping location, each purpose in its own zone. It refuses a target that is not a loopback stack, and it refuses a Facility that already has any storage location, in both cases without writing anything.

The proof writes synthetic warehouse records and runs under either profile. The other specs are separate and expect an Extended installation; profiles.spec.ts switches the target to Core and back to prove what each profile shows. Preserve private evidence and remove credentials from anything attached to an issue. Missing credentials or infrastructure must fail visibly, not turn acceptance into skipped tests. The optional direct database sweep additionally requires an explicit KARYO_PG_CONTAINER and the matching KARYO_CONTAINER_CLI (podman by default). Leave that container unset to disable the sweep; unique scenario records still allow the actual browser tests to run. Never point it at shared data.

Fresh-database identity provisioning (separate from the commissioned proof)

The supported ./scripts/run-e2e.sh runner provisions and cleans up ephemeral Keycloak identities; read ./scripts/run-e2e.sh --help before opting into it. Remote provisioning additionally requires KARYO_E2E_ALLOW_REMOTE_PROVISION=true, an exact KARYO_E2E_EXPECTED_ORIGIN and KEYCLOAK_ADMIN_CLIENT_SECRET. None of those administrator credentials are needed for the commissioned-target browser command above.

Karyo admits only enrolled principals with grants, so on a fresh application database the personas global setup provisions in Keycloak have no access. Set KARYO_E2E_IDENTITY_BOOTSTRAP=true, with KARYO_PG_CONTAINER, to commission them on top of System, the setup account that a fresh managed installation creates and that records identity cutover 1 itself. The bootstrap waits for System, enrolls each persona as an unaffiliated operations principal with the guarded enroll command of the identity principal upgrade, and gives each persona one Company grant within the actions its compatibility roles translate to, written directly in the disposable database. It exists only in the E2E harness. KARYO_E2E_ISSUER overrides the issuer, which defaults to the target's /auth/realms/karyo. The bootstrap refuses a database that holds any principal besides System, and one that was commissioned without System.

warehouse-setup.spec.ts covers warehouse setup on the real stack; it names its locations with a run-unique prefix, removes what it created, and restores the saved floor arrangement. The scale run is separate because it empties the installation: on a disposable localhost stack started with KARYO_DEMO=on, run KARYO_TIMING_DISPOSABLE=yes npm run time:warehouse-setup from tests/e2e with KARYO_E2E_MANAGER_USER and KARYO_E2E_MANAGER_PASSWORD naming the goods-owner-1 manager. It creates 1,386 and 61,304 locations, as typed ranges and as pasted lists, checks the counts, one known address, the bounded previews, the retries and the timing budgets, and writes a JSON result to the system temp directory (or KARYO_TIMING_OUT).

Extend the application

You may build your own Apache-2.0 extended image. No vendor approval is needed.

The executable example is HeldLotStockFilter. It implements the real public StockSelectionFilter SPI and uses StockUnitLookup from the same API module. It removes synthetic lots beginning with EXAMPLE-HOLD-, keeps the remaining FIFO order, reads candidates in one explicitly owner-scoped batch, and never adds new candidates. This is not hazmat enforcement, a quarantine system or a production safety policy. The same example JAR also carries HazmatStockFilter as an inactive CDI alternative. It has no activation priority and is not enabled by the augmented build.

The example JAR carries its CDI discovery marker. It is not included in the normal app. Enable it deliberately during augmentation in a disposable demonstration clone (services/karyo-app/build.gradle.kts, providers.gradleProperty("karyoInventoryExample") reads the property):

./gradlew :services:inventory-service:karyo-inventory-ext-example:test --no-build-cache
./gradlew -PkaryoInventoryExample=true :services:karyo-app:quarkusBuild

To include it when using the normal build/deployment script, export the corresponding Gradle project property only for that explicit invocation:

ORG_GRADLE_PROJECT_karyoInventoryExample=true ./scripts/deploy-server.sh

This rebuilds and restarts the script's target stack: establish that it is your disposable target first. Keep its existing credentials on restart. Copying a JAR next to a running Quarkus process is not installation. Both discovery and behavior require the augmented application/image, not merely a compiled extension JAR.

Prove the observable effect, using the same browser credentials/target prepared above:

./scripts/run-e2e.sh --config=playwright.operational.config.ts inventory-extension.operational.ts

Using the runner retains its ephemeral-user provisioning and credential handling; invoking npm or Playwright directly instead requires supplying those same prerequisites explicitly. The proof signs in through Keycloak, finds HeldLotStockFilter in the live ADMIN registry, verifies that HazmatStockFilter is absent, then acts as a warehouse manager. It creates a unique SKU with three 10-unit stocks: oldest synthetic held lot, ordinary locked stock, and ordinary unlocked stock. Releasing demand for 15 must reserve only the 10 unlocked ordinary units and report a shortage of 5. Held and locked stock retain zero reservations, and available amounts remain nonnegative.

For the negative control, rebuild/redeploy the same disposable database and credentials without the Gradle example property, then run:

KARYO_EXPECT_INVENTORY_EXAMPLE=false ./scripts/run-e2e.sh --config=playwright.operational.config.ts inventory-extension.operational.ts

This creates fresh unique records and requires the registry to omit both example implementations. Ordinary FIFO then reserves 10 from the oldest lot and 5 from the other unlocked stock; locked stock remains untouched. The default augmented proof must fail against a stock image, not silently pass without installation.

Before you choose an interface to implement, read its kind in Admin > Extensions (SPI) or in the kind field of GET /api/v1/admin/extensions. Implement only a STRATEGY_SEAM. A LOOKUP (a read-only in-process contract) or a PORT (an in-process command contract) is implemented by Karyo's own modules and has no chain of alternatives. An implementation of either from an extension is not supported and can break on the next release. The example above calls a lookup, StockUnitLookup, and implements a strategy seam, StockSelectionFilter.

For a real extension, use your own package/JAR and API-only compile dependencies. Add that JAR to the application's build classpath before augmentation, retain CDI discovery, and test its actual effect and safety invariants. Compile only against interfaces that exist in the -api modules. An engine seam's implementation - e.g. a detector - is called by its engine, which every installation has. Keep the unextended build usable independently. See extension SPIs and installation and ADR 0019.

Operate and integrate

  • Follow deploying Karyo and upgrade, backup and recovery for backups, restore rehearsal, upgrades, secret rotation and realm maintenance. Verify restore into isolated storage before treating a backup as usable.
  • Inspect readiness/health and structured logs. Metrics are exposed, but an exposed endpoint does not mean a monitoring or tracing stack has been deployed. See operating an installation.
  • Use the webhook event catalogue for event contracts. Test an actual receiver before claiming delivery. Protect webhook credentials and use synthetic payloads.
  • Configure printers/carriers/providers explicitly. Distinguish downloaded documents, mocks and successfully delivered external effects.
  • Record your deployed release, image identities, configuration and tested restore procedure without committing secrets. The requirements register records what Karyo is required to do; this guide and deploying Karyo own the installation route.