Source: ddx-documentation/adr/0001-scaffold-route.md
## Status Accepted 2026-10-23 (owner Q9, confirmed by Q13). Outcome: delivered by task 006 (create-nextjs + create-nestjs scaffolds; see progress/006.md). ## Context The root `dudoxx-web-boot` is empty. It needs ddx-web, ddx-api, two docker folders and `./ddx-manage.sh` (00_JOB problem 1). The dudoxx-sandbox-creator composes these from the harness templates, but its default port band is 3400-3490 and its docker files publish the upstream default ports on the host. Failure mode 5 says a scaffolder that ignores the overrides makes services collide with the sibling HMS stack. The workspace is dev-only with no remote (Q4). ## Decision Compose through **dudoxx-sandbox-creator** with: - per-service port overrides from [../ports.md](/en/docs/ports) (16300, 16310, 16330, 16350/16351; 16370 reserved); - `--no-push` (no GitHub remote, Q4); - versions from [../versions.md](/en/docs/versions). **Fallback:** if the creator cannot take the overrides, run `create-nextjs` (ddx-web) and `create-nestjs` (ddx-api) by hand, then write the docker folders and `./ddx-manage.sh` against the port map. ## Rejected alternative Hand-scaffold from the start (`create-nextjs` + `create-nestjs` only). Rejected: it skips the creator's lifecycle script and docker wiring, so more glue is written by hand. It stays the fallback only. ## Consequences - AC1.4 greps every compose file for a host-side default port and must find none (map in ../ports.md). - AC1.5 checks that `./ddx-manage.sh status` shows 16300. - Any creator default left in place is a defect, not a choice. ## Outcome Task 006, 2026-10-23. **Route used: the fallback** (`create-nextjs` + `create-nestjs`). Why the creator was not used. Its in-place dry-run accepted every 163XX override (web 16300, api 16310, postgres 16330, minio 16350/16351) and `--no-push`. But: - Phase 7 writes the root `.claude/` when `.claude/agents/` is absent. Task 004 owned `.claude/` at that time. - `--with-api` always adds Redis to the root `compose.yaml` (a WS1 NOT item). - It also writes seeder/usage packages, a root compose and the manage script. Task 007 owns the docker folders and `./ddx-manage.sh`. Commands (run in `/tmp/w006-scaffold`, then moved into the root): ```sh DDX_BRAND_TOKENS_DIR=$HOME/.claude/skills/_shared-brand-tokens \ npx --yes tsx <create-nextjs>/scripts/create-project.ts --name ddx-web \ --display-name "Dudoxx Web Boot" --trigram dwb --port 16300 --api-port 16310 \ --db-port 16330 --brand dudoxx --skip-install ~/.claude/skills-vault/create-nestjs/scripts/scaffold.sh ddx-api --no-wizard \ --trigram dwb --auth jwks --no-docker --port 16310 --db-port 16330 \ --cwd /tmp/w006-scaffold/ddx-api ``` What the scaffolders could not do, and the fix applied: - `create-nextjs` aborts: its template `design-reference/operational-workspaces/DESIGN.md` does not match its own `manifest.json` hash. The run used a `/tmp` copy of the skill with the self-consistent package `~/.claude/design/operational-workspaces` (65 of 65 hashes match). The harness copy is not fixed here. - Both scaffolders run `git init` (create-nextjs also commits). Built outside the repo; the nested `.git` folders were removed before the move. - Per-app `pnpm-workspace.yaml` and `ddx-web/pnpm-lock.yaml` were removed. Their `allowBuilds` moved to the root `pnpm-workspace.yaml`. One lockfile at the root. - `.env.example` files and `ddx-api/test/setup-e2e.ts` kept 3400/3450 values and Redis/LiveKit/Qdrant lines. Changed to 16300/16350; the three unused lines removed. - The brand file moved from `src/styles/brand.css` to `src/styles/brands/dudoxx.css` (imports in `globals.css` and docs updated). - Still open for task 007: `ddx-web/compose.yaml` and `ddx-web/Dockerfile` are per-app files (host ports 16300/16330 only). ## Notes - 2026-10-23: the workspace now has a private remote, `git@github.com:Dudoxx/dudoxx-web-boot.git` (owner order); the port and scaffold decision is unchanged.
adr/
deploy/
research/
Accepted 2026-10-23 (owner Q9, confirmed by Q13). Outcome: delivered by task 006 (create-nextjs + create-nestjs scaffolds; see progress/006.md).
The root dudoxx-web-boot is empty. It needs ddx-web, ddx-api, two docker folders and
./ddx-manage.sh (00_JOB problem 1). The dudoxx-sandbox-creator composes these from the
harness templates, but its default port band is 3400-3490 and its docker files publish
the upstream default ports on the host. Failure mode 5 says a scaffolder that ignores the overrides makes
services collide with the sibling HMS stack. The workspace is dev-only with no remote (Q4).
Compose through dudoxx-sandbox-creator with:
--no-push (no GitHub remote, Q4);Fallback: if the creator cannot take the overrides, run create-nextjs (ddx-web) and
create-nestjs (ddx-api) by hand, then write the docker folders and ./ddx-manage.sh
against the port map.
Hand-scaffold from the start (create-nextjs + create-nestjs only). Rejected: it skips the
creator's lifecycle script and docker wiring, so more glue is written by hand. It stays the
fallback only.
./ddx-manage.sh status shows 16300.Task 006, 2026-10-23. Route used: the fallback (create-nextjs + create-nestjs).
Why the creator was not used. Its in-place dry-run accepted every 163XX override
(web 16300, api 16310, postgres 16330, minio 16350/16351) and --no-push. But:
.claude/ when .claude/agents/ is absent. Task 004 owned
.claude/ at that time.--with-api always adds Redis to the root compose.yaml (a WS1 NOT item)../ddx-manage.sh.Commands (run in /tmp/w006-scaffold, then moved into the root):
What the scaffolders could not do, and the fix applied:
create-nextjs aborts: its template design-reference/operational-workspaces/DESIGN.md
does not match its own manifest.json hash. The run used a /tmp copy of the skill
with the self-consistent package ~/.claude/design/operational-workspaces (65 of 65
hashes match). The harness copy is not fixed here.git init (create-nextjs also commits). Built outside the repo;
the nested .git folders were removed before the move.pnpm-workspace.yaml and ddx-web/pnpm-lock.yaml were removed. Their
allowBuilds moved to the root pnpm-workspace.yaml. One lockfile at the root..env.example files and ddx-api/test/setup-e2e.ts kept 3400/3450 values and
Redis/LiveKit/Qdrant lines. Changed to 16300/16350; the three unused lines removed.src/styles/brand.css to src/styles/brands/dudoxx.css
(imports in globals.css and docs updated).ddx-web/compose.yaml and ddx-web/Dockerfile are per-app
files (host ports 16300/16330 only).git@github.com:Dudoxx/dudoxx-web-boot.git (owner order); the port and scaffold decision is unchanged.DDX_BRAND_TOKENS_DIR=$HOME/.claude/skills/_shared-brand-tokens \ npx --yes tsx <create-nextjs>/scripts/create-project.ts --name ddx-web \ --display-name "Dudoxx Web Boot" --trigram dwb --port 16300 --api-port 16310 \ --db-port 16330 --brand dudoxx --skip-install~/.claude/skills-vault/create-nestjs/scripts/scaffold.sh ddx-api --no-wizard \ --trigram dwb --auth jwks --no-docker --port 16310 --db-port 16330 \ --cwd /tmp/w006-scaffold/ddx-api